It is the shell that does the ~ and $ expansions, and Sys.setenv() doesn't go
via the shell, so you cannot expect it to understand the shell metacharacters.
Instead, you need to do the corresponding computations in R, e.g.
> paste(path.expand("~/mypath"), Sys.getenv("PATH"), sep=":")
[1]
"/Use
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