Skip to contents

Remove an entry from the enum.

Usage

enumRemove(keys, enum)

Arguments

keys

Key(s) of entries to be removed from the enum

enum

Enum from which the entries to be removed WARNING: the original object is not modified!

Value

Enum without the removed entries.

See also

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

Examples

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

# either by key
enumRemove("Diamond", Symbol)
#> $Triangle
#> [1] 2
#> 
#> $Circle
#> [1] 2
#> 

# or by position
enumRemove(2L, Symbol)
#> $Diamond
#> [1] 1
#> 
#> $Circle
#> [1] 2
#>