[Rd] Re: [R] early R messages to stdout
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jun 10 12:59:58 MEST 2003
No patch was included in the distributed message. Moved to R-devel, as
this is not a help question.
On Sun, 8 Jun 2003, John Zedlewski wrote:
> Hi,
> I have an R script that takes its input in the form of command-line
> parameters. It works fine, but R complains about every unknown arg with the
> "ARGUMENT %s ignored" message, and this goes to stdout instead of stderr
> because R_ConsoleFile isn't set yet. Is it really necessary to process all
> command line args before setting R_ConsoleFile? It seems that only Aqua
> systems care about their arguments when choosing the console file.
This is not what is intended. R_ShowMessage should be showing messages
in a suitable way: for console-based systems that should probably be an
alert box. By not having R_ConsoleFile set R_WriteConsole is used.
I don't think you can assume that all users of that code will have a
stderr.
> I've attached a diff (against 1.7.0) that fixes this issue, so that non-Aqua
> unix folks can redirect stderr to /dev/null and not have to worry about those
> annoying argument ignored errors anymore.
NO! That also redirects all the R warnings and errors to /dev/null, and
is definitely undesirable.
If you find the warnings (*not* errors) annoying, don't misuse R by
supplying incorrect arguments. Use e.g. environment variables to pass
your input.
--
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-devel
mailing list