Environment

Python

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/")