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 -- Giovanni Petris <GPetris at uark.edu> Associate Professor Department of Mathematical Sciences University of Arkansas - Fayetteville, AR 72701 Ph: (479) 575-6324, 575-8630 (fax) http://definetti.uark.edu/~gpetris/
On Thu, Aug 25, 2011 at 3:25 PM, Giovanni Petris <gpetris@uark.edu> wrote:> 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? >library()$result[,1] returns the names of the installed packages. If you do this on one machine, then compare it with the same outpout on the other machine, you can identify the packages which are not installed, and you can install those. e.g.: x <- letters[1:10] y <- letters[5:20] lx[!(x %in% y)] returns "a" "b" "c" "d" which are in x, but not y. Hope this helps, Rainer returns the letters which are in> > Thank you in advance for the suggestions. > > Best, > Giovanni > > > -- > > Giovanni Petris <GPetris@uark.edu> > Associate Professor > Department of Mathematical Sciences > University of Arkansas - Fayetteville, AR 72701 > Ph: (479) 575-6324, 575-8630 (fax) > http://definetti.uark.edu/~gpetris/ > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug [[alternative HTML version deleted]]
On Thu, Aug 25, 2011 at 08:25:02AM -0500, Giovanni Petris wrote:> 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?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>