-1

How to install the same package on more than 1 machine (work and home etc.)?

David Arenburg
  • 91,361
  • 17
  • 137
  • 196
sgdata
  • 2,543
  • 1
  • 19
  • 44
  • 1
    Relevant post: [Elegant way to check for missing packages and install them?](http://stackoverflow.com/questions/4090169) – zx8754 Jan 05 '17 at 15:53

1 Answers1

4

Exporting all packages from R / Rstudio etc using an R data dump file:

ip <- as.data.frame(installed.packages())
dump("ip","ip.Rdmpd")

From here send the dump file to the new computer and read into R or Rstudio etc, whatever your preference is and then wait will all packages download and install from CRAN:

setwd("/path/to/dumpfile")
source("ip.Rdmpd")
install.packages(ip$Package)
David Arenburg
  • 91,361
  • 17
  • 137
  • 196
sgdata
  • 2,543
  • 1
  • 19
  • 44
  • 2
    SO is a Q/A site. So in future, please post questions in the questions section, while answers in the answer section- not both in the same place. – David Arenburg Jan 05 '17 at 15:37