On Thu, 23 Nov 2006, Ramon Diaz-Uriarte wrote:

> On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote:
>> Try this:
>>
>> gannet% cat month.R
>> x <- commandArgs()
>> print(x[length(x)])
>>
>> gannet% R --slave --args January < month.R
>> [1] "January"
>
> Is the above
> "R --slave --args January < month.R"
> the preferred way of using it?

Yes it is.  That's exactly what --args was added to allow.

> I tend to use
>
> "R --slave < month.R January"
>
> instead (as a consequence of reconverting former scripts that used R CMD
> BATCH). The second call produces a "ARGUMENT 'January' __ignored__" but
> otherwise seems to do the same thing.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to