dot-list2tb: Convert Named List to Table Body

.list2tbR Documentation

Convert Named List to Table Body

Description

Many arguments in 'gtsummary' accept named lists. This function converts a named list to the .$table_body format expected in scope_table_body()

Usage

.list2tb(x, colname = caller_arg(x))

Arguments

x

named list

colname

string of column name to assign. Default is caller_arg(x)

Value

.$table_body data frame

Examples

type <- list(age = "continuous", response = "dichotomous")
gtsummary:::.list2tb(type, "var_type")

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.