Hi Dirk, The package-local environment is definitely a good approach (I use it myself an a few packages). And the options() are nice as they represent a standardised interface in R (Note to myself: I should use these more in my packages).
But unless I am missing something, these are not persistent between sessions? I assume, that is not an issue in your case? Cheers, Rainer > On 15 Jan 2020, at 23:47, Dirk Eddelbuettel <e...@debian.org> wrote: > > > Jonathan, > > In all but one (maybe two?) of my packages I found relying on options() > sufficient. I usually follow the somewhat-common pattern of creating a > package-local environment in R/init.R or R/zzz.R. I then fill it with values > reflecting options() (often under a tag starting with the package name) > and/or environment variables, and sometime also provide 'setters' to update > the environment values. That have proven to be both good enough and rather > robust and, as an added benefit, does not depend on anything further. > > Cheers, Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Orcid ID: 0000-0002-7490-0066 Department of Evolutionary Biology and Environmental Studies University of Zürich Office Y34-J-74 Winterthurerstrasse 190 8075 Zürich Switzerland Office: +41 (0)44 635 47 64 Cell: +41 (0)78 630 66 57 email: rainer.k...@uzh.ch rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel