How to add default R user library path

Hi, can Exploratory use R packages installed in my default user library at ~/R/x86_64-pc-linux-gnu-library/3.3 (I’m on Ubuntu 16.10), so I don’t need to install multiple versions of the same packages?
Right now Exploratory can only see packages under ~/.exploratory/R/3.3/.

Only way so far is to modify .libPaths in my .Rprofile file:

# Add Exploratory libraries
.libPaths(c("~/.exploratory/R/3.3", .libPaths()))

and to move all Exploratory’s core libraries to their expected location at ~/.exploratory/R/3.3.

I think a better way would be for Exploratory init script to look for missing R packages and install them in ~/.exploratory/R/3.3 and then add this location to the top of the .libPaths() tree at run time.

I should be looking at the default location for R packages as well. So technically, if it can’t find a particular package under Exploratory’s repository then it will look for it at the default location.

What version of Exploratory are you using currently?

I installed Exploratory_2.5.1.2_LINUX.zip on Ubuntu 16.10. I checked the log files, and it seems to use .libPaths("~/.exploratory/R/3.3"), which overrides my default R library.

The command set the exploratory’s folder as the first place for R to look for the packages, but also R still looks for the default location for the packages when it can’t find it at the specified location.

By the way, the reason we have separated the location for R packages installation is that some of the packages have dependency with certain versions of the packages, so we needed to create an isolate (sandbox) location to make them work appropriately together.

Seems to me (at least on Linux R 3.3.1) that if you invoke .libPaths("~/.exploratory/R/3.3"), then that overrides all user library locations in the search path. Using .libPaths(c("~/.exploratory/R/3.3", .libPaths())) works and places exploratory packages at the top of the search path.