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'.")
  }
}

Try the cubble package in your browser

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

cubble documentation built on Sept. 11, 2024, 7:19 p.m.