restore all R packages after installing a new version of R?
问题 When you are doing an R update, what is the best approach to re-installing and updating all packages that were already installed on your previous R version when some of your packages are on CRAN but the rest are on github (or other sources)? In the past, I've followed this approach: Open old version of R (e.g. R 3.6 ) and make a copy of all installed packages: installed <- as.data.frame(installed.packages()) #save a copy write.csv(installed, 'previously_installed.csv') Then install and open