I am running Mac OS High Sierra with RStudio.
I want to export a terminal set variable to RStudio, but echo and getenv currently show no output:
In terminal:
export testexpvar="testworks"
###I can echo in the terminal
echo $testexpvar
testworks
In RStudio console:
###I can't echo in R:
system("echo $testexpvar") ### no output at all
Sys.getenv("testexpvar")
[1] ""