is.enum: Is Object an Enum

Description Usage Arguments Value Examples

View source: R/check.R

Description

Test whether object has class Enum.

Usage

1

Arguments

x

object to be tested

Value

TRUE if x is an Enum, FALSE otherwise

Examples

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

# TRUE
is.enum(HelloEnum$Hello)

# FALSE
is.enum(5)

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

Related to is.enum in matchr...