R/scheme_installed.R

Defines functions scheme_installed

Documented in scheme_installed

#' Functions to manage schemes
#'
#' \bold{\code{scheme_installed()}:} Checks if a scheme is installed
#'
#' @return \code{TRUE} if the theme is installed, \code{FALSE} if not
#'
#' @rdname scheme
#'
#' @export
#'
#' @examples
#' \dontrun{
#' scheme_installed("dmdScheme", "0.9.9")
#' scheme_installed("dmdScheme", "0.7.3")
#' }
scheme_installed <- function(
  name,
  version
) {
  result <- paste0(name, "_", version) %in% apply(scheme_list(), MARGIN = 1, paste, collapse = "_")
  return(result)
}

Try the dmdScheme package in your browser

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

dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.