powered by
Check if an enum has a certain key.
enumHasKey(key, enum)
Key to check for.
Enum where to look for the key.
key
TRUE if a key-value pair for key exists, FALSE otherwise.
TRUE
FALSE
Other enumeration-helpers: enumGetKey(), enumGetValue(), enumKeys(), enumPut(), enumRemove(), enumValues(), enum()
enumGetKey()
enumGetValue()
enumKeys()
enumPut()
enumRemove()
enumValues()
enum()
# NOT RUN { Symbol <- enum(c(Diamond = 1, Triangle = 2, Circle = 2)) enumHasKey("Diamond", Symbol) enumHasKey("Square", Symbol) # }
Run the code above in your browser using DataLab