[R] what does this syntax mean?

2005-06-19 Thread ronggui
i study the code of function ave,but i can understand one line of the syntax. ave function (x, ..., FUN = mean) { n - length(list(...)) if (n) { g - interaction(...) split(x, g) - lapply(split(x, g), FUN) } else x[] - FUN(x) x } my question is : what does

[R] Modération de votre message

2005-06-19 Thread SYMPA
Votre message pour la liste vingtcinquante a t transmis au(x) modrateur(s) __ R-help@stat.math.ethz.ch 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] how to get the mean of each group?

2005-06-19 Thread ronggui
i have the data x.1 x.1 - data.frame(income=runif(100)*1, + edu=sample(c('hs','col','none'),100,T),y=rnorm(100)*100) and i want to get : income y col 5526.726 -11.00956 hs 4196.036 -10.03861 none 4308.111 -28.69549 5526.726 is the mean income for col, 4196.036 is the

[R] error loading Matrix in Mac OSX 10.4

2005-06-19 Thread Constantinos Antoniou
Hello, I am having trouble loading Matrix (0.96-3) in self-compiled R-2.1.1- beta, and self compiled R.app (got it a couple of days ago via: svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI Mac-GUI ) on Mac OS 10.4.1. The problem I get when I try to load Matrix is the following: (I

Re: [R] how to get the mean of each group?

2005-06-19 Thread Uwe Ligges
ronggui wrote: i have the data x.1 x.1 - data.frame(income=runif(100)*1, + edu=sample(c('hs','col','none'),100,T),y=rnorm(100)*100) and i want to get : income y col 5526.726 -11.00956 hs 4196.036 -10.03861 none 4308.111 -28.69549 5526.726 is the mean

Re: [R] what does this syntax mean?

2005-06-19 Thread Uwe Ligges
ronggui wrote: i study the code of function ave,but i can understand one line of the syntax. ave function (x, ..., FUN = mean) { n - length(list(...)) if (n) { g - interaction(...) split(x, g) - lapply(split(x, g), FUN) } else x[] - FUN(x) x }

Re: [R] what does this syntax mean?

2005-06-19 Thread Liaw, Andy
That's a call to the replacement function split-(), which is defined as: get(split-.default) function (x, f, value) { ix - split(seq(along = x), f) n - length(value) j - 0 for (i in ix) { j - j%%n + 1 x[i] - value[[j]] } x } Andy From: ronggui i

[R] tank you

2005-06-19 Thread ronggui
thank you. when i examined the ?split, i have figure out the answer. still,thank you very much.and sorry for my igorance. On Sun, 19 Jun 2005 09:41:38 -0400 Liaw, Andy [EMAIL PROTECTED] wrote: That's a call to the replacement function split-(), which is defined as: get(split-.default)

Re: [R] error loading Matrix in Mac OSX 10.4

2005-06-19 Thread Prof Brian Ripley
I think you need to ask on the R-sig-mac list with many more details. My understanding is that Matrix.so should import something like libintl_dgettext and that the R executable should export it. Hence my suspicion is that your build of R is the problem rather than the installation of Matrix.

Re: [R] error loading Matrix in Mac OSX 10.4

2005-06-19 Thread Constantinos Antoniou
Dear Prof. Ripley, Thank you for the suggestion. I will subscribe to that list as well (and direct my mac-specific issues there) Constantinos Antoniou On 19 2005, at 6:43 , Prof Brian Ripley wrote: I think you need to ask on the R-sig-mac list with many more details. My understanding is

[R] Creating a R package for Windows XP

2005-06-19 Thread Jeffrey Pai
Hi: I'm trying to create a package to pass to someone else to use a group of functions with help files. I'm working on Windows XP. Step One: I use the example ## two functions and two data sets : f - function(x,y) x+y g - function(x,y) x-y d - data.frame(a=1, b=2)

Re: [R] Creating a R package for Windows XP

2005-06-19 Thread Prof Brian Ripley
You have created a source package, and c:/R/rw2010/library is not the right place for a source package. You need to move it somewhere else and INSTALL it, as described in the rw-FAQ. (You need to move it because it would be installed into that directory and you are not allowed to clobber the

Re: [R] Creating a R package for Windows XP

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, Prof Brian Ripley [EMAIL PROTECTED] wrote: You have created a source package, and c:/R/rw2010/library is not the right place for a source package. You need to move it somewhere else and INSTALL it, as described in the rw-FAQ. (You need to move it because it would be installed

[R] plot qda object

2005-06-19 Thread wu sz
Hello there, I use function qda (MASS package) to obtain a qda object, but how to plot this object? Thank you, Shengzhe __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] plot the standard deviation of a specific dot on the figure

2005-06-19 Thread wu sz
Hello there, I plot a curve together with the specific dots on the line, but how to plot the standard deviation on these dots just as the green bands in the attached file, and also the purple dotted lines? Thank you, Shengzhe __

Re: [R] plot qda object

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz [EMAIL PROTECTED] wrote: I use function qda (MASS package) to obtain a qda object, but how to plot this object? Check out predplot in this file: system.file(scripts/ch12.R, package = MASS) __ R-help@stat.math.ethz.ch mailing list

Re: [R] plot the standard deviation of a specific dot on the figure

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz [EMAIL PROTECTED] wrote: I plot a curve together with the specific dots on the line, but how to plot the standard deviation on these dots just as the green bands in the attached file, and also the purple dotted lines? There is nothing attached.

[R] Trouble building R2.1.0 from source on Linux: package VR

2005-06-19 Thread Frank Gibbons
Hi, Following on from suggestions made last week, I decided to install R 2.1.0 on my Linux machine. I'm running into a problem there however, as shown: make[1]: Entering directory `/d0/home/fgibbons/tmp/R2.1.0/R-2.1.0/src/library/Recommended' make[2]: Entering directory

Re: [R] Fedora Core 4

2005-06-19 Thread plummer
The Fedora upgrade process should normally install backward compatibility libraries when it finds an RPM linked to a library (or library version) that isn't in the new release. In this case compat-libf2c-32 provides libg2c on FC4, and it should be installed on your system if you previously had R

[R] practical help ... solving a system...

2005-06-19 Thread Carsten Steinhoff
Hello, I want to estimate the parameters of a binomial distributed rv using MLE. Other distributions will follow. The equation system to solve is not very complex, but I've never done such work in R and don't have any idea how to start... The system is: (1) n*P = X (2)[sum {from

Re: [R] Trouble building R2.1.0 from source on Linux: package VR

2005-06-19 Thread Peter Dalgaard
Frank Gibbons [EMAIL PROTECTED] writes: Hi, Following on from suggestions made last week, I decided to install R 2.1.0 on my Linux machine. I'm running into a problem there however, as shown: make[1]: Entering directory `/d0/home/fgibbons/tmp/R2.1.0/R-2.1.0/src/library/Recommended'

[R] How to sample from a linear mixed model

2005-06-19 Thread Søren Højsgaard
I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has been fitted with lme(), i.e. a model y ~ N(Xb, C), where C=Z cov(u) Z' + cov(e). I've tried to figure out how to extract C from an lme object, because that would solve my problem when also using the predict() function,

Re: [R] practical help ... solving a system...

2005-06-19 Thread Spencer Graves
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. If you had provided more information about what you tried, it might be easier for someone else to offer effective help. In particular, what did you try with fitdistr, and why do you think it didn't work

[R] plot the deviation of a specific dot on the figure

2005-06-19 Thread wu sz
Hello there, I plot a curve together with the specific dots on the line, but how to plot the standard deviation on these dots just as the green bands in the attached file, and also the purple dotted lines? Thank you, Shengzhe __

Re: [R] plot the deviation of a specific dot on the figure

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz [EMAIL PROTECTED] wrote: Hello there, I plot a curve together with the specific dots on the line, but how to plot the standard deviation on these dots just as the green bands in the attached file, and also the purple dotted lines? There is still no attached file. Try:

[R] Fwd: How to sample from a linear mixed model

2005-06-19 Thread Douglas Bates
I forgot to cc: R-help on this reply. -- Forwarded message -- From: Douglas Bates [EMAIL PROTECTED] Date: Jun 19, 2005 7:55 PM Subject: Re: [R] How to sample from a linear mixed model To: Sren Hjsgaard [EMAIL PROTECTED] On 6/19/05, Sren Hjsgaard [EMAIL PROTECTED] wrote: I would

Re: [R] how 'stepAIC' selects?

2005-06-19 Thread Wuming Gong
Hi Veronika, StepAIC does not do any test. But you may do a likelihood ratio test on the difference between deviance of two models to judge which model to use, simply like this, 1 - pchisq(deviance.i - deviance.j, df.i - df.j) And then check whether the returned p value is small enough...

[R] error when installing Matrix

2005-06-19 Thread ronggui
version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major2 minor1.0 year 2005 month04 day 18 language R OS:debian linux # R CMD INSTALL /home/ronggui/Matrix_0.96-3.tar.gz . s-3 -L/usr/lib/R/lib -lR

[R] Which package contains Fishers Exact Test?

2005-06-19 Thread Briggs, Meredith M
[[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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] error when installing Matrix

2005-06-19 Thread Dirk Eddelbuettel
On 20 June 2005 at 10:07, ronggui wrote: | OS:debian linux | # R CMD INSTALL /home/ronggui/Matrix_0.96-3.tar.gz | | . | s-3 -L/usr/lib/R/lib -lR | /usr/bin/ld: cannot find -lblas-3 | collect2: ld returned 1 exit status | make: *** [Matrix.so] Error 1 | ERROR: compilation failed for

Re: [R] Which package contains Fishers Exact Test?

2005-06-19 Thread Liaw, Andy
help.search(fisher exact test) says: fisher.test(stats) Fisher's Exact Test for Count Data Andy From: Briggs, Meredith M [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] error when installing Matrix

2005-06-19 Thread Dirk Eddelbuettel
On 19 June 2005 at 22:18, Dirk Eddelbuettel wrote: | | On 20 June 2005 at 10:07, ronggui wrote: | | OS:debian linux | | # R CMD INSTALL /home/ronggui/Matrix_0.96-3.tar.gz | | | | . | | s-3 -L/usr/lib/R/lib -lR | | /usr/bin/ld: cannot find -lblas-3 | | collect2: ld returned 1 exit

Re: [R] reading csv-data

2005-06-19 Thread Johanna Sundvik
Thank you all for your help. There was an easy solution to my problem: read.csv2(example.csv, dec=., header=TRUE) or Mean1 - as.numeric(as.character(Mean1)) -Johanna Lainaus Ivar Herfindal [EMAIL PROTECTED]: Thomas Lumley wrote: On Fri, 17 Jun 2005, Johanna Sundvik wrote: