I develop code in R on multiple computers. Said code depends on many CRAN packages, and I want to make sure that the version of the packages my code depends on are kept in sync. So I am looking for a easy way of replicating a list of installed CRAN packages (with the same version) on another computer.
For people who also know Python, I am looking for an equivalent to pip freeze. Running pip freeze prints out a list of packages installed with their version. Then on another computer, I can feed this file back to pip and it installs the exact same version of all the packages listed. (What I do not want is something that installs the latest version on the other computer.)
Is there an easy way of doing this in R (or a tool that already does this), or do I have to roll my own?
Have you looked at
installed.packages()?You could then roll a corresponding
install.packages()over it on the other side, possibly with an additional layer of fetching versions from the ‘Archive’ section on CRAN.