assertCharacter: Assert that an object is a character and fulfill certain...

View source: R/assert.R

assertCharacterR Documentation

Assert that an object is a character and fulfill certain conditions.

Description

Assert that an object is a character and fulfill certain conditions.

Usage

assertCharacter(
  x,
  length = NULL,
  na = FALSE,
  null = FALSE,
  unique = FALSE,
  named = FALSE,
  minNumCharacter = 0,
  call = parent.frame(),
  msg = NULL
)

Arguments

x

Variable to check.

length

Required length. If NULL length is not checked.

na

Whether it can contain NA values.

null

Whether it can be NULL.

unique

Whether it has to contain unique elements.

named

Whether it has to be named.

minNumCharacter

Minimum number of characters that all elements must have.

call

Call argument that will be passed to cli error message.

msg

Custom error message.


omopgenerics documentation built on Sept. 30, 2024, 9:16 a.m.