[Rd] creating namespaces outside packages
    Duncan Murdoch 
    murdoch.duncan at gmail.com
       
    Fri Mar 28 12:58:56 CET 2014
    
    
  
On 28/03/2014, 7:01 AM, Rainer M Krug wrote:
> Hi
>
> I would like to use namespaces outside packages, but I could not find
> any references on how to do it (only a thread [1] which says "use a
> package"). Using a package is not possible in my case, as I am passing
> variables from org-mode / emacs to R and would like to avoid name
> clashes. This is a dynamic process, and each time the code is evaluated,
> the variable can be different.
>
> I am putting them at the moment into an environment which is locked, but
> I would like to avoid name clashes, so the idea of using environments.
>
> So: is there a way to create a namespace and populate it as I can do
> with an environment?
I don't know what you think is the difference between a namespace and an 
environment.  I would say a namespace is one of the environments 
associated with a package, i.e. it's just an environment in a particular 
context.
So depending on what you are trying to accomplish, it may be fine to 
just set up an environment.  Why do you think that won't work?
Duncan Murdoch
    
    
More information about the R-devel
mailing list