Created
May 18, 2021 20:13
-
-
Save remlapmot/7aa807270f5c6b1eef6eba60324eacaf to your computer and use it in GitHub Desktop.
Install packages from previous minor version of R into new minor version of R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copy packages from previous minor version of R to new version of R library directory | |
| # from https://community.rstudio.com/t/reinstalling-packages-on-new-version-of-r/7670/3 | |
| lib_loc <- "C:\\Users\\tom\\Documents\\R\\win-library\\4.0" | |
| to_install <- unname(installed.packages(lib.loc = lib_loc)[, "Package"]) | |
| to_install | |
| install.packages(pkgs = to_install) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment