Learn R Programming

rtables (version 0.4.0)

path_enriched_df: Transform TableTree object to Path-Enriched data.frame

Description

Transform TableTree object to Path-Enriched data.frame

Usage

path_enriched_df(tt, path_fun = collapse_path, value_fun = collapse_values)

Arguments

tt

TableTree (or related class). A TableTree object representing a populated table.

path_fun

function. Function to transform paths into single-string row/column names.

value_fun

function. Functiont to transform cell values into cells of the data.frame. Defaults to collapse_values which creates strings where multi-valued cells are collapsed together, separated by |.

Value

A data frame of tt's cell values (processed by value_fun, with columns named by the full column paths (processed by path_fun and an additional row_path column with the row paths (processed by by path_fun).

Examples

Run this code
# NOT RUN {
lyt <- basic_table() %>%
  split_cols_by("ARM") %>%
  analyze(c("AGE", "BMRKR2"))

tbl <- build_table(lyt, ex_adsl)
path_enriched_df(tbl)
# }

Run the code above in your browser using DataLab