R/is.codelist.R

Defines functions is.codelist

Documented in is.codelist

#' Check if an object is a Code List
#'
#' @param x object to test.
#' 
#' @return 
#' Returns a logical of length 1. Returns \code{TRUE} is \code{x} is of type
#' \code{\link{codelist}} or a \code{data.frame} that conforms to the
#' requirements of a code list.
#'
#' @export
is.codelist <- function(x) {
  methods::is(x, "codelist") || isTRUE(cl_is_valid(x))
}

Try the codelist package in your browser

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

codelist documentation built on April 12, 2025, 2:25 a.m.