Creating Namespace and locking it during runtime?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating Namespace and locking it during runtime?

Rainer Krug-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I would like to create a Namespace during runtime, and not during
loading a package.

My reasoning is that I want to be able to store a number of variables
and to "protect them from the user" (might be even myself). The code
will not be in a package, but will be source()ed.

Next step: pass variables from org mode / emacs to R and to protect
these variables from accidental change / removal.

Any suggestions on how to do this?

Cheers,

Rainer


- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS4C+KAAoJENvXNx4PUvmCVZUIALEi/MfHuGEioPbSpw2TOmcx
lw5WCeGlsfQoWFPuX8XZOvc+bE0iv/qz5IuTjHbHrrgdV1Oz0k3ufvukPNhFKr51
r7k3dKJCC5xF0KMXV5sRZYgKc8VL6yGHkrZJw+JrZhmiHnDXiQ41LiPhcd920IU9
68eHMOQKeloiWADPPPseJ7VlWwtMTKOzDem3AdBVL5U3fOFPe8qWy/F/uwuuf6+B
NMEYA7z/JxK80Ud6X8sO/1gAiXZsNdzV4Q8i018LUE5mlO1NiAaB0VNKUCSEzAeM
FM3+9P99ijjaUhmAl58JYNMkYTcwxHFCOuDPaTvRG0h0JBvg3873AZTY4uLF1p0=
=GSUq
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Creating Namespace and locking it during runtime?

Prof Brian Ripley
See ?lockEnvironment, which ??lock shows as ?bindenv .

On 22/01/2014 20:52, Rainer M Krug wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I would like to create a Namespace during runtime, and not during
> loading a package.
>
> My reasoning is that I want to be able to store a number of variables
> and to "protect them from the user" (might be even myself). The code
> will not be in a package, but will be source()ed.
>
> Next step: pass variables from org mode / emacs to R and to protect
> these variables from accidental change / removal.
>
> Any suggestions on how to do this?
>
> Cheers,
>
> Rainer
>
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax :       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      [hidden email]
>
> Skype:      RMkrug
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJS4C+KAAoJENvXNx4PUvmCVZUIALEi/MfHuGEioPbSpw2TOmcx
> lw5WCeGlsfQoWFPuX8XZOvc+bE0iv/qz5IuTjHbHrrgdV1Oz0k3ufvukPNhFKr51
> r7k3dKJCC5xF0KMXV5sRZYgKc8VL6yGHkrZJw+JrZhmiHnDXiQ41LiPhcd920IU9
> 68eHMOQKeloiWADPPPseJ7VlWwtMTKOzDem3AdBVL5U3fOFPe8qWy/F/uwuuf6+B
> NMEYA7z/JxK80Ud6X8sO/1gAiXZsNdzV4Q8i018LUE5mlO1NiAaB0VNKUCSEzAeM
> FM3+9P99ijjaUhmAl58JYNMkYTcwxHFCOuDPaTvRG0h0JBvg3873AZTY4uLF1p0=
> =GSUq
> -----END PGP SIGNATURE-----
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Creating Namespace and locking it during runtime?

Rainer Krug-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks - looks very promising.

Rainer


On 01/23/14, 09:23 , Prof Brian Ripley wrote:

> See ?lockEnvironment, which ??lock shows as ?bindenv .
>
> On 22/01/2014 20:52, Rainer M Krug wrote: Hi
>
> I would like to create a Namespace during runtime, and not during
> loading a package.
>
> My reasoning is that I want to be able to store a number of
> variables and to "protect them from the user" (might be even
> myself). The code will not be in a package, but will be
> source()ed.
>
> Next step: pass variables from org mode / emacs to R and to
> protect these variables from accidental change / removal.
>
> Any suggestions on how to do this?
>
> Cheers,
>
> Rainer
>
>
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
>

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS4NyLAAoJENvXNx4PUvmCXyIH/2+SzGPuvHqBcWBrnRbZV1sV
nLa/NUKCgKq74fvDFbkCocOlVo6Cxkd5+r/FCQXpibiMUmgMyJTsABO1VkuPzNeT
ACXIwRKaci7/91el5OrvL1HBXcAWVdrYBXV6hO7mRqgp/Ait0G49L5rHekDjOhh0
9EJCi81pyzclnXpiu0IEjD2USVq3+VFKBxIiFTcMX6j8Lnzjud5cfVAhH0AOCqN0
asN+BCzNe43moKv1fxyYnSbXTflx56a6/cCWF+XEPpGTvJGhuaZ/WouvA8AledBt
/ViEraWKzvNIcWZAyCbV4aDK83Xu2EJel8cfiXuUUbp2dCZSce3pbifpYUQXqyg=
=FT1o
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel