View source: R/utils_helpers.R
col_for_list_expr | R Documentation |
The function creates the labels for each column using the total function so the columns are now NAME N= X
col_for_list_expr(col_names, col_total)
col_names |
A vector of column names |
col_total |
A vector of column totals |
A character object of class from_markdown
.
data(example_dat2, package = "tidyCDISC")
labels <- col_for_list_expr(example_dat2$col_names, example_dat2$col_totals)
labels
if (interactive()) {
# TG table without nice column labels or totals
example_dat2$TG_table
# TG table with nice column labels and totals
gt::cols_label(example_dat2$TG_table, .list = labels)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.