Skip to content
Prev 47930 / 63424 Next

SOLVED: creating namespaces outside packages

Duncan Murdoch <murdoch.duncan at gmail.com> writes:
An environment is what I use at the moment, but there is one aspect I
was not happy with: accessing the original value in the environment when
it is overwritten in a higher environment in the search path. But then I
discovered then notation of using $:

,----
| env <- new.env()
| assign("value", 99, env)
| attach(env)
| value <- FALSE
| value
| env$value
`----

So I can access the original value. I only thought initially about
the :: (or is it :::) to access the objects in a namespace, which do not
work for an environment.

So: Different solution and works perfectly.

Thanks,

Rainer