Environment
How to get and set environment variables in R?
How to get and set environment variables in R?
# get HOME directory
Sys.getenv("HOME")
[1] "/home/myname"
# set HOME directory
Sys.setenv("HOME"="/home/user/my/new/home/directory/")
# get HOME directory
Sys.getenv("HOME")
[1] "/home/myname"
# set HOME directory
Sys.setenv("HOME"="/home/user/my/new/home/directory/")