Learn R Programming

ospsuite.utils (version 1.2.0)

enumGetValue: Get enum values

Description

Return the value that is stored under the given key. If the key is not present, an error is thrown.

Usage

enumGetValue(enum, key)

Arguments

enum

The enum that contains the key-value pair.

key

The key under which the value is stored.

Value

Value that is assigned to key.

See Also

Other enumeration-helpers: enumGetKey(), enumHasKey(), enumKeys(), enumPut(), enumRemove(), enumValues(), enum()

Examples

Run this code
# NOT RUN {
Symbol <- enum(c(Diamond = 1, Triangle = 2, Circle = 2))
enumGetValue(Symbol, "Diamond")
# }

Run the code above in your browser using DataLab