Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Created May 18, 2021 20:13
Show Gist options
  • Save remlapmot/7aa807270f5c6b1eef6eba60324eacaf to your computer and use it in GitHub Desktop.
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
# 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