Open lshep opened 2 years ago
Hi Lori,
I think in general, .libPaths()[2]
the default installation packages should be untouched but I am not familiar with your use case.
For one off installations, you can use install.packages
install.packages("biocViews", repos = BiocManager::repositories(), lib = .libPaths()[2])
or set an R_LIBS_USER=/home/shepherd/R-Installs/bin/R-devel/library
environment variable so that the path is the only option.
When we check whether a package is up to date, we don't do it within each lib but across all libs as given by instPkgs <- install.packages()
. And then we pass the lib
argument to install.packages
. So another option is to modify the .libPaths()
but a bit cumbersome.
again -- i needed it to a specific path which I specified with lib but it wouldn't do it without a force =TRUE becasue it found it in a different lib
That's due to installed.packages
checking in all your .libPaths()
. If you want to restrict to one folder then a set up change with R_LIBS_USER
should work.
I'm not sure why you need it in the default R packages location but if you could explain, that would help.
A change considering lib
as an input would have to modify installed.packages
and other parts of the code and may be best resolved with setting the environment variable or modifying .libPaths()
. This is not a typical use case AFAICT.
Note. The other option is to remove the biocViews
installation in .libPaths()[1]
before installing in the other location.
its specific to the single package builder and certain packages required for the SPB to run correctly being installed in the default location. Again it seemed to me wrong to look in all libPaths if a specific one is identified and passed on. I agree this should be the default behavior but I would think that if I'm checking for a package in a specified libPath than the check would be restricted to that location too.
So I'm testing locally and I have an environment variable set up to specify a different installation path:
I need biocViews to be installed directly in the second location which it does not do because I assume its finding it in the first despite me explicitly asking for installation
Granted I can do a
force=TRUE
to get around this but it seems like the checking should be limited iflib
is given