[R] options$error

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue Jun 6 13:19:00 CEST 2000

On 6 Jun 2000, Peter Dalgaard BSA wrote:

> stefano <stecalza at tin.it> writes:
> > Hi all,
> > if I do, options(error=dump.frames) (pag. 185 S-programming) I get an

(That was optimistic: it does say it did not exist in R on that page.)

> > error message: error parameter invalid. Where I'm doing wrong?
> > I use R 1.0.1 on a Linux box (redhat 6.2).
> dump.frames is a function in R, options("error") is an expression. 
> Use   options(error=quote(dump.frames())) to get what you want.
> Hmmm... I wonder if we should rename dump.frames to dumpframes
> and set dump.frames <- quote(dumpframes()) to get the same syntax as
> in S ?

The difference is that in S options("error") is a function, and in R an
expression.  So the syntax would only be superficially the same, especially
as there is normally a need to dump to a file.  There are lots of examples
under help(debugger) / help(dump.frames), and help(options) did have a
cross-reference. (I've added a couple more.)

Questions to Stefano: where did you get the idea it would work, and had
you looked at the help pages?  Maybe there's a route we have missed.

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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list