[R] Hidden environment

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 2 09:36:27 CET 2011


On Tue, 1 Feb 2011, Joel wrote:

>
> Hi
>
> I wondering if its possible to make a hidden environment for a package, so
> the user cant see whats in it but the diffrent functions inside the package
> can use the variables in the environment.

Up to a point:

1) See the manual about the concept of a name space.

2) A package can also have one or more private environments, using 
new.env() or local(): grDevices is an example.

However, R is Open Source so a determined user can find such 
environments: hence 'the user cant see whats in it' (is your ' key 
broken?) is not really achievable.

> Hope you can understand what Im after.
>
> Joel

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list