enums {rib} | R Documentation |
Enumerated Types
Description
Enumerated types are used in few places across the API. These are types that can have only a limited set of named constant values.
These functions facilitate the conversion between integer value and string representation.
Usage
map_enum2int(enum, name)
map_int2enum(enum, value)
Arguments
enum |
name of the enumeration type: e.g. |
name |
string representation of |
value |
integer representation of |
Value
map_enum2int
returns the corresponding value
.
map_int2enum
returns the corresponding name
.
Examples
map_enum2int("MarketData", "DELAYED") # -> 3
map_int2enum("MarketData", 3) # -> "DELAYED"
[Package rib version 0.20.0 Index]