Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

update R packages while R is running

Tags:

r

packages

I am thinking of having a site installation of R, with a shared library of R packages. Several computers would access this library so that everybody share the same setup.

The issue is that I have noticed that sometimes you cannot update the packages because another instance of R is locking the libs. I can't ask everybody to close its instance of R because there are sometimes long simulations.

Is there a set of best practice for site installation of R packages and is there a way to make R access its libs in read only mode?

like image 780
RockScience Avatar asked May 30 '11 09:05

RockScience


1 Answers

You must be talking about Windows, without mentioning it, because what you describe has already been working on Unix for many, many years.

A common solution is to have /usr/local/lib/R/site-library/ exported by NFS, and shared by many clients. I have set up solutions like this several times and it takes exactly zero additional effort from the R side.

like image 63
Dirk Eddelbuettel Avatar answered Sep 22 '22 02:09

Dirk Eddelbuettel