list-helpers: Convert between lists, list-formulas, and tables

list-helpersR Documentation

Convert between lists, list-formulas, and tables

Description

Convert between lists, list-formulas, and tables

Usage

list_to_table(x, id, val, ...)

table_to_list(x, id, ...)

formula_to_named_list(x, ...)

named_list_to_formula(x, ...)

Arguments

x
  • For list_to_table(): A named list object

  • For table_to_list(): A data.frame object

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

Details

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.


asshah4/axe documentation built on Nov. 9, 2022, 12:45 a.m.