[R-sig-Debian] running R in batch mode on Ubuntu

Dirk Eddelbuettel edd at debian.org
Fri Aug 16 18:50:16 CEST 2013


On 16 August 2013 at 12:45, Elizabeth Tighe wrote:
| 
| So, I'm submitting R 3.0.1 jobs on Ubuntu (13.04) using 'R CMD BATCH 
| --no-save filename.R &'  (have an alias set to subr='R CMD BATCH --no-save")
| 
| and am having a problem of sometimes the process ending without the R 
| commands contained in the batch file actually having finished running.
| 
| We're running Bayesian models using R2jags jags.parallel and it ends 
| during the jags run, so it might be something funky with that package, 
| but am curious to know if the general issue of R process ending 
| unceremoniously is anything anyone has run into.

Use either littler ("sudo apt-get install littler") which we wrote for 
this purpose, or else use Rscript (which came a little later, but now comes
with R).

There are also packages for parsing command-line arguments, so you can really
create scripts '#!/usr/bin/r' with all the glory.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Debian mailing list