Description Usage Arguments Value See Also Examples
The constructors new_numeric_enum()
and
new_generic_enum()
are the basis for the
enum()
command. These can be used instead of
enum()
if speed is pivotal.
new_numeric_enum()
creates and validates a
numeric enum from a named list of numeric arguments
new_generic_enum()
creates and validates a
generic enum from a named list of arguments
These constructors do not have the helpers
associated with the enum()
command, such as
easy NSE or enum class detection.
In general, it is recommended to use the enum()
method, as it is less verbose, easier to read and write, and
more readily picks up on user errors.
1 2 3 | new_numeric_enum(.enum_data)
new_generic_enum(.enum_data)
|
.enum_data |
named list of arguments |
An enumeration (enum), a list of unique name/value pairs.
1 2 3 | new_numeric_enum(list(x = 5, y = 2))
new_generic_enum(list(x = mtcars, y = "string"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.