Skip to content

Synchronizing R libraries on N machines?

7 messages · Rainer M Krug, Giovanni Petris, Iain Gallagher +1 more

#
Hello!

I am using R on two different machines (under Ubuntu and OS X, but this
is probably irrelevant) and I would like to keep the two installations
'synchronized', in particular in terms of installed packages. For
example, if I install package xxx on my Linux machine, I would like to
find it installed also on my Mac, and vice versa. 

I imagine this to be a fairly common problem, so I would like to ask if
anybody has suggestions to share about it. Is there a way to make the
synchronization automatic? Painless?

Thank you in advance for the suggestions.

Best,
Giovanni
#
Hi Rainer,

This certainly helps, but it still requires to do some work by hand. I
was hoping for something more automatic - but so far nobody has
suggested a better approach.

Thank you,
Giovanni
On Thu, 2011-08-25 at 15:43 +0200, Rainer M Krug wrote:
#
Hi Giovanni

Using Ubuntu and MacOSX may not be irrelevant. I use Ubuntu and if I carry out a fresh install (e.g. after a new release - although I've stuck with 10.04 so far) then I always have to mess around, check the web etc to install external packages that R libraries I want to use rely on. 

A good example would be libxml2-dev (which doesn't appear if you use Synaptic and search for xml2 - sigh) for using biomaRt etc etc.

Just a heads up that the external software some R libraries rely on might not be installed on both systems. So installing a package on one system sucessfully doesn't mean you can alway expect it to install without incident on another.

Best

iain
--- On Fri, 26/8/11, Giovanni Petris <gpetris at uark.edu> wrote:

            
#
On Thu, Aug 25, 2011 at 08:25:02AM -0500, Giovanni Petris wrote:
I have a number of machines in a home LAN that share /usr/local where
I have all but a few R-packages that are automatically installed by
the OS package-mangagement system (by installing the meta package
r-recommended).

I have the following snippet in my .Rprofile

lib.loc = "/usr/local/lib/R/site-library/"

so whenever a package is installed, all machines have access to it.

This will of course not work if the machines are running different
OS:es, so that is not irrelevant.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110826/234d333a/attachment.bin>