Check to see if a vector is categorical (character or string)

check_categorical(
  x,
  any.missing = TRUE,
  all.missing = TRUE,
  len = NULL,
  min.len = NULL,
  max.len = NULL,
  ...
)

assert_categorical(
  x,
  any.missing = TRUE,
  all.missing = TRUE,
  len = NULL,
  min.len = NULL,
  max.len = NULL,
  ...,
  .var.name = vname(x),
  add = NULL
)

test_categorical(x, ...)

Arguments

x

a vector of things

any.missing

are vectors with missing values allowed? Default is TRUE

all.missing

are vectors with missing values allowed? Default is TRUE

len

expected length of x. If provided, overrides min.len and max.len. Defaults to NULL.

min.len

minimum length for x

max.len

maximum length for x

...

dots