Reputation: 1
i have two library path how can I override that via an argument to both install.packages() (from inside R) or R CMD INSTALL (outside R).
or override by setting the R_LIBS_USER variable.
Upvotes: 0
Views: 229
Reputation: 44788
The usual reason to end up with two libraries is that the system library is not writable when you install new packages.
So if you only want one path in .libPaths()
, always run with elevated permissions ("Run as administrator" on Windows, use sudo
on others) when you install packages.
It's probably a better idea not to install packages in the system library other than the base packages that come with R, because it's very easy to forget to change privileges, and then you can end up with two libraries again, and have one version of a package in the system library and a different version in the user library.
Upvotes: 1