Last active
March 29, 2022 01:02
-
-
Save marcelotournier/29d700940a2291693d6ca77bd282ff8c to your computer and use it in GitHub Desktop.
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
# Save your R package list: | |
packages <- levels(as.data.frame(installed.packages()[,1])[,1]) | |
write.csv(packages, "requirements.txt", row.names = FALSE, quote = FALSE) | |
# Load your R package list: | |
backup <- levels(read.csv("requirements.txt")[,1]) | |
# Install your package list on a new machine: | |
install.packages(backup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment