R/is_spec__and__is_ref.R

Defines functions is_nested is_ref is_spec

is_spec <- function(x) {
  return(("justifierSpec" %in% class(x)) || length(names(x)) > 1);
}

is_ref <- function(x) {
  return(("justifierRef" %in% class(x)) || ((length(names(x)) == 0) && (is.character(x))));
}

is_nested <- function(x) {
  return(is.list(x) && any(unlist(lapply(x, is.list))));
}

Try the justifier package in your browser

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

justifier documentation built on March 7, 2023, 6:59 p.m.