Re: [R] Official way to set/retrieve options in packages?

2013-10-18 Thread Jonathan Greenberg
Wanted to re-start this thread a bit, since I'm still not exactly sure the best approach to my problem -- basically, the parameters I'm try to make persistent are installation locations of a particular command line program that is not installed along with an R package I'm working on (GDAL, for

Re: [R] Official way to set/retrieve options in packages?

2013-10-18 Thread Bert Gunter
1. I do not recall saying any such thing. 2. HOWEVER, no matter. There is no choice. Follow Brian's advice. -- Bert On Fri, Oct 18, 2013 at 3:46 PM, Jonathan Greenberg j...@illinois.edu wrote: Wanted to re-start this thread a bit, since I'm still not exactly sure the best approach to my

Re: [R] Official way to set/retrieve options in packages?

2013-10-18 Thread Duncan Murdoch
On 13-10-18 6:46 PM, Jonathan Greenberg wrote: Wanted to re-start this thread a bit, since I'm still not exactly sure the best approach to my problem -- basically, the parameters I'm try to make persistent are installation locations of a particular command line program that is not installed

Re: [R] Official way to set/retrieve options in packages?

2013-06-02 Thread Jonathan Greenberg
What would be an example of setting, saving, and re-loading an option to a user's .Rprofile -- and would this be a no-no in a CRAN package? --j On Sat, Jun 1, 2013 at 4:57 PM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: On 01/06/2013 22:44, Anthony Damico wrote: hope this helps.. :)

Re: [R] Official way to set/retrieve options in packages?

2013-06-02 Thread Bert Gunter
Have you read ?Startup which explains startup procedures, including reading of .Rprofile. I cannot speak for Brian Ripley, but I can tell you that I would prefer that packages did not mess with my .Rprofile files. OTOH, I have no objections if packages suggest that I set certain options in

[R] Official way to set/retrieve options in packages?

2013-06-01 Thread Jonathan Greenberg
R-helpers: Say I'm developing a package that has a set of user-definable options that I would like to be persistent across R-invocations (they are saved someplace). Of course, I can create a little text file to be written/read, but I was wondering if there is an officially sanctioned way to do

Re: [R] Official way to set/retrieve options in packages?

2013-06-01 Thread Anthony Damico
hope this helps.. :) # define an object `x` x - list( any value here , 10 ) # set `myoption` to that object options( myoption = x ) # retrieve it later (perhaps within a function elsewhere in the package) ( y - getOption( myoption ) ) it's nice to name your options

Re: [R] Official way to set/retrieve options in packages?

2013-06-01 Thread Prof Brian Ripley
On 01/06/2013 22:44, Anthony Damico wrote: hope this helps.. :) # define an object `x` x - list( any value here , 10 ) # set `myoption` to that object options( myoption = x ) # retrieve it later (perhaps within a function elsewhere in the package) ( y -