[R-pkg-devel] [FORGED] Re: Recommendations about adding options to a package in order to change default values of some functions on-the-fly

Rolf Turner r@turner @ending from @uckl@nd@@c@nz
Fri Sep 7 01:05:19 CEST 2018


On 09/07/2018 04:15 AM, Alexandre Courtiol wrote:

<SNIP>

> you could:
> 
> 1. directly write and then read elements in the (hidden) list .Options that
> is present in the global environment:

<SNIP>

Point of order Mr. Chairman (and I'm pretty sure it doesn't matter a 
damn) but (on my system at least) .Options is created in the *base* 
package, not in the global environment.

E.g.:

# Freshly started R session.
 > find(".Options")
[1] "package:base"
 > options(mung="gorp")
 > find(".Options")
[1] "package:base"
 > options("mung")
$mung
[1] "gorp"
 > .Options$mung
[1] "gorp"

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-package-devel mailing list