bash - Permanently change Rscript and R Sys.getenv("HOME") -
updated:
when open rstudio , enter sys.getenv("home"), get:
[1] "c:/users/clayton/documents" when open git-bash, , enter rscript -e "sys.getenv('home')" get:
"c:\\users\\clayton" this means rscript , r can't load packages command line. how can set rscript -e "sys.getenv('home')" permanently to:
"c:\\users\\clayton\\documents" as terrible solution copied of packages library folder works rscript home environment.
i have looked @ rscript: there no package called ...?, answers aren't making permanent change r or rscript. comments here showed me problem wasn't rscript "there no package". did not provide solution running rscript in command line , loading packages.
thank help.
in case has similar issue , wants concrete answer, solution worked:
create and/or open .bash_profile file. add line path r library:
export r_libs="c:/users/clayton/documents/r/win-library/3.3"
Comments
Post a Comment