Created
May 3, 2017 13:55
-
-
Save rosdyana/2400c4903dd0bebfe1a80a26d7792d9e to your computer and use it in GitHub Desktop.
Update your external package from github
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
update_github <- function() { | |
pkgs = loadedNamespaces() | |
print(pkgs) | |
desc <- lapply(pkgs, packageDescription, lib.loc = NULL) | |
for (d in desc) { | |
message("working on ", d$Package) | |
if (!is.null(d$GithubSHA1)) { | |
message("Github found") | |
install_github(repo = d$GithubRepo, username = d$GithubUsername) | |
} | |
} | |
} | |
library(devtools) | |
update_github() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment