is_s3_instance: Checks if the passed entity is an S3 instance.

View source: R/s3.R

is_s3_instanceR Documentation

Checks if the passed entity is an S3 instance.

Description

Checks if the passed entity is an S3 instance.

Usage

is_s3_instance(value, class_name, allow_null = FALSE)

Arguments

value

the value to check

class_name

the name of the class, as a string.

allow_null

if true, accept a value that is NULL.

Examples

## Not run: 
# For assertion
assertthat::assert_that(
  qscheck::is_s3_instance(value, "MyClass")
  )
# For check
if (qscheck::is_s3_instance(value, "MyClass")) {}

## End(Not run)


AstraZeneca/qscheck documentation built on Nov. 1, 2023, 4:45 a.m.