combine_counts {tern} | R Documentation |
Combine counts
Description
Simplifies the estimation of column counts, especially when group combination is required.
Usage
combine_counts(fct, groups_list = NULL)
Arguments
fct |
( |
groups_list |
(named |
Value
A vector
of column counts.
See Also
Examples
ref <- c("A: Drug X", "B: Placebo")
groups <- combine_groups(fct = DM$ARM, ref = ref)
col_counts <- combine_counts(
fct = DM$ARM,
groups_list = groups
)
basic_table() %>%
split_cols_by_groups("ARM", groups) %>%
add_colcounts() %>%
analyze_vars("AGE") %>%
build_table(DM, col_counts = col_counts)
ref <- "A: Drug X"
groups <- combine_groups(fct = DM$ARM, ref = ref)
col_counts <- combine_counts(
fct = DM$ARM,
groups_list = groups
)
basic_table() %>%
split_cols_by_groups("ARM", groups) %>%
add_colcounts() %>%
analyze_vars("AGE") %>%
build_table(DM, col_counts = col_counts)
[Package tern version 0.9.5 Index]