From ggrothendieck at gmail.com  Sat Nov  1 02:20:29 2014
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Fri, 31 Oct 2014 21:20:29 -0400
Subject: [Rd] Options that are local to the package that sets them
In-Reply-To: <CABtg=Knpvsx5SSFaDyS+bDmSHpNqXn8Hj2zEWgz1-5UiRd-2bA@mail.gmail.com>
References: <CABtg=KmCrX1G3K8BxdeJsHvMpMhwoscZ0ExY4_ga9614oYB=KQ@mail.gmail.com>
	<CAP01uR=gS6Zr_QxHjnzCkydRqyZgo2Faoin56ugDoNtPpu4ivA@mail.gmail.com>
	<CABtg=Knpvsx5SSFaDyS+bDmSHpNqXn8Hj2zEWgz1-5UiRd-2bA@mail.gmail.com>
Message-ID: <CAP01uRmKvVjtzbsL+Afn5bXm-uZ50vXHTZZ+yzE4OS1ooiJuuQ@mail.gmail.com>

On Fri, Oct 31, 2014 at 8:43 PM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:
> On Fri, Oct 31, 2014 at 8:10 PM, Gabor Grothendieck
> <ggrothendieck at gmail.com> wrote:
> [...]
>>> Is there a better way? I have a feeling that this is already supported
>>> somehow, I just can't find out how.
>>>
>>
>> Try the settings package.
>
> I could, but I don't see how it would solve my problem.
> https://github.com/markvanderloo/settings/issues/1

Isn't your problem really just that you want multiple sets of
settings?  That's what settings provides.

pkgA would provide a class whose instances are created by the clients.
Assuming you wrap this in a function create:

inst1 <- create(a = 1, b = 2)

where create sets up a settings object and does anything else
returning the handle inst1.

When you want to do something you would pass the instance to the
function or method that actually carries it out.  This could be done
with any OO system in R without settings but if you are looking for an
options type interface which I thought you were then you might be able
to leverage that package.




-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



[Rd] Options that are local to the package that sets them
Gabor Grothendieck