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. If one of the values is not
#'   named CRAN, the RStudio CRAN server will be added.
#'
#' @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/")
}
UCLATALL/coursekata-r documentation built on Aug. 24, 2023, 8:54 p.m.