Posts Tagged ‘ scripts ’

Execute system commands within an R Script

August 23, 2007
By
Execute system commands within an R Script

To execute a system command from within an R script, just use system(). This is handy for zipping large output files on the fly.write.csv(mydat, "mydat.csv")system("gzip mydat.csv", wait=FALSE)

Read more »

Including arguments in R CMD BATCH mode

August 16, 2007
By
Including arguments in R CMD BATCH mode

When you have multiple computers or processors at your disposal and wish to run the same script with different arguments, use the following at the command line (here described for Linux; remove the linebreak, it is just there for display purposes):$ R ...

Read more »

Sponsors