Skip to content

Instantly share code, notes, and snippets.

@rosdyana
Created May 3, 2017 13:55
Show Gist options
  • Save rosdyana/2400c4903dd0bebfe1a80a26d7792d9e to your computer and use it in GitHub Desktop.
Save rosdyana/2400c4903dd0bebfe1a80a26d7792d9e to your computer and use it in GitHub Desktop.
Update your external package from github
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