[R] calling R from cmd line, loading in data sets on the call

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 28 11:30:13 CET 2006


On Tue, 28 Nov 2006, Barry Rowlingson wrote:

> Matt Anthony wrote:
>
>> Rcmd myprogram.R  is clearly documented as unable to take parameters
>> passed to it ...
>>
>
>  It can take parameters from the environment though...
>
>
>  H:\> set METHOD=loglik
>  H:\> "c:\Program Files\R\R-2.2.1\bin\R"
>
> blah blah
>
>  > Sys.getenv("METHOD")
>    METHOD
>  "loglik"
>  >

Actually, R can take parameters from the command line (and Rcmd is 
'clearly documented' not to run R code so 'Rcmd myprogram.R' cannot work). 
This was discussed here only a few days ago:

https://stat.ethz.ch/pipermail/r-help/2006-November/118073.html


-- 
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



More information about the R-help mailing list