Re: [R] R-devel and gcc 3.4

2004-08-21 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes:

 On 20 Aug 2004, Peter Dalgaard wrote:
 
  Samuelson, Frank* [EMAIL PROTECTED] writes:
  
   I encountered a similar problem with 
   1. Intel compilers.
   2. gcc when I turn off optimizations (no -Ox)
  
  Ooops. I didn't notice #2 the first time around. If we're failing the
  checks with no optimization, then we surely have set the tolerances
  too tight.
 
 He may be, but I am not (i686, x86_64, Solaris 32- and 64-bit, Windows), 
 all gcc 3.4.1 with -O2 and without (in most cases).

Yes, I couldn't reproduce it on x86_64 either. What was the exact
platform again? 

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] more on apply on data frame

2004-08-21 Thread Göran Broström
On Fri, Aug 20, 2004 at 11:40:16PM -0500, Laura Holt wrote:
 Hi R People:
 
 Several of you pointed out that using tapply on a data frame will work on 
 the iris data frame.
 
 I'm still having a problem.
 
 The iris data frame has 150 rows, 5 variables.  The first 4 are numeric, 
 while the last is a factor, which has the Species names.
 
 I can use tapply for 1 variable at a time:
 tapply(iris[,1],iris[,5],mean)
setosa versicolor  virginica
 5.006  5.936  6.588
 
 but if I try to use this for all of the first 4, I get an error:
 tapply(iris[,1:4],iris[,5],mean)
 Error in tapply(iris[, 1:4], iris[, 5], mean) :
arguments must have same length
 
 Any ideas of what I'm doing wrong, please?

You are not reading the help page:

Usage:

 tapply(X, INDEX, FUN = NULL, ..., simplify = TRUE)

Arguments:

   X: an atomic object, typically a vector.

iris[, 1:4] is a data frame of length 4; iris[, 5] is a vector of length 150.

You probably need to loop over the four first columns and apply tapply(!)
four times, but I'm sure there is a smarter way. Others will tell you.

Göran
-- 
 Göran Broströmtel: +46 90 786 5223
 Department of Statistics  fax: +46 90 786 6614
 Umeå University   http://www.stat.umu.se/egna/gb/
 SE-90187 Umeå, Sweden e-mail: [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] sweave and post rpart

2004-08-21 Thread Christian Schulz
Hi,

have anybody positive experience how 
it is possible get the post output from a
rpart-object in a large sweave file or is only the 
less nicely plot function instead of post possible???

\begin{figure}[htbp]
  \begin{center}
fig=true,eps=T=
post(dtreeEB, title=Tree,digits=getOption(digits) - 0,use.n=TRUE)
@
\caption{Tree1}
  \end{center}
\end{figure}


(1) if the rpart object result contain only the root node, i get this
error:
Error:  chunk 21 
Error in if (is.leaf[lson]) left - list(left = x[lson], right = x[lson],  : 
missing value where TRUE/FALSE needed

(2) if the rpart object contains further nodes sweave finished fine, but 
the plot-part contains no tree and corupted the tex-document, so
a tex2pdf isn't possible.

Many Thanks,
Christian

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] paired t-test vs pairwise t-test

2004-08-21 Thread Brian Gough
John Christie [EMAIL PROTECTED] writes:

 Maybe I'm missing something but I don't see an easy way to help with 
 this ad hoc.  Perhaps someone (hey, maybe me) could volunteer as a 
 filter for ad hoc help modifications.  Although, I certainly do not 
 feel qualified.

I collect any errors reported in the printed versions of the manuals
and will periodically submit suitable patches for them to r-bugs.

If someone finds a section of the manual that needs more description
they should let me know -- I will either submit a patch myself or by
hiring an R expert (as sales permit).

-- 
Brian Gough

Network Theory Ltd,
Publishing the R Reference Manuals --- http://www.network-theory.co.uk/R/

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] sweave and post rpart

2004-08-21 Thread Prof Brian Ripley
On Sat, 21 Aug 2004, Christian Schulz wrote:

 Hi,

 have anybody positive experience how
 it is possible get the post output from a
 rpart-object in a large sweave file or is only the
 less nicely plot function instead of post possible???

 \begin{figure}[htbp]
   \begin{center}
 fig=true,eps=T=
 post(dtreeEB, title=Tree,digits=getOption(digits) - 0,use.n=TRUE)
 @
 \caption{Tree1}
   \end{center}
 \end{figure}


 (1) if the rpart object result contain only the root node, i get this

That's not a tree so an error is probably correct if not so unfriendly a
one.  Perhaps you would like to submit a patch to the *authors*, cc the
maintainer.

 error:
 Error:  chunk 21
 Error in if (is.leaf[lson]) left - list(left = x[lson], right = x[lson],  :
   missing value where TRUE/FALSE needed

 (2) if the rpart object contains further nodes sweave finished fine, but
 the plot-part contains no tree and corupted the tex-document, so
 a tex2pdf isn't possible.

post.rpart() does not produce graphics output on the open device.
If you trouble to read its help page, you will see the solution in the
Details: section.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] error bars

2004-08-21 Thread Christoph Scherber
Dear all,
is there an easy way to create error bars for the following types of plots:
a) barplots
b) interaction plots
Many other statistics packages (e.g. Statistica) offer very nice 
interaction plots with error bars, and I´d like to be able to do the 
same in R.

Best regards
Christoph
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] (no subject)

2004-08-21 Thread Santosh Kumar
Hi!

I would like to unsubscribe this mailing list, but I do not know how to do
that. It is my humble request to mailing list administrator to delete my
email address from the list.

Thanks a lot.

with regards;
Santosh

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] slackware packages

2004-08-21 Thread Uwe Ligges
Carlos Henrique Grohmann wrote:
Hello all, 
I'm new in this list and I'd like to know if someone knows about R packages for
slackware linux. 
I don't know slackware linux, but what about simply installing the 
packages using install.packages()?

Uwe Ligges
thanks all.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] unsubscribing R-help (no subject)

2004-08-21 Thread Uwe Ligges
Santosh Kumar wrote:
Hi!
I would like to unsubscribe this mailing list, but I do not know how to do
that. It is my humble request to mailing list administrator to delete my
email address from the list.
Thanks a lot.
with regards;
Santosh
Arrgh! If you were on this list before, have you never noticed the lines 
below all the messages:

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
The second one tells you how to unsubscribe (please use that way in 
order to reduce the load of work of the list administrator - thanks 
again to Martin!).
The third one tells you not to post questions like this on the list, as 
well as using a sensible subject line!

Uwe Ligges
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] more on apply on data frame

2004-08-21 Thread Gabor Grothendieck
Laura Holt lauraholt_983 at hotmail.com writes:

 
 Hi R People:
 
 Several of you pointed out that using tapply on a data frame will work on 
 the iris data frame.
 
 I'm still having a problem.
 
 The iris data frame has 150 rows, 5 variables.  The first 4 are numeric, 
 while the last is a factor, which has the Species names.
 
 I can use tapply for 1 variable at a time:
 tapply(iris[,1],iris[,5],mean)
 setosa versicolor  virginica
  5.006  5.936  6.588
 
 but if I try to use this for all of the first 4, I get an error:
 tapply(iris[,1:4],iris[,5],mean)
 Error in tapply(iris[, 1:4], iris[, 5], mean) :
 arguments must have same length


This is a job for aggregate:

R data(iris)
R aggregate(iris[,1:4], list(Species = iris[,5]), mean)

 Species Sepal.Length Sepal.Width Petal.Length Petal.Width
1 setosa5.006   3.4281.462   0.246
2 versicolor5.936   2.7704.260   1.326
3  virginica6.588   2.9745.552   2.026


The by command would also work using colMeans:

R by(iris[,1:4], list(Species = iris[,5]), colMeans)

Species: setosa
Sepal.Length  Sepal.Width Petal.Length  Petal.Width 
   5.0063.4281.4620.246 
 
Species: versicolor
Sepal.Length  Sepal.Width Petal.Length  Petal.Width 
   5.9362.7704.2601.326 
 
Species: virginica
Sepal.Length  Sepal.Width Petal.Length  Petal.Width 
   6.5882.9745.5522.026

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] paired t-test vs pairwise t-test

2004-08-21 Thread Gabor Grothendieck
John Christie jc at or.psychology.dal.ca writes:

: 
: On Aug 20, 2004, at 6:16 PM, Berton Gunter wrote:
: 
:  The fact is that, while certainly desirable,  it is very difficult and
:  time-consuming to write the sort of extensively exampled, 
:  instructional Help
:  files that you desire.
: 
: It would be great if one could easily submit a modified help file for 
: inclusion in the default distribution.  

I had mentioned this some time ago but another possibility would be 
to turn the whole help system into a wiki or have a link from each
help page to a supplementary wiki page that users could add additional
comments to.  

This would not require any coordination and could
harness the growing R community making it easy for more people to
contribute.

There is already an unused wiki at:

   http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?RwikiHome

but having the links might provide a more structured approach and
further encouragement to use the wiki.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] A troubled state of freedom: generalized linear models where number of parameters number of samples

2004-08-21 Thread Min-Han Tan
Good morning,

Thank you all for your help so far. I really appreciate it.

The crux of my problem is that I am generating a generalized linear
model with 1 dependent variable, approximately 50 training samples and
100 parameters (gene levels).

Essentially, if I have 100 genes and 50 samples, this results in
coefficients for the first 49 samples, and NAs for the rest, with an
ultra low residual deviance (usually approx. 10^-27). This seems to
have something to do with the number of degrees of freedom (since as
the number of genes increases up to 49, the number of residual degrees
of freedom drops to 0)

What kind of methods can I use to make sense of this? 

I have a subsequent set of samples to work on to validate the results
of this glm, so I am not sure if overfitting is really a problem.

Background: this is a microarray study, where I have divided the
samples in the training set into 2 groups, and generated a number of
genes to differentiate between both groups. I am going to use the GLM
in a subsequent regression analysis to determine survival. For this
purpose, I need to generate some kind of score for each individual
case using the coefficients of each gene level * gene expression
level.

I am not a statistician (but a clinician) - many apologies if I am not
conveying myself very clearly here!

Thanks. 

Min-Han Tan

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] relative frequencies for hist()

2004-08-21 Thread Steffen Katzner
I have problems getting a histogram with relative frequencies on the y-axis.
Here is an example data set:
 a - c(4.626, 4.627, 4.627, 4.628, 4.629, 4.629, 4.630, 4.631, 4.632, 
4.632)
 d = hist(a,freq=F)
 d$density
[1] 299. 100. 200. 100. 100. 200.

The obtained densities are given by counts/(total n * bin width), with 
bin width being 0.001 in this case.

Is there any way to get a histogram with relative frequencies 
irrespective of bin width, i.e. counts/total n ? It doesn't seem to work 
for truehist() either.

Thanks.
Steffen
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] relative frequencies for hist()

2004-08-21 Thread Wolski
Hi!

d$counts/length(a)


And of course you can if it is what you want.

d$density-d$counts/length(a)
plot(d,freq=F)


Sincerely Eryk


*** REPLY SEPARATOR  ***

On 8/21/2004 at 7:10 PM Steffen Katzner wrote:

I have problems getting a histogram with relative frequencies on the
y-axis.

Here is an example data set:

  a - c(4.626, 4.627, 4.627, 4.628, 4.629, 4.629, 4.630, 4.631, 4.632, 
 4.632)
  d = hist(a,freq=F)
  d$density
[1] 299. 100. 200. 100. 100. 200.

The obtained densities are given by counts/(total n * bin width), with 
bin width being 0.001 in this case.

Is there any way to get a histogram with relative frequencies 
irrespective of bin width, i.e. counts/total n ? It doesn't seem to work 
for truehist() either.

Thanks.
Steffen

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Convergence code in nlm function

2004-08-21 Thread Victoria Landsman
Dear R users, 
I am using the nlm function for minimization of the very non-linear function of four 
parameters. I am running 100 simulations and almost always I get the convergence code 
=2 (Successive iterates within tolerance. Current iterate is probably solution.) 
[about 75 times of 100]. 
Frequently, 3 of 4 relative gradients are close to zero and the fourth is huge but 
there are also cases where all four gradients are far from zero. Interestingly, that 
the estimates are close enough to the true values in most of cases. I tried to change 
the optional parameters in the nlm call but this does not help to achieve code=1. What 
may be a reason for such situation?  Could I think that the obtained estimates are 
what I am looking for? 

I am using R 1.9.1:
nlm(N.Loglik,initial.values,fscale=1,print.level = 1, gradtol = 1e-6,steptol = 
1e-6,iterlim = 500,y=y) 

Much thanks, 
Victoria. 
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] loadhistory() in .Rprofile ?

2004-08-21 Thread ivo_welch-rstat8783
dear wizards:  my .Rprofile has just one command for testing,
 loadhistory(~/.Rhistory)
but this gives me an error on R startup:
 Error: couldn't find function loadhistory
Invoking loadhistory() as the first interactive command works fine; 
incidentally, I believe loadhistory() in the .Rprofile worked in 
earlier or other platform R releases, too.

Is the .Rprofile now loaded before loadhistory()?  if so, this seems to 
make it impossible to set up one big history file across directories 
(save history prior to exit, then reload automatically on entry).  if 
not, I probably screwed something up---again.

regards, /iaw
---
ivo welch
PS: my earlier amd64 gentoo problem was caused by my use of f2c, which 
apparently is not happy on amd64 platforms.  thanks to those who let me 
know the problem.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] review by statistician/ Heiberger and Holland

2004-08-21 Thread Sam McClatchie Elena Turin
System Info:
OS: linux Mandrake 9.1
R Version 1.8.1 (2003-11-21),
GNU Emacs 21.2.93.1 
Browser Mozilla firefox
-

Colleagues

Has anyone written a review of this book? 

Statistical Analysis and Data Display: An Intermediate Course with 
Examples in S-PLUS, R, and SAS.
Richard M. Heiberger and Burt Holland
http://www.insightful.com/news_events/webcasts/pharm04/heiberg
er.asp

I can't find a review on the web yet, except for publisher type 
reviews, e.g. 
http://bookwebpro.kinokuniya.co.jp/booksea.cgi?ISBN=038740270
5USID=. 
I'm really interested in a review by a statistician.


I'm particularly interested with how it compares with 
Statistical Computing: An Introduction to Data Analysis using S-Plus
Michael J. Crawley

I've found MJ Crawleys book very useful for both myself and grad 
students, and got our library 
http://www.sardi.sa.gov.au/aquatic/index.html to buy it.

Best fishes

Sam
 --
Sam McClatchie  Elena Turin
22 McKenzie St, Coromandel Valley,
Adelaide, South Australia 5051
email [EMAIL PROTECTED]
Telephone: (61-8) 8270 1022
cell. 0431 304 497
Research home page 
http://www.members.iinet.net.au/~s.mcclatchie/
 
/\
   ...xX(? 
  
?)Xx
   /  \\
 (((? 
   (((?   ...xX(?O?)Xx

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] loadhistory() in .Rprofile ?

2004-08-21 Thread Prof Brian Ripley
 find(loadhistory)
[1] package:utils

so see the comments at the top of the NEWS for 1.9.0.  You will need to 
use utils::loadhistory() in .Rprofile, or a loadhook.

On Sat, 21 Aug 2004 [EMAIL PROTECTED] wrote:

 
 dear wizards:  my .Rprofile has just one command for testing,
   loadhistory(~/.Rhistory)
 but this gives me an error on R startup:
   Error: couldn't find function loadhistory
 Invoking loadhistory() as the first interactive command works fine; 
 incidentally, I believe loadhistory() in the .Rprofile worked in 
 earlier or other platform R releases, too.
 
 Is the .Rprofile now loaded before loadhistory()?  if so, this seems to 
 make it impossible to set up one big history file across directories 
 (save history prior to exit, then reload automatically on entry).  if 
 not, I probably screwed something up---again.
 
 regards, /iaw
 ---
 ivo welch
 
 PS: my earlier amd64 gentoo problem was caused by my use of f2c, which 
 apparently is not happy on amd64 platforms.  thanks to those who let me 
 know the problem.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html