« Graphing real-time foreclosure data: Data Mashups in R | Main | Converting an infographic to information: Calorie Chart »

June 24, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010534b1db25970b011571529e19970b

Listed below are links to weblogs that reference Running scripts with R CMD BATCH:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Thanks for this! With these instructions I was finally able to get started with R in command line mode!
Steve

That's great, really appreciate your help. save me lot of time to investigate how to run R in Java, many thanks.:)

Some comments about your list of differences between Revo and R:
* in UNIX world: stdin is 0, stdout is 1, stderr is 2; so, if you are already redirecting command output to a file and would like to append the errors into it, add 2>&1 to your command. Ex: mycmd >outfile 2>&1
BUT, because R CMD BATCH is already appending stderr to stdout in its output, it is not necessary here.
* argument --no-timing will prevent the call to proc.time()

Does anyone know how to get Revo to pick the 64 bit version of the engine in command mode. When I use Revo CMd BATCH, I see that the Rterm*32 is running.

I think you will need to specify the path to C:\Revolution\R-Enterprise-4.3\R-2.12.2\bin\x64 on your command line, e.g:

C:\Revolution\R-Enterprise-4.3\R-2.12.2\bin\x64\Rcmd BATCH C:\mybatchtest.R C:\mybatchtest.out

or:

C:\\Revolution\R-Enterprise-4.3\R-2.12.2\bin\x64\Rterm.exe --no-restore --no-save < C:\mybatchtest.R > C:\lmbatchtest.out 2>&1


Thanks, this did it for me!!

C:\\Revolution\R-Enterprise-4.3\R-2.12.2\bin\x64\Rterm.exe --no-restore --no-save --args "nsim.matrix=37; Nsim=25; which.est=1; which.sim=1" < sim33c.R > sim37.Rout 2>&1

This is great. Have you ever looked at creating image output? For example, could we do something like this?

Revo < createPlot.R > myplot.png

Hi John,

If your goal is to be able to specify an output file name from the command line (to customize behavior of a script), one way is like this:

Revo createplot.R --args myplot.png

and in the createplot.R script use commandArgs(trailingOnly=FALSE) to access the specified output file name (here myplot.png).

You might also want to take a look at littler.

I have a question, is there anyway i can make php run a R commands file on windows ? it is essential that whenever i run a php script in starts R and processes this R text file..

Thank you very much!

How do you do this if you are working with a remote server? How you "send" your code to the R on the server? Do you run your code on the server, then save it there?

I figured it out. Thanks!

Dear sir,
I am using PennCNV package for CNV analysis.
Here I am using visualize_cnv .pl for JPG output file. I have installed R in my system, and in Environmental variable I have putted the path C:\Rtools\gcc-4.6.3\bin;C:\Program Files\R\R-2.15.2\bin\x64; and I am running the command
visualize_cnv.pl -format plot -signal offspring.txt ex1.rawcnv
and I am getting the error:cannot execute system command R CMD BATCH.
How can I resolve the error.

Is it possible to customize the prompt (data input) from the actual output in the console?
We would like to have a visual differentiation between what we input and the results (output).

The comments to this entry are closed.


R for the Enterprise

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid

Search Revolutions Blog