Skip to content
Prev 42424 / 398506 Next

Set values in namespaces

On Mon, 5 Jan 2004, Prof Brian Ripley wrote:

            
In which manuals do I have to look to learn more about namespaces, exports
and sealed environments? I`m not yet very familiar with this concepts.

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)
Well, I looked at grid sources, and found the piece of code you mentioned,
but wasn`t able to understand it fully.
As a work-around, I now use the function assignInNamespace() from R-devel,
which also works in R 1.8.1 if it`s pasted in the running R process.

Thanks,
Thomas Stabla