list_to_tbl: List format to table format

Description Usage Arguments Value Examples

View source: R/list_to_tbl.R

Description

List format to table format

Usage

1

Arguments

list

a list of lists

rownames

whether to return a table with no rownames (NULL), rownames from the list item names (NA), or as a new column (the column name as a string)

Value

a data table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
list_format <- list(
  item1 = list(x = 1, y = "A"),
  item2 = list(x = 2),
  item3 = list(y = "C", z = TRUE),
  item4 = list(x = NULL, y = NULL, z = NULL),
  item5 = list(),
  item6 = NULL
)

list_to_tbl(list_format, rownames = "item")

facelab/webmorph documentation built on April 11, 2021, 6:34 a.m.