Re: [Rd] setting global options for a package

2012-05-10 Thread Duncan Murdoch
On 10/05/2012 1:53 PM, Duncan Temple Lang wrote: Or slightly more conveniently, use the default value of getOption() to return the vector of color names if the option is not set, e.g. foo<- function(x, heplot.colors = getOption("heplot.colors",

Re: [Rd] setting global options for a package

2012-05-10 Thread Duncan Temple Lang
Or slightly more conveniently, use the default value of getOption() to return the vector of color names if the option is not set, e.g. foo <- function(x, heplot.colors = getOption("heplot.colors", c("red", "blue", "black", "darkgreen", "brown", "d

Re: [Rd] setting global options for a package

2012-05-10 Thread Simon Urbanek
On May 10, 2012, at 9:59 AM, Michael Friendly wrote: > This may be elementary, but I can't find an answer: How can I set up global > options for > some specific arguments to functions in a package which can be easily changed > by the user? > > This question relates to the selection of colors u

Re: [Rd] setting global options for a package

2012-05-10 Thread Kevin Wright
Have you considered the lattice package? The defaults can be accessed/changed via trellis.par.get(), but also passed as arguments into the functions. Kevin On Thu, May 10, 2012 at 8:59 AM, Michael Friendly wrote: > This may be elementary, but I can't find an answer: How can I set up global > o

[Rd] setting global options for a package

2012-05-10 Thread Michael Friendly
This may be elementary, but I can't find an answer: How can I set up global options for some specific arguments to functions in a package which can be easily changed by the user? This question relates to the selection of colors used in functions in several packages (heplots, genridge), where I