col_for_list_expr: GT Column Names

View source: R/utils_helpers.R

col_for_list_exprR Documentation

GT Column Names

Description

The function creates the labels for each column using the total function so the columns are now NAME N= X

Usage

col_for_list_expr(col_names, col_total)

Arguments

col_names

A vector of column names

col_total

A vector of column totals

Value

A character object of class from_markdown.

Examples

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)
}

Biogen-Inc/tidyCDISC documentation built on April 22, 2023, 2:12 p.m.