is.variant {matchr} | R Documentation |
Check Enum Variant
Description
Test whether Enum
is variant variant
.
Usage
is.variant(x, variant, ...)
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
HelloEnum <- Enum(
"HelloEnum",
Hello,
World
)
# TRUE
is.variant(HelloEnum$Hello, "Hello")
# FALSE
is.variant(HelloEnum$Hello, "World")
[Package matchr version 0.1.0 Index]