Easy way to reinstall entire packages on new machine

358 views Asked by At

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

1

There are 1 answers

1
sgdata On BEST ANSWER

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)