Learn R Programming

matchr (version 0.1.0)

is.enum_type: Check Enum Type

Description

Test whether Enum is also of class type.

Usage

is.enum_type(x, type, ...)

Arguments

x

object to be tested

type

character string denoting type to check.

...

objects passed to methods

Value

TRUE if x has enumerated type type, FALSE otherwise

Examples

Run this code
# NOT RUN {
HelloEnum <- Enum(
  "HelloEnum",
  Hello,
  World
)

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

# FALSE
is.enum_type(HelloEnum$Hello, "Hello")
# }

Run the code above in your browser using DataLab