R/pin_exists.R

Defines functions check_pin_exists pin_exists

Documented in pin_exists

#' Determine if a pin exists
#'
#' @inheritParams pin_read
#' @export
pin_exists <- function(board, name, ...) {
  ellipsis::check_dots_used()
  UseMethod("pin_exists")
}

check_pin_exists <- function(board, name, call = caller_env()) {
  if (pin_exists(board, name)) {
    invisible()
  } else {
    abort_pin_missing(name, call = call)
  }
}

Try the pins package in your browser

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

pins documentation built on Nov. 10, 2023, 1:06 a.m.