Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Seamless way to reinstall all your R package after a major update
- # Where are your packages installed?
- libpath = "~/R/x86_64-pc-linux-gnu-library/"
- # Find the latest R version before we updated
- R_versions = list.files(libpath)
- latest_R_version = max(as.numeric(R_versions))
- # List all packages installed in the latest version
- list_packages = list.files(paste0(libpath, latest_R_version))
- # Install them
- install.packages(list_packages, dependencies = T)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement