Skip to content

Instantly share code, notes, and snippets.

@dreidpath
Created May 13, 2022 03:56
Show Gist options
  • Save dreidpath/041c3c647f4251fe71f24413bb5ad6ec to your computer and use it in GitHub Desktop.
Save dreidpath/041c3c647f4251fe71f24413bb5ad6ec to your computer and use it in GitHub Desktop.
Ensuring a new version of R has the same packages installed as the previous version
version_new <- list.files('~/R/x86_64-pc-linux-gnu-library/4.2')
version_old <- list.files('~/R/x86_64-pc-linux-gnu-library/4.1')
target <- version_old[!(version_old %in% version_new)]
install.packages(target)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment