Created
February 9, 2016 16:47
-
-
Save swiftsam/ea5d7a60b354b88c762d to your computer and use it in GitHub Desktop.
remove R packages installed in multiple libraries
This file contains 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
user.libs <- row.names(installed.packages(lib.loc = .libPaths()[1])) | |
sys.libs <- row.names(installed.packages(lib.loc = .libPaths()[2])) | |
remove.packages(intersect(sys.libs,user.libs), lib=.libPaths()[2]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment