powered by
enum
Get the key mapped to the given value in an enum
enumGetKey(enum, value)getEnumKey(enum, value)
getEnumKey(enum, value)
The enum where the key-value pair is stored
The value that is mapped to the key
key
Key under which the value is stored. If the value is not in the enum, NULL is returned.
NULL
Other enumeration-helpers: enumGetValue(), enumHasKey(), enumKeys(), enumPut(), enumRemove(), enumValues(), enum()
enumGetValue()
enumHasKey()
enumKeys()
enumPut()
enumRemove()
enumValues()
enum()
# NOT RUN { Symbol <- enum(c(Diamond = 1, Triangle = 2, Circle = 2)) enumGetKey(Symbol, 1) # }
Run the code above in your browser using DataLab