This function will only add an overall column at the top level of splitting, NOT within existing column splits. See add_overall_level()
for the recommended way to add overall columns more generally within existing splits.
add_overall_col(lyt, label)
Arguments
(PreDataTableLayouts
)
layout object pre-data used for tabulation.
(string
)
a label (not to be confused with the name) for the object/structure.
A PreDataTableLayouts
object suitable for passing to further layouting functions, and to build_table()
.
lyt <- basic_table() %>%
split_cols_by("ARM") %>%
add_overall_col("All Patients") %>%
analyze("AGE")
lyt
#> A Pre-data Table Layout
#>
#> Column-Split Structure:
#> ARM (lvls)
#> (all obs)
#>
#> Row-Split Structure:
#> AGE (** analysis **)
#>
tbl <- build_table(lyt, DM)
tbl
#> A: Drug X B: Placebo C: Combination All Patients
#> —————————————————————————————————————————————————————————————
#> Mean 34.91 33.02 34.57 34.22
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4