Attach bign value to table columns, modify column header labels
Source:R/utils.R
display_bign_head.Rd
Attach bign value to table columns, modify column header labels
Usage
display_bign_head(
datain,
mentry_data = NULL,
trtbignyn = "Y",
subbignyn = "Y",
colformat = "",
notrthead = "Total"
)
Arguments
- datain
Input dataframe for display
- mentry_data
Input data from
mentry()
- trtbignyn
Append (N = trt count) to Treatment Column headers? Values: Y/N
- subbignyn
Append (N = trt*subgrp count) to Subgroup Column headers? Values: Y/N
- colformat
String (usually indicating format) to add to column (treatment/total) names.
- notrthead
If no Treatment or subgroup column exists, label to give to "CVALUE" column
Value
a dataframe with/without selected columns (trt/subgrp) appended with (N = ) values, or modified column header
Examples
adsl_entry <- mentry(
datain = adsl,
trtvar = "TRT01A",
trtsort = "TRT01AN",
subgrpvar = "SEX"
)
msumstat(
adsl_entry,
dptvar = "AGE",
statvar = "mean",
dptvarn = 2
)$tsum |>
display_bign_head(adsl_entry)
#> msum success
#> # A tibble: 6 × 9
#> SUBGRPVAR1N DPTVAR CN DPTVARN DPTVAL CVALUE DPTVALN TRTVAR SUBGRPVAR1
#> <dbl> <chr> <chr> <dbl> <chr> <chr> <dbl> <fct> <chr>
#> 1 1 AGE N 2 mean 76.36 1 Placebo (N=… F (N=53)
#> 2 2 AGE N 2 mean 73.36 1 Placebo (N=… M (N=33)
#> 3 1 AGE N 2 mean 75.68 1 Xanomeline … F (N=50)
#> 4 2 AGE N 2 mean 75.65 1 Xanomeline … M (N=34)
#> 5 1 AGE N 2 mean 74.67 1 Xanomeline … F (N=40)
#> 6 2 AGE N 2 mean 74.11 1 Xanomeline … M (N=44)