Learn R Programming

tidyCDISC (version 0.2.2)

col_for_list_expr: 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)

Value

A character object of class from_markdown.

Arguments

col_names

A vector of column names

col_total

A vector of column totals

Examples

Run this code
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)
}

Run the code above in your browser using DataLab