R: Updating .libPaths() on Ubuntu -
i trying follow advice here & here, update location r looks installed packages. have updated variable .library.site
in /etc/r/rprofile.site
file include location of intended r package library directory:
sys.setenv(".library.site" = "~/appdata/r/x86_64-pc-linux-gnu-library/")
however, when start r, , .libpaths()
location not appended list of library locations. why?
three answers:
your approach wrong.
.libpath()
r function, not environment variable. above above cannot work.per consensus (some members of) r core, have been setting path 3 location since circa 2003 debian / ubuntu. done below
/etc/r/
, saw it.the easiest set per-user directory via
r_libs_user
typically comment-out users on machine have consistent paths. can set either in globalrenviron
, or in globalrenviron.site
(better) or in~/.renviron
(probably best). viar_libs_user="~/appdata/r/x86_64-pc-linux-gnu-library/"
.
Comments
Post a Comment