is.variant {matchr} | R Documentation |
Test whether Enum
is variant variant
.
is.variant(x, variant, ...)
x |
object to be tested |
variant |
character string denoting variant to check. |
... |
objects passed to methods |
TRUE
if x
is enumerated type of variant variant
, FALSE
otherwise
HelloEnum <- Enum(
"HelloEnum",
Hello,
World
)
# TRUE
is.variant(HelloEnum$Hello, "Hello")
# FALSE
is.variant(HelloEnum$Hello, "World")