Skip to content

Instantly share code, notes, and snippets.

@klainfo
Created May 8, 2018 05:31
Show Gist options
  • Save klainfo/2149a5029ba634b3d4fc2327176e6b79 to your computer and use it in GitHub Desktop.
Save klainfo/2149a5029ba634b3d4fc2327176e6b79 to your computer and use it in GitHub Desktop.
re-install all R packages when update R version (e.g., 3.4 -> 3.5)
package_df <- as.data.frame(installed.packages("/Library/Frameworks/R.framework/Versions/3.4/Resources/library"))
package_list <- as.character(package_df$Package)
install.packages(package_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment