Learn R Programming

tidyCDISC (version 0.2.2)

pretty_IDs: Create Pretty IDs for TG Table

Description

Replaces ugly ID patterns of a stat block with pretty replacements for display purposes (e.g. NON_MISSING becomes Subject Count for those with Non Missing values)

Usage

pretty_IDs(ID)

Value

A character vector of pretty IDs.

Arguments

ID

The ID vector of a TG table

Examples

Run this code
# List of patterns that can be replaced
patterns <- c("MEAN", "FREQ", "CHG", "Y_FREQ", "MAX_FREQ", "NON_MISSING", 
              "NESTED_FREQ_DSC", "NESTED_FREQ_ABC")
IDs <- paste(patterns, "of VAR")

IDs
pretty_IDs(IDs)

Run the code above in your browser using DataLab