Description Usage Arguments Examples
Access enum members through subsetting with numeric or character indices.
Enums are converted to a list type through the
as.list
method, before being subset by an index.
Partial matching via [
, [[
, or $
is not supported, and will return
NULL. This is intended to incentivise literate programming, as partial
matching can lead to errors.
Enums are not intended to be used as interactive data structures.
Assigning to enum members is not supported, and will
throw an error if attempted. If you require an enum to be modifiable,
consider using a list
instead.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x |
enum to subset |
arg |
value to subset enum with, generally the indices of the enum |
value |
assigning values to enums is not allowed |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.