Benjamin.STABLER@odot.state.or.us
2004-Mar-10 02:46 UTC
[R] Rcmd BATCH command line arguments
I want to run Rcmd BATCH with R_DEFAULT_PACKAGE=base so it doesn't load any packages, but it seems to reject this argument because it does not start with a '-' or '--'. Is there a different argument that will work? Thanks. Benjamin Stabler Transportation Planning Analysis Unit Oregon Department of Transportation 555 13th Street NE, Suite 2 Salem, OR 97301 Ph: 503-986-4104
On Tue, 9 Mar 2004 Benjamin.STABLER at odot.state.or.us wrote:> I want to run Rcmd BATCH with R_DEFAULT_PACKAGE=base so it doesn't load any > packages, but it seems to reject this argument because it does not start > with a '-' or '--'. Is there a different argument that will work? Thanks.It is not a command-line argument! In Rterm.exe you can set environment variables this way, but not in Rcmd.exe. So set the environment variable R_DEFAULT_PACKAGE>S< to NULL, not base which is always loaded. See ?Startup for the documentation (which is correct) and the rw-FAQ for how to set environment variables. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Benjamin.STABLER@odot.state.or.us
2004-Mar-10 16:29 UTC
[R] Rcmd BATCH command line arguments
Okay, thanks. But it seems inconsistent that Rterm and Rgui support setting environment variables this way while Rcmd does not. Also, I don't think the rw-FAQ is all that helpful on this issue. It says: Environment variables can be set in R in three different ways. 1. On the command line as name=value pairs. For example in the shortcut to `RGui' you could have path_to_R\bin\Rgui.exe HOME=p:/ R_LIBS=p:/myRlib 2. In an environment file .......... It would be clearer if point one said that it only applies to Rterm and Rgui but not Rcmd. Ben Stabler>-----Original Message----- >From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] >Sent: Tuesday, March 09, 2004 11:49 PM >To: STABLER Benjamin >Cc: r-help at stat.math.ethz.ch >Subject: Re: [R] Rcmd BATCH command line arguments > > >On Tue, 9 Mar 2004 Benjamin.STABLER at odot.state.or.us wrote: > >> I want to run Rcmd BATCH with R_DEFAULT_PACKAGE=base so it >doesn't load any >> packages, but it seems to reject this argument because it >does not start >> with a '-' or '--'. Is there a different argument that will >work? Thanks. > >It is not a command-line argument! In Rterm.exe you can set >environment >variables this way, but not in Rcmd.exe. So set the >environment variable >R_DEFAULT_PACKAGE>S< to NULL, not base which is always loaded. See >?Startup for the documentation (which is correct) and the >rw-FAQ for how >to set environment variables. > >-- >Brian D. Ripley, ripley at stats.ox.ac.uk >Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >University of Oxford, Tel: +44 1865 272861 (self) >1 South Parks Road, +44 1865 272866 (PA) >Oxford OX1 3TG, UK Fax: +44 1865 272595 >