Updated:
When I open RStudio and enter Sys.getenv("HOME")
, I get:
[1] "C:/Users/Clayton/Documents"
When I open git-bash, and enter Rscript -e "Sys.getenv('Home')"
I get:
"C:\\Users\\Clayton"
This means Rscript
and R
can't load my packages from the command line. How can I set my Rscript -e "Sys.getenv('HOME')"
permanently to:
"C:\\Users\\Clayton\\Documents"
As a very terrible solution I copied all of my packages into another library folder that works with the Rscript
home environment.
I have looked at Rscript: There is no package called ...?, but the answers aren't for making permanent change to R
or Rscript
. The comments here showed me what my problem wasn't Rscript "there is no package". This also did not provide a solution Running Rscript in command line and loading packages.
Thank you for any help.