A function to transform the gt row names from generics to the column name and the total N of each column

common_rownames(data, group)

Arguments

data

the data to create columns with

group

whether to group the data to calculate Ns

Value

A character vector

Examples

data(adsl, package = "tidyCDISC")

# Values of TRT01P
unique(adsl$TRT01P)
#> [1] "Placebo"              "Xanomeline High Dose" "Xanomeline Low Dose" 

# Common row names based on TRT01P
common_rownames(adsl, "TRT01P")
#> [1] "Variable"             "Placebo"              "Xanomeline High Dose"
#> [4] "Xanomeline Low Dose"  "Total"