Displaying 1 result from an estimated 1 matches for "pkgoption".
Did you mean:
pkgoptions
2004 Dec 14
1
Multiple options for a package
...e options is the couple:
options(par=value) and getOption("par")
I was aking myselft what would be the "better" strategy to handle a bunch
of options for a package.
I ended up with the idea of storing a list, as my options would also be
classified, with something like:
--
MyPkgOptions =
list(set1=list(par1=1,par2=2),set2=list(subset1=list(par1=11,par2=22),subset2=list(par1=111,par2=222)))
options(PkgName=MyPkgOptions)
--
Then, to make easier the access to an element, I tweaked a little bit
getOption, with the following version:
--
getOption <- function(x,...)
{
op = o...