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)
pretty_IDs(ID)
The ID vector of a TG table
A character vector of pretty IDs.
# 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
#> [1] "MEAN of VAR" "FREQ of VAR" "CHG of VAR"
#> [4] "Y_FREQ of VAR" "MAX_FREQ of VAR" "NON_MISSING of VAR"
#> [7] "NESTED_FREQ_DSC of VAR" "NESTED_FREQ_ABC of VAR"
pretty_IDs(IDs)
#> [1] "Descriptive Statistics of VAR"
#> [2] "Summary Counts of VAR"
#> [3] "Descriptive Statistics of Change from Baseline of VAR"
#> [4] "Subject Count for those with 'Y' values of VAR"
#> [5] "Subject Count for maximum of VAR"
#> [6] "Subject Count for those with Non Missing values of VAR"
#> [7] "Subject Count at each variable level, sorted descending by total counts of VAR"
#> [8] "Subject Count at each variable level, sorted alphabetically by name of VAR"