Hi all, I would like to know if there is any way to evaluate the values in `Sys.setenv` before setting the environment variables. For example, if we want to add a path to the environment variable `PATH`, we can do this in a terminal
``` > export PATH=~/mypath:$PATH > echo $PATH /Users/jeff/mypath:... ``` However, this style of assignment is not allowed in `Sys.setenv`, it treats its argument as a literal string, so ``` > Sys.setenv(PATH= " ~/mypath:$PATH") > Sys.getenv("PATH") [1] " ~/mypath:$PATH " ``` Note that both the symbol `~` and the variable `$PATH` are not expanded. While we can manually evaluate the home symbol `~` and PATH using `Sys.getenv`, the code seems not quite neat. I would like to suggest adding a parameter in ` Sys.setenv` to make the function more convenient(e.g. Sys.setenv(..., fixed = TRUE)) if no existing function in base R can do them in one line. Best, Jiefei [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel