We need to install a lot of R packages each time we upgrade to a new version of R.
- Before installing the new R, run
Rscript make_description.R
to write a list of all installed packages. - Install the new version of R.
- Use devtools to reinstall the packages.
We can get the make_description.R
script and run it:
cd ~
Rscript make_description.R
head -n20 DESCRIPTION
Package: MyPackages
Version: 0.0.0.9000
Title: My Packages
Description: My Packages
Encoding: UTF-8
Depends:
R (>= 3.0.0)
biocViews:
Remotes:
github::baptiste/egg,
github::eclarke/ggbeeswarm,
github::mojaveazure/loomR,
github::thomasp85/patchwork,
github::AnalytixWare/shinysky
Imports:
askpass,
assertthat,
backports,
beeswarm,
BH,
Now that we have saved a list of all our R packages, we can download and install the new version of R.
Let's install devtools, and then use devtools to install our old packages:
Rscript -e 'install.packages("devtools")'
Rscript -e 'devtools::install_deps()'