R/checks.R

Defines functions check_arg_key_use check_key_tbl

check_key_tbl <- function(obj){
  if (!inherits(obj, "key_tbl")){
    cli::cli_abort(
      "The {.field obj} need to be the result from {.fn check_key}.")
  }

}


check_arg_key_use <- function(arg){
  if (!arg %in% c("spatial", "temporal")){
    cli::cli_abort(
      "The {.field key_use} need to be either 'spatial' or 'temporal'.")
  }
}
huizezhang-sherry/cubble documentation built on Oct. 15, 2024, 8:12 a.m.