Re: [R] splitting and saving a large dataframe

2006-04-30 Thread Jean . Coursol
for( i in levels(mydata$myfactor) ) { d = mydata[mydata$myfactor==i,] write.table(d, paste('d', i, '.data', sep='') ) } Jean Coursol Quoting Dimitri Szerman [EMAIL PROTECTED]: Hi, I searched for this in the mailing list, but found no results. I have a large dataframe (

Re: [R] R-help Digest, Vol 38, Issue 30

2006-04-30 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [EMAIL PROTECTED] __ 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] Making R talk to Win/OpenBUGS in Linux (again)

2006-04-30 Thread Gregor Gorjanc
Hello Paul, thank you very much for this report. You caught a bug in R2WinBUGS that was introduced by me. I added support for winepath in 1.1-1 version. Since I switch between Windows and Linux I always set WINEPATH and then use it in bugs(). That's why I forgot to add it in further calls in

[R] Package docs for CRAN

2006-04-30 Thread William Asquith
CRAN et al., I would like to add an extented introduction or other arbitrary sections to my package lmomco. I have been shipping inst/doc/Introduction.Rd. I would like to have this content inserted to the front of the PDF build for the CRAN. The R-exts.pdf seems to be a little silent on

Re: [R] Package docs for CRAN

2006-04-30 Thread Gabor Grothendieck
If your package is called mypkg you could create a mypkg-package.Rd file. e.g. library(dyn) library(help = dyn) # note that mypkg-package is listed package?dyn ?dyn-package # same and you could add one or more vignettes, e.g. library(zoo) library(help = zoo) # note that the 2 vignettes are

[R] Duration labels on plot axes

2006-04-30 Thread Duncan Murdoch
I have a variable containing a measurement of a duration in seconds which I would like to use in a plot, with the axes labelled in a format like %H:%M:%S (or possibly %Hh%Mm) if the duration is more than an hour, or just %M:%S if more than a minute, or just decimal seconds if short enough. Is

[R] Simple decision trees - rpart?

2006-04-30 Thread Per Bak
Hi, I'm looking for help on how to use R for making simple decision trees to calculate EMV's, in a manner similar to the method applied in the PrecisionTree add-in for Excel. Say, what is the optimal action, if: Action 1 - could have two out comes with probabilities of 60% and 40% and

Re: [R] R interface to ImageMagick

2006-04-30 Thread Swidan, Firas
Hi, Thanks for the help. I have found out that EBImage is an undergoing project for building an interface from R to most ImageMagick functionality plus additional image processing capabilities added by Oleg Sklyar (the maintainer). You can get it from

Re: [R] Duration labels on plot axes

2006-04-30 Thread Gabor Grothendieck
The times class in chron will give hours and minutes. e.g. library(times) plot(times(0:23/23), 0:23) and you could modify chron:::axis.times for the others. On 4/30/06, Duncan Murdoch [EMAIL PROTECTED] wrote: I have a variable containing a measurement of a duration in seconds which I would

[R] Number of Clusters

2006-04-30 Thread kumar zaman
Dear R users, I am interested in clustering in R. In SAS we have some criteria for determining the number of clusters using the PROC CLUSTER procedure, which are CCC cubic clustering criterion (Sarl 1981), Psuedo F (PSF), and Psuedo T square (PST). My question is do thsese criterion exists in

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-04-30 Thread Paul Johnson
Thank you very much. With the insertion of WINEPATH declaration, then the following example program does run. And really fast, too! library(R2WinBUGS) WINEPATH - /usr/bin/winepath # An example model file is given in: model.file - system.file(package

[R] general help on R and factor in R and a few simple comment from a newbie

2006-04-30 Thread Guojun Zhu
Hi. I am starting to learn R for a course project. I am relative OK c++ programer. I found the R is very different. I have read the an introduction to R. I have to say it is not very newbie friendly. It does not explain many things clearly. And unfortunately, there is not too much

Re: [R] general help on R and factor in R and a few simple comment from a newbie

2006-04-30 Thread Gabor Grothendieck
On 4/30/06, Guojun Zhu [EMAIL PROTECTED] wrote: Hi. I am starting to learn R for a course project. I am relative OK c++ programer. I found the R is very different. I have read the an introduction to R. I have to say it is not very newbie friendly. It does not explain many things

Re: [R] Number of Clusters

2006-04-30 Thread Christian Hennig
On Sun, 30 Apr 2006, kumar zaman wrote: Dear R users, I am interested in clustering in R. In SAS we have some criteria for determining the number of clusters using the PROC CLUSTER procedure, which are CCC cubic clustering criterion (Sarl 1981), Psuedo F (PSF), and Psuedo T square (PST).

Re: [R] Duration labels on plot axes

2006-04-30 Thread Gabor Grothendieck
That should have been: library(chron) plot(times(0:23/24), 0:23) On 4/30/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: The times class in chron will give hours and minutes. e.g. library(times) plot(times(0:23/23), 0:23) and you could modify chron:::axis.times for the others. On

[R] R-GUi

2006-04-30 Thread Scott Cunningham
I'm trying to install R-GUI on my Mac OSX, but for some reason it is not working. Anyone with a Mac able to answer why I would be getting the following error? I am currently running Mac OS X 10.4.6, which it seems to not be recognizing. *** R.app GUI 1.15 for R 2.3.0 for Mac OS X 10.4.4

[R] Yet another help needed

2006-04-30 Thread Guojun Zhu
I have a big data.frame with abou 20 column and 60,000 rows for analyze. Let us say I had a column a. I want to generate a new column which value should be the average of the 60 a before the current column. Let us say very row is time t_i. I need to calculate

Re: [R] Yet another help needed

2006-04-30 Thread Gabor Grothendieck
Look at ?filter ?embed rollmean in the zoo package running in the gtools package runmean in the caTools package The last one is probably the fastest. On 4/30/06, Guojun Zhu [EMAIL PROTECTED] wrote: I have a big data.frame with abou 20 column and 60,000 rows for analyze. Let us say I had a

[R] table of means/medians across bins used for a histogram

2006-04-30 Thread lalitha viswanath
Hi I am trying to get a table of means of parameter 1 across BINS of parameter 2. I am working in proteomics and a sample of my data is as follows cluster-age clock-rate(evolutionary rate) scopclass 0.002 10 A 0.045 0.1 B 0.13

Re: [R] table of means/medians across bins used for a histogram

2006-04-30 Thread Gabor Grothendieck
My understanding is that you want to replace each rate with its average over the associated bin and then plot age against that. In that case try this: DF # test data age rate bin 1 0.002 10.0 A 2 0.045 0.1 B 3 0.130 15.0 A 4 0.150 34.0 D with(DF, plot(ave(rate, bin), age))

Re: [R] table of means/medians across bins used for a histogram

2006-04-30 Thread Gabor Grothendieck
Or perhaps a bit simpler: plot(age ~ ave(clock, bin), DF) On 4/30/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: My understanding is that you want to replace each rate with its average over the associated bin and then plot age against that. In that case try this: DF # test data age