Various S3 methods that improve interacting with enum data types.
These rely on coercing enums to list types before applying any methods to the enum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S3 method for class 'enum'
length(x)
## S3 method for class 'enum'
names(x)
## S3 method for class 'enum'
as.list(x, ...)
## S3 method for class 'enum'
as.character(x, ...)
## S3 method for class 'enum'
as.numeric(x, ...)
## S3 method for class 'enum'
as.data.frame(x, ...)
|
x |
enum |
... |
arguments to pass to as.list |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.