I have in my ".zshenv" file:
R_LIBS="$HOME/.local/share/R/libs"
When I do 'echo "$R_LIBS"' in my terminal, I get "/home/<myuser>/.local/share/R/libs" echoed back. But when I launch R and do 'Sys.getenv("R_LIBS")' from the terminal with the zsh shell, I get an empty string. In fact none of the variables set in my ".zshenv" file are detected in R. The R process doesn't detect my local library, which is an issue because that's where all my R packages are.
If I drop into bash, launch R, and run the same commands, the environment variables are listed like I would expect them to be. Any idea why environment variables would show up in bash but not in zsh?
]]>