list-helpers | R Documentation |
Convert between lists, list-formulas, and tables
list_to_table(x, id, val, ...) table_to_list(x, id, ...) formula_to_named_list(x, ...) named_list_to_formula(x, ...)
x |
|
id |
Name of column that contains the term (or rune) |
val |
Name of column that contains specific values |
... |
Further arguments passed to or from other methods |
table_to_list()
:
Takes a data.frame
and uses the columns to generate a named list. This
removes the original column names, as it assumes that the data is contained
within the frame itself. It defaults to using the first column as the names
of the list.
formula_to_named_list()
:
Handling of list-formula arguments. Stylistic choice to make arguments entered in the form of a list, with each entry being a formula. The LHS will always be the terms, and the RHS will always be the non-terms item (e.g. group, label, role, etc).
named_list_to_formula()
:
Converts a named list set to a formula pattern. The LHS is the term, and the RHS is the value, such as a label, role, or tier.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.