Functions to check if an object is an enum type, or coerce it if possible.

as.enum_type(x)

Arguments

x

any R object

Value

Object of class enum_type