Hi there,
I've just started using a system-wide installation of R, instead of installing R myself. This is on a system where I don't have root privileges. I am specifying R_LIBS_USER so I can install/update packages for myself without bothering our sysadmin person too often. This seems to work OK so far. I'm a bit confused about updating packages, though. I'll explain my confusion below:
The usual command
source('http://bioconductor.org/biocLite.R')
biocLite()
puts updated versions of all packages into the place I specify using R_LIBS_USER, so that's great. My packages are in /fh/fast/malik_h/grp/malik_lab_shared/linux_gizmo/R_packages and the packages our sysadmin guy installs are in /app/R/3.2.1/lib/R/library. .libPaths() output looks like this:
[1] "/fh/fast/malik_h/grp/malik_lab_shared/linux_gizmo/R_packages"
[2] "/app/R/3.2.1/lib/R/library"
When I load a package, I get the newer version that's in .libPaths()[1] over the older version that's in .libPaths()[2]. So far so good.
My only issue is that when I next run biocLite() it tries to update packages for that I just updated a minute ago - these are packages for which a current version exists in .libPaths()[1] but an old version exists in .libPaths()[2]. This is not so useful and is a little time-consuming.
I've got a partial answer - I figured out that I can do this: biocLite(lib.loc=.libPaths()[1])
and now I only update packages that are out-of-date in .libPaths()[1]. That's OK, but let's say in a month's time I want to make sure all packages I'm loading are current. So, what I'd like to do is this: rather than listing any package found in any element of .libPaths() that's out-of-date, and getting the new version, I'd like to list any package for which the version that will actually be loaded is out-of-date, and only update those. I.e. for packages that are present in both .libPaths()[1] and .libPaths()[2], only check the one in .libPaths()[1] against the repository version, but for packages that are present only in .libPaths()[2], also check that one.
Does that question make sense? Is there any way to do what I want to do?
thanks very much,
Janet