Okay, Joel, here it is. I got these instruction off of the Internet but I do not remember who was the original source.
- I keep this file in a RStudio project I call installed_packages.
- Before I upgrade I run the first two line to update the package_list.
- After I upgrade I go back to project, un-comment the install.packages line and run it.
- I also have a line in there if you want a csv copy of the installed packages.
#Get currently installed packages #work package_df < - as.data.frame(installed.packages()) package_list <- as.character(package_df$Package) #write.csv(package_df, file = "package_df.csv") #Re-install Install packages #install.packages(package_list)