Rainer M Krug
2014-Jan-20 13:51 UTC
[R] "non-deletable" varibles like in packages but during runtime?
-----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: Rainer at krugs.de 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-----