Skip to content
Back to formatted view

Raw Message

Message-ID: <c7727364-0ced-fbd0-34df-c4c2d00211d2@auckland.ac.nz>
Date: 2018-09-06T23:05:19Z
From: Rolf Turner
Subject: [R-pkg-devel]  [FORGED] Re: Recommendations about adding options to a package in order to change default values of some functions on-the-fly
In-Reply-To: <CAERMt4ePanLPbs5xoBCJO-3euD=+g_Cj8o5V=2X12WiNz=GYLA@mail.gmail.com>

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