[R] commandArgs() prints warnings to STDOUT - correction

Vadim Ogranovich vograno at arbitrade.com
Wed Feb 5 22:47:03 CET 2003

I realized that it is not commandArgs() rather R itslef that prints the
warning to the stdout (which is still not desirable of course):

$ R --no-save --no-restore --silent A < /dev/null 2> /dev/null
ARGUMENT 'A' __ignored__

=======original message below========

Dear R-Users,

I was glad to hear that there is an ongoing work to make R more easily
runnable as a batch. I'd like to raise two issues in this regards:

1. commandArgs() prints warnings to STDOUT rather than to STDERR, see
example below

$ cat foo.R
argv <- commandArgs()

$ R --no-save --no-restore --silent A < foo.R 2> /dev/null
ARGUMENT 'A' __ignored__
> argv <- commandArgs()

2. It should be possible to turn off echoing of R commands, the '>' lines
above. Please let me know if it is already there.

Thanks, Vadim

DISCLAIMER \ This e-mail, and any attachments thereto, is intend ... [[dropped]]

More information about the R-help mailing list