R/update_github.R

Defines functions update_github

Documented in update_github

#' Update all packages from github
#'
#' This will trash any non-master branch installs, and spend time re-installing the packages
#' @keywords lavaan scale_factor
#' @import utils
#' @import devtools
#' @export
#'
update_github <- function() {
  # binding global variable
  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)
    }
  }
}
JihongZ/usefulR documentation built on Sept. 14, 2023, 6:09 p.m.