Learn R Programming

cards (version 0.3.0)

.process_nested_list_as_df: Convert Nested Lists to Column

Description

Some arguments, such as stat_label, are passed as nested lists. This function properly unnests these lists and adds them to the results data frame.

Usage

.process_nested_list_as_df(x, arg, new_column, unlist = FALSE)

Value

a data frame

Arguments

x

(data.frame)
result data frame

arg

(list)
the nested list

new_column

(string)
new column name

unlist

(logical)
whether to fully unlist final results

Examples

Run this code
ard <- ard_categorical(ADSL, by = "ARM", variables = "AGEGR1")

cards:::.process_nested_list_as_df(ard, NULL, "new_col")

Run the code above in your browser using DataLab