assertClass: Assert that an object has a certain class.

View source: R/assert.R

assertClassR Documentation

Assert that an object has a certain class.

Description

Assert that an object has a certain class.

Usage

assertClass(
  x,
  class,
  length = NULL,
  null = FALSE,
  all = FALSE,
  extra = TRUE,
  call = parent.frame(),
  msg = NULL
)

Arguments

x

To check.

class

Expected class or classes.

length

Required length. If NULL length is not checked.

null

Whether it can be NULL.

all

Whether it should have all the classes or only at least one of them.

extra

Whether the object can have extra classes.

call

Call argument that will be passed to cli.

msg

Custom error message.


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