Skip to content
Prev 295344 / 398502 Next

Is there an inverse function of Sys.getenv()

On 22.05.2012 20:48, Michael wrote:
You don't want to do that for all variables, not all of them are related 
to R, some related to other software products or even your OS (and hence 
perhaps important not to change them).


Anyway, to answer your question:

# get:
envVars <- Sys.getenv()
# set:
do.call(Sys.setenv, as.list(envVars))

Uwe Ligges