RE: [R] Newbie help with calling R from C programs

2004-02-08 Thread Liaw, Andy
If all you want R to do is the graphics, you might as well use gnuplot for that, IMHO. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marko Krco Sent: Saturday, February 07, 2004 11:45 AM To: [EMAIL PROTECTED] Subject: [R] Newbie help with

RE: [R] Newbie help with calling R from C programs

2004-02-08 Thread Tom Blackwell
Marko - Here's how I would do it. Your simulation code writes (or overwrites) its summary to a named file. Then your simulation code does a system call (somehow) that creates a subshell with a Bourne or csh command line and sends the command R --vanilla script.file . (I'm not quite sure at

RE: [R] Newbie help with calling R from C programs

2004-02-08 Thread Tom Blackwell
Marko - I can't resist. The next more elegant solution would be to have a single R process poll the directory entry for named.file periodically to see whether the file date has changed since it was last read. See help(file.info) for an R tool that will help do this. Use 'system(sleep 600,

RE: [R] Newbie help with calling R from C programs

2004-02-08 Thread Tom Blackwell
Marko - . . . and, using a single R process, rather than calling it from inside the simulation code, means that the R process doesn't need to be running on the same machine as the simulation code. It only needs to run on a machine which has shared file access with the simulation process. And

[R] APE: compar.gee( )

2004-02-08 Thread juli g. pausas
Dear all, I don't understand the following behaviour: Running compar.gee (in library ape ) with and without the option 'data', it give me different results Example: Start R load(eiber.RData) ls() [1] gee.na mydata mytree library(ape) # runnig with the option data= mydata

Re: [R] Normality Test on several groups

2004-02-08 Thread Knut M. Wittkowski
Andy and Peter: Of yours, both of you are right. Re h2g2 (Adams DN 1979): [42] quite definitely is the answer. I think the problem, to be quite honest with you, is that you've never actually known what the question is. [...] So once you do know what the question actually is, you'll know what

[R] bootstrap estimates for lme

2004-02-08 Thread Andrej Kveder
Dear listers, I would like to get the bootstrap estimates form my lme model. I have an HLM (multillevel) 2-level model with the dichotomous outcome. I used glmmPQL procedure. However I have a problem since I have a rather unbalanced proportion (90-99% of events, i.e. ones and only 1-10% of

Re: [R] APE: compar.gee( )

2004-02-08 Thread Uwe Ligges
juli g. pausas wrote: Dear all, I don't understand the following behaviour: Running compar.gee (in library ape ) with and without the option 'data', it give me different results Example: Start R load(eiber.RData) ls() [1] gee.na mydata mytree library(ape) # runnig with the

[R] parsing numbers from a string

2004-02-08 Thread Jonne Zutt
Dear R-help members, I have several large data sets from certain simulations I did and now I want to plot the results nicely. I don't know anything about the size of the x and y values in advance. Plotting these values is not a problem. However, I want to add errorbars (errbar in the Hmisc

[R] iterating over files in a directory with R

2004-02-08 Thread femke
Hello, I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically what I want to do is to iterate over many files and apply some R functions to each file seperately. e.g. for (each file in a directory) do { some R calculation with the

Re: [R] iterating over files in a directory with R

2004-02-08 Thread Tom Blackwell
Try help(list.files), help(file.info), help(file), and look in the see also section in each of those help files for other functions which you may find useful for doing this. - tom blackwell - u michigan medical school - ann arbor - On Sun, 8 Feb 2004, femke wrote: Hello, I'm an R

Re: [R] iterating over files in a directory with R

2004-02-08 Thread Hadley Wickham
?list.files ?for Hadley femke wrote: Hello, I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically what I want to do is to iterate over many files and apply some R functions to each file seperately. e.g. for (each file in a

Re: [R] iterating over files in a directory with R

2004-02-08 Thread Duncan Murdoch
On Sun, 8 Feb 2004 16:07:44 -0500, you wrote: Hello, I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically what I want to do is to iterate over many files and apply some R functions to each file seperately. The apply() and

Re: [R] iterating over files in a directory with R

2004-02-08 Thread Thomas Lumley
On Sun, 8 Feb 2004, femke wrote: Hello, I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically what I want to do is to iterate over many files and apply some R functions to each file seperately. e.g. for (each file in a

Re: [R] iterating over files in a directory with R

2004-02-08 Thread Roger D. Peng
I usually do something like this: filelist - dir(path = .) ## files in current directory for(filename in filelist) { do.something(filename) } -roger femke wrote: Hello, I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically

[R] substitute, eval, quote and functions

2004-02-08 Thread David A. van Leeuwen
Hi, i am working with large data frames with many dependend variables. I want to write some functions that will allow me to quickly select variables from the frame and plot them in various colors depending on factor columns, possibly selecting rows according to factor conditions. In order

Re: [R] substitute, eval, quote and functions

2004-02-08 Thread Douglas Bates
David A. van Leeuwen [EMAIL PROTECTED] writes: Hi, i am working with large data frames with many dependend variables. I want to write some functions that will allow me to quickly select variables from the frame and plot them in various colors depending on factor columns, possibly

Re: [R] substitute, eval, quote and functions

2004-02-08 Thread Peter Dalgaard
Douglas Bates [EMAIL PROTECTED] writes: David A. van Leeuwen [EMAIL PROTECTED] writes: Hi, i am working with large data frames with many dependend variables. I want to write some functions that will allow me to quickly select variables from the frame and plot them in various colors

RE: [R] parsing numbers from a string

2004-02-08 Thread Liaw, Andy
Here's one possible way: xrange - scan(clipboard, what=) Read 7 items xrange [1] (0,74.4] (74.4,149] (149,223] (223,298] (298,372] (372,447] [7] (670,744] sapply(strsplit(substring(xrange, 2, nchar(xrange)-1), ,), as.numeric) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.0 74.4 149

[R] PhD student reading list, suggestions wanted

2004-02-08 Thread Richard A. O'Keefe
I've got a PhD student starting this year. She'll be working on data mining. She has asked for a reading list while she's still in her home country, which is a really good sign. Her cosupervisor and I don't (think we) have any problem with choosing things that are specifically about data mining,

[R] Can S-Plus packages be used in R without modification?

2004-02-08 Thread Alistair Campbell
Hi, I have had a quick search to see whether this question has been asked/answered before but haven't found anything directly related to it. Basically, I am wondering if I can run the packages, developed by Shafer for S-Plus, that allow multiple imputation of missing data - NORM, CAT, MIX, and

Re: [R] Can S-Plus packages be used in R without modification?

2004-02-08 Thread John Fox
Dear Alistair, All of Shafer's packages have been ported to R and are on CRAN. There are also some facilities for multiple imputation in the Hmisc package, and in the mice package -- not on CRAN, but available at http://www.multiple-imputation.com/. There are probably other multiple

RE: [R] PhD student reading list, suggestions wanted

2004-02-08 Thread Ko-Kang Kevin Wang
Hi, -Original Message- But above all, I would like her to use R whenever it's appropriate. We have MASS and Dalgaard's introductory book in the library here, I'm aware of S Poetry, but what do you think would be the best start for someone learning R in order to use it for doing data

RE: [R] parsing numbers from a string

2004-02-08 Thread Gabor Grothendieck
Try this: sapply( parse( text = chartr( (],, +, z ) ), eval ) / 2 chartr translates ( to space, ] to space and comma to +. Then the character strings are parsed and evaluated as R expressions. Finally, we divide by 2. --- Date: Sun, 8 Feb 2004 21:39:13 +0100 From: Jonne Zutt [EMAIL