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

View source: R/validation.R

check_categoricalR Documentation

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

Description

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

Usage

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


facileverse/FacileData documentation built on Feb. 24, 2024, 7:59 a.m.