| inEnum | R Documentation |
Is 'Needle' element of an enum 'Haystack?
inEnum(Needle, Haystack)
Needle |
an integer or string representing an element of the enumeration 'Haystack' |
Haystack |
an enumeration class 'enum' |
TRUE/FALSE
myEnum <- enum(a=1, b=3, c=5)
inEnum(3, myEnum) # TRUE
inEnum("b", myEnum) # TRUE
inEnum(2, myEnum) # FALSE, however ...
inEnum(myEnum[2], myEnum) # TRUE
inEnum(myEnum["c"], myEnum) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.