R/coursekata_repos.R

Defines functions coursekata_repos

Documented in coursekata_repos

#' Get repositories for the packages.
#'
#' Ensures a default CRAN is set if one is not already set, and adds the repository for
#' fivethirtyeightdata.
#'
#' @param repos Optionally set a repository character vector to augment.
#'
#' @return A set of repositories that can be used to install or update the CourseKata packages.
#'
#' @export
#' @examples
#' coursekata_repos()
coursekata_repos <- function(repos = getOption("repos")) {
  if (is.na(repos["CRAN"])) repos["CRAN"] <- "https://cloud.r-project.org"
  c(repos, fivethirtyeight = "https://fivethirtyeightdata.github.io/drat/")
}

Try the coursekata package in your browser

Any scripts or data that you put into this service are public.

coursekata documentation built on Sept. 11, 2024, 8:42 p.m.