enumHasKey: Check if an enum has a certain key.

View source: R/enum.R

enumHasKeyR Documentation

Check if an enum has a certain key.

Description

Check if an enum has a certain key.

Usage

enumHasKey(key, enum)

Arguments

key

Key to check for.

enum

Enum where to look for the key.

Value

TRUE if a key-value pair for key exists, FALSE otherwise.

See Also

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

Examples

Symbol <- enum(c(Diamond = 1, Triangle = 2, Circle = 2))
enumHasKey("Diamond", Symbol)
enumHasKey("Square", Symbol)

ospsuite.utils documentation built on March 18, 2022, 6:44 p.m.