R/utils.R

Defines functions col_check

# not exported, just internal helper to make sure columns exist
col_check <- function(col, data, fun = sys.call(-1)) {
  if (!is.null(col) && !col %in% names(data)) 
    stop("column not in dataset: '", col, "'. Plese check your call to ", fun, call. = FALSE)
}

Try the lans2r package in your browser

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

lans2r documentation built on March 7, 2023, 7:38 p.m.