Re: [Rd] how to store package options over sessions?

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Mon, 22 Nov 2010 11:20:16 -0500

I'm not sure why it was not mentioned do far, but the most obvious solution is to create a special object in the workspace (usually a hidden environment or a list - e.g. .myPackage.options.env). One advantage is that the user has full control over whether it should be save or not as it's tied to the workspace. On load the package can look for it and use it if it is what's expected (e.g., it may be worth using a specific class).

That said, in either case I think it's important to make it optional and document it well, because leaving files or objects around when not expected is impolite to say the least.

Cheers,
Simon

On Nov 20, 2010, at 11:12 AM, Mark Heckmann wrote:

> Hi,
> I posted this a week ago on r-help but did not get an answer. So I hope that someone here can help me:
> I want to define some options for my package the user may change.
> It would be convenient if the changes could be saved when terminating
> an R session and recovered automatically on the next package load.
>
> Is that possible and if yes, is the standard way to implement this?
>
> Thanks,
> Mark
>
> ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
> Mark Heckmann
> Dipl. Wirt.-Ing. cand. Psych.
> Celler Straίe 27
> 28205 Bremen
> Blog: www.markheckmann.de
> R-Blog: http://ryouready.wordpress.com
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 22 Nov 2010 - 16:27:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 22 Nov 2010 - 16:50:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive