[R] Set values in namespaces

Simon Fear Simon.Fear at synequanon.com
Mon Jan 5 16:58:58 CET 2004

Digressing somewhat from the namespace discussion, and
focussing on

> I want to be able to change the values, so that the user of 
> the package
> can control in some way how some of the functions in the 
> package will work.
> "useless" example:
> mypackage::username = "Thomas"
> mypackage::printusername = function() print(username)

you might instead just put this info into a list perhaps called
mypackageOptions, which would allow the user to change 
things such as mypackageOptions$username <- "Simon", or
you could even write a friendlier wrapper (like options itself).

I realise this is not as beautiful as you are trying to achieve, but 
it's there if you need a quick fix.  
Simon Fear 
Senior Statistician 
Syne qua non Ltd 
Tel: +44 (0) 1379 644449 
Fax: +44 (0) 1379 644445 
email: Simon.Fear at synequanon.com 
web: http://www.synequanon.com 
Number of attachments included with this message: 0 
This message (and any associated files) is confidential and\...{{dropped}}

More information about the R-help mailing list