powered by
enum
Add a new key-value pairs to an enum
enumPut(keys, values, enum, overwrite = FALSE)
Keys of the values to be added
Values to be added
The enum to which the specified key-value pairs should be added. WARNING: the original object is not modified!
If TRUE and a value with any of the given keys exists, it will be overwritten with the new value. Otherwise, an error is thrown. Default is FALSE.
TRUE
keys
FALSE.
Enum with added key-value pair.
Enum
Other enumeration-helpers: enumGetKey(), enumGetValue(), enumHasKey(), enumKeys(), enumRemove(), enumValues(), enum()
enumGetKey()
enumGetValue()
enumHasKey()
enumKeys()
enumRemove()
enumValues()
enum()
# NOT RUN { myEnum <- enum(c(a = "b")) myEnum <- enumPut("c", "d", myEnum) myEnum <- enumPut(c("c", "d", "g"), c(12, 2, "a"), myEnum, overwrite = TRUE) # }
Run the code above in your browser using DataLab