R/from_github.R

Defines functions from_github

Documented in from_github

#' Helper function for pointing to an R package on GitHub
#'
#' This helper function allows for inspection of R packages that are hosted on
#' GitHub.
#' @param repo The GitHub repository address of the following construction:
#'   \code{[username]/[repo]}.
#' @export
from_github <- function(repo) {

  # Construct the tibble with the necessary repo information
  dplyr::tibble(src = "GitHub", repo = repo) %>%
    dplyr::mutate(url = paste0(
      "http://github.com/", repo, "/zipball/master")
    ) %>%
    dplyr::mutate(pkg_path = paste0(getwd(), "/temp_pkgattrs/", repo))
}
rich-iannone/pkgattrs documentation built on July 28, 2020, 7:42 p.m.