"non-deletable" varibles like in packages but during runtime?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

"non-deletable" varibles like in packages but during runtime?

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

Hi

I have a script, in which I want to "lock" certain variables, so that
they can not accidentally be deleted.
I was thinking about a mechanism similar to packages, so that I can
re-define the variable in a different namespace, but it is still
available in the original one, but only during runtime.

Is it possible, to do this? I think namespaces and environments are
the right approach for this, but I would need some pointers on how to
do it.

Second reaon why I would like to be able to do this: I am using org
mode, and I can pass variables from org-mode to R. But these are
"normal" variables, so that I can overwrite them and delete them, and
they are gone. I would like to have a mechanism so that the original
value would always be available.

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/

iQEcBAEBAgAGBQJS3SnWAAoJENvXNx4PUvmCSXcIAOHT4FbC5l7zWMqaV//ZaQOM
dz68bAlRLCws7ydCjn3KPlQUuri8wD1nJPnXbhd89sirgbBXDoYYzZRIgmor4Ff9
oE221kv9jeVc3qrHmDA+yeKZQmn0WcG2Jz51wulD0iTYgaNAH53qVcHqTrV3DCdu
qUzxupvyb0WvKMHIGvrY1LSiKAI8PxniqGgaV1AtjeV4cChhOqilwgXIhosYM5uA
Qs8DCMQlv6dkHerw0Pu7re0aDeO4atZPGx347jRIVRTQmchWfUVPxQLUs1GzPQAl
DOasGV6C3iUJzSIIlrsoeX3leDSpXlaF21LGKpT0/6maRR61bHLHc1jsINvBH1Q=
=uA+8
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.