is.variant: Check Enum Variant

Description Usage Arguments Value Examples

View source: R/check.R

Description

Test whether Enum is variant variant.

Usage

1

Arguments

x

object to be tested

variant

character string denoting variant to check.

...

objects passed to methods

Value

TRUE if x is enumerated type of variant variant, FALSE otherwise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
HelloEnum <- Enum(
  "HelloEnum",
  Hello,
  World
)

# TRUE
is.variant(HelloEnum$Hello, "Hello")

# FALSE
is.variant(HelloEnum$Hello, "World")

matchr documentation built on Sept. 9, 2021, 5:07 p.m.

Related to is.variant in matchr...