For nested column splits, Is it possible to add the column counts N
to the highest-level column? For example:
basic_table() %>%
add_colcounts() %>%
split_cols_by("ARM") %>%
split_cols_by_multivar(c("AGE", "BMRKR1")) %>%
analyze_colvars(afun = mean, format = "xx.x") %>%
build_table(DM)
Looks like:
A: Drug X B: Placebo C: Combination
AGE BMRKR1 AGE BMRKR1 AGE BMRKR1
(N=121) (N=121) (N=106) (N=106) (N=129) (N=129)
----------------------------------------------------------------
mean 34.9 5.8 33 6.1 34.6 5.7
I would like the (N=xx) row to be under the "ARM" column headings like so:
A: Drug X B: Placebo C: Combination
(N=121) (N=106) (N=129)
AGE BMRKR1 AGE BMRKR1 AGE BMRKR1
----------------------------------------------------------------
mean 34.9 5.8 33 6.1 34.6 5.7
Session info:
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblasp-r0.2.19.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rtables_0.3.2.17.9045 magrittr_1.5
loaded via a namespace (and not attached):
[1] compiler_3.6.3 htmltools_0.4.0 tools_3.6.3 Rcpp_1.0.4.6 digest_0.6.25 packrat_0.5.0 rlang_0.4.6 purrr_0.3.4
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