[R] Help with arguments in .Script

Veronesi, Fabio f.veronesi at cranfield.ac.uk
Sat Dec 19 12:24:25 CET 2009


Dear R users,
my problem, at the moment, is the following:
I need to apply a script to a very big dataset, so I need first to subdivide the dataset into samples and then apply the script to every single sample.
Now I tried to solve the problem with these linest:

S00001<-data[data$sub==1,1:3]         #which divide the dataset in samples based on the number on the column "sub"
data<-S00001                                         #because in the script the dataset is always called "data"
.Script("R",script.R,args=data,write.csv(table,c:\table.csv)

With the last line I basically want to run the script ("script.R), with the created dataset and, at the end of the script, I need to write the table, created inside the script, in a csv file.
Obviously it does not work.
Do you have some suggestion to solve a problem like this?

Many thankls,

Fabio



More information about the R-help mailing list