o.christensen@lancaster.ac.uk
2002-Feb-23 16:57 UTC
[Rd] bug in options() - help page (PR#1323)
Dear R-developers There is a discrepancy between the variables found by typing names(options()) and the variables described on the help page for the function ``options''. The following variables are in names(options()) but not described on the help page : "error.messages" "repositories" "show.coef.Pvalues" "help.try.all.packages" "download.info" "dvipscmd" Since options() is part of ``base R'' and the homepage claims that the options described there are the only options used by ``base R'', this may be considered as a bug. The following variables are described on the help page, but are not in names(options()): error show.error.messages download.file.method de.cellwidth internet.info I had a problem with the option ``show.error.messages'' which may be related to this option not being in names(options()) (I do not claim to understand how options() really work). Reporting and checking a problem with ``show.error.messages'' is actually confusing, since this option changes the printed output from errors. Here is the problem and my comments on the output (consider starting a fresh R session). stop("test - err. mess. printed ") ## prints error mesage, unless ``show.error.messages=FALSE'' op <- options() options(show.error.messages=FALSE) stop("test - err. mess. printed ") ## as expected, nothing is printed options(op) stop("test - err. mess. printed ") ## Reseting the options, we expect to see the print. Nothing is printed ! My temporary solution to the problem was to include options(show.error.messages=TRUE) in my .Rprofile file> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 4.1 year 2002 month 01 day 30 language R Cheers Ole -- Ole F. Christensen Department of Mathematics and Statistics Fylde College, Lancaster University Lancaster, LA1 4YF, England -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Much of this is not a bug. The situation is complex. The options list is dynamic: users can add new options at any time. Options need not be set, and which options are set depends on the platform. Many options if unset have an internal default: this is a protection against a damaged set of options, in particular a broken system Rprofile file. It is an incorrect assumption that setting the previous options returned does re-set the options: it only resets those that were previously set, not those set since. In many cases setting an option to NULL will unset it. There is at least one bug: download.info should not be set, it having been changed to internet.info (which has an internal default). On Sat, 23 Feb 2002 o.christensen@lancaster.ac.uk wrote:> Dear R-developers > > There is a discrepancy between the variables found by typing > names(options()) and the variables described on the help page for the > function ``options''. > > The following variables are in names(options()) but not described on the > help page : > > "error.messages" > "repositories" > "show.coef.Pvalues" > "help.try.all.packages" > "download.info" > "dvipscmd"Some options are documented where they are used: numbers 2 and 4 are, I know. I believe `error.messages' is obselete.> Since options() is part of ``base R'' and the homepage claims that the > options described there are the only options used by ``base R'', this > may be considered as a > bug.That claim is a bug, not least because ``base R'' is undefined!> The following variables are described on the help > page, but are not in names(options()): > > error > show.error.messages > download.file.method > de.cellwidth > internet.infoRight. They can be set if needed, but have internal defaults.> I had a problem with the option ``show.error.messages'' which may be > related to this option not being in names(options()) (I do not claim to > understand how options() really work). > Reporting and checking a problem with ``show.error.messages'' is > actually confusing, since this option changes the printed output from > errors. Here is the problem and my comments on the output (consider > starting a fresh R session). > > stop("test - err. mess. printed ") > ## prints error mesage, unless ``show.error.messages=FALSE'' > op <- options() > options(show.error.messages=FALSE) > stop("test - err. mess. printed ") > ## as expected, nothing is printed > options(op) > stop("test - err. mess. printed ") > ## Reseting the options, we expect to see the print. Nothing is printedThat does not `reset the options', nor is that what the help page example says it does (note the word `initial'). The same thing happens with options("error"). I'll add an explicit default for that one. -- Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
o.christensen@lancaster.ac.uk
2002-Feb-23 20:05 UTC
[Rd] bug in options() - help page (PR#1323)
Not all options listed on the help page for options() are set initially. This should be said on the help page. ripley@stats.ox.ac.uk wrote:> > Much of this is not a bug. The situation is complex. > > The options list is dynamic: users can add new options at any time. > Options need not be set, and which options are set depends on > the platform. Many options if unset have an internal default: this is a > protection against a damaged set of options, in particular a broken system > Rprofile file. > > It is an incorrect assumption that setting the previous options returned > does re-set the options: it only resets those that were previously set, > not those set since. > > In many cases setting an option to NULL will unset it. > > There is at least one bug: download.info should not be set, it having been > changed to internet.info (which has an internal default). > > On Sat, 23 Feb 2002 o.christensen@lancaster.ac.uk wrote: > > > Dear R-developers > > > > There is a discrepancy between the variables found by typing > > names(options()) and the variables described on the help page for the > > function ``options''. > > > > The following variables are in names(options()) but not described on the > > help page : > > > > "error.messages" > > "repositories" > > "show.coef.Pvalues" > > "help.try.all.packages" > > "download.info" > > "dvipscmd" > > Some options are documented where they are used: numbers 2 and 4 are, I > know. I believe `error.messages' is obselete. > > > Since options() is part of ``base R'' and the homepage claims that the > > options described there are the only options used by ``base R'', this > > may be considered as a > > bug. > > That claim is a bug, not least because ``base R'' is undefined! > > > The following variables are described on the help > > page, but are not in names(options()): > > > > error > > show.error.messages > > download.file.method > > de.cellwidth > > internet.info > > Right. They can be set if needed, but have internal defaults. > > > I had a problem with the option ``show.error.messages'' which may be > > related to this option not being in names(options()) (I do not claim to > > understand how options() really work). > > Reporting and checking a problem with ``show.error.messages'' is > > actually confusing, since this option changes the printed output from > > errors. Here is the problem and my comments on the output (consider > > starting a fresh R session). > > > > stop("test - err. mess. printed ") > > ## prints error mesage, unless ``show.error.messages=FALSE'' > > op <- options() > > options(show.error.messages=FALSE) > > stop("test - err. mess. printed ") > > ## as expected, nothing is printed > > options(op) > > stop("test - err. mess. printed ") > > ## Reseting the options, we expect to see the print. Nothing is printed > > That does not `reset the options', nor is that what the help page example > says it does (note the word `initial'). The same thing happens with > options("error"). > > I'll add an explicit default for that one. > > -- > Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- Ole F. Christensen Department of Mathematics and Statistics Fylde College, Lancaster University Lancaster, LA1 4YF, England -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Sat, 23 Feb 2002 o.christensen@lancaster.ac.uk wrote:> Not all options listed on the help page for options() are set initially. > This should be said on the help page.Is it said that they are? -- Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
maechler@stat.math.ethz.ch
2002-Mar-22 17:08 UTC
[Rd] bug in options() - help page (PR#1323)
>>>>> "BDR" == Brian D Ripley <ripley@stats.ox.ac.uk> writes:BDR> On Sat, 23 Feb 2002 o.christensen@lancaster.ac.uk BDR> wrote: >> Not all options listed on the help page for options() are >> set initially. This should be said on the help page. BDR> Is it said that they are? no, and of course you are right. but I still have added a short sentence in the details section. Closing this bug now. Martin -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._