diff --git a/CITATION.cff b/CITATION.cff index 265698dc..fcab7f68 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,7 +8,7 @@ message: 'To cite package "FreesearchR" in publications use:' type: software license: AGPL-3.0-or-later title: 'FreesearchR: Easy data analysis for clinicians' -version: 25.10.5 +version: 25.11.1 doi: 10.5281/zenodo.14527429 identifiers: - type: url diff --git a/DESCRIPTION b/DESCRIPTION index bb7e367e..27e92e13 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: FreesearchR Title: Easy data analysis for clinicians -Version: 25.10.5 +Version: 25.11.1 Authors@R: c( person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7559-1154")), diff --git a/NEWS.md b/NEWS.md index 1345a963..48596f4f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# FreesearchR 25.11.1 + +*NEW* Added option to select extensive baseline table selecting between "Minimal" (current) or "Extensive" which adds mean/sd and min/max as well as plots all levels also for dichotomous variables. + # FreesearchR 25.10.5 *NEW* New character/text split function available. A selection of delimiters are recognised and selectable. Function only available if splittable variables are present. diff --git a/R/app_version.R b/R/app_version.R index d67b66a1..042488b0 100644 --- a/R/app_version.R +++ b/R/app_version.R @@ -1 +1 @@ -app_version <- function()'25.10.5' +app_version <- function()'25.11.1' diff --git a/R/baseline_table.R b/R/baseline_table.R index ecab00b8..203197f6 100644 --- a/R/baseline_table.R +++ b/R/baseline_table.R @@ -12,7 +12,6 @@ #' mtcars |> baseline_table() #' mtcars |> baseline_table(fun.args = list(by = "gear")) baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary, vars = NULL) { - out <- do.call(fun, c(list(data = data), fun.args)) return(out) } @@ -23,19 +22,26 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary, #' #' @param data data #' @param ... passed as fun.arg to baseline_table() -#' @param strat.var grouping/strat variable #' @param add.p add comparison/p-value #' @param add.overall add overall column +#' @param by.var specify stratification variable +#' @param theme set table theme +#' @param detail_level specify detail level. Either "minimal" or "extended". #' #' @returns gtsummary table list object #' @export #' #' @examples #' mtcars |> create_baseline(by.var = "gear", add.p = "yes" == "yes") +#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended") +#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm") +#' #' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet") -create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon")) { +create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) { theme <- match.arg(theme) + detail_level <- match.arg(detail_level) + if (by.var == "none" | !by.var %in% names(data)) { by.var <- NULL } @@ -53,11 +59,32 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS args <- list(...) + # browser() + + if (!any(hasName(args, c("type", "statistic")))) { + if (detail_level == "extended") { + args <- + modifyList( + args, + list( + type = list(gtsummary::all_continuous() ~ "continuous2", + gtsummary::all_dichotomous() ~ "categorical"), + statistic = list(gtsummary::all_continuous() ~ c( + "{median} ({p25}, {p75})", + "{mean} ({sd})", + "{min}, {max}")) + ) + ) + } + } + parameters <- list( data = data, - fun.args = list(by = by.var, ...) + fun.args = purrr::list_flatten(list(by = by.var, args)) ) + + # browser() out <- do.call( baseline_table, parameters diff --git a/R/hosted_version.R b/R/hosted_version.R index 125f33e1..d1519d07 100644 --- a/R/hosted_version.R +++ b/R/hosted_version.R @@ -1 +1 @@ -hosted_version <- function()'v25.10.5-251031' +hosted_version <- function()'v25.11.1-251109' diff --git a/R/sysdata.rda b/R/sysdata.rda index d6694eef..d644c198 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/ui_elements.R b/R/ui_elements.R index 48a18a6b..798a04ad 100644 --- a/R/ui_elements.R +++ b/R/ui_elements.R @@ -375,6 +375,17 @@ ui_elements <- function(selection) { value = "acc_pan_chars", title = "Settings", icon = bsicons::bs_icon("table"), + # vectorSelectInput( + # inputId = "baseline_theme", + # selected = "none", + # label = i18n$t("Select table theme"), + # choices = c( + # "The Journal of the American Medical Association" = "jama", + # "The Lancet"="lancet", + # "The New England Journal of Medicine" = "nejm", + # "The Quarterly Journal of Economics" = "qjecon") + # ), + shiny::uiOutput("detail_level"), shiny::uiOutput("strat_var"), shiny::helpText(i18n$t("Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.")), shiny::conditionalPanel( diff --git a/SESSION.md b/SESSION.md index 756f93cd..80527531 100644 --- a/SESSION.md +++ b/SESSION.md @@ -11,11 +11,11 @@ |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |Europe/Copenhagen | -|date |2025-10-31 | +|date |2025-11-09 | |rstudio |2025.05.0+496 Mariposa Orchid (desktop) | |pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) | |quarto |1.7.30 @ /usr/local/bin/quarto | -|FreesearchR |25.10.5.251031 | +|FreesearchR |25.11.1.251109 | -------------------------------------------------------------------------------- @@ -44,7 +44,6 @@ |cardx |0.2.5 |2025-07-03 |CRAN (R 4.4.1) | |caTools |1.18.3 |2024-09-04 |CRAN (R 4.4.1) | |cellranger |1.1.0 |2016-07-27 |CRAN (R 4.4.0) | -|cffr |1.2.0 |2025-01-25 |CRAN (R 4.4.1) | |checkmate |2.3.2 |2024-07-29 |RSPM (R 4.4.0) | |class |7.3-23 |2025-01-01 |CRAN (R 4.4.1) | |classInt |0.4-11 |2025-01-08 |CRAN (R 4.4.1) | @@ -54,8 +53,6 @@ |colorspace |2.1-1 |2024-07-26 |CRAN (R 4.4.1) | |commonmark |2.0.0 |2025-07-07 |CRAN (R 4.4.1) | |crayon |1.5.3 |2024-06-20 |CRAN (R 4.4.1) | -|crosstalk |1.2.1 |2023-11-23 |CRAN (R 4.4.0) | -|curl |6.4.0 |2025-06-22 |RSPM (R 4.4.0) | |data.table |1.17.8 |2025-07-10 |CRAN (R 4.4.1) | |datamods |1.5.3 |2024-10-02 |CRAN (R 4.4.1) | |datawizard |1.2.0 |2025-07-17 |CRAN (R 4.4.1) | @@ -86,7 +83,7 @@ |foreach |1.5.2 |2022-02-02 |CRAN (R 4.4.0) | |foreign |0.8-90 |2025-03-31 |CRAN (R 4.4.1) | |Formula |1.2-5 |2023-02-24 |CRAN (R 4.4.1) | -|FreesearchR |25.10.5 |NA |NA | +|FreesearchR |25.11.1 |NA |NA | |fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) | |gdtools |0.4.2 |2025-03-27 |CRAN (R 4.4.1) | |generics |0.1.4 |2025-05-09 |CRAN (R 4.4.1) | @@ -114,11 +111,9 @@ |iterators |1.0.14 |2022-02-05 |CRAN (R 4.4.1) | |jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.4.0) | |jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.4.1) | -|jsonvalidate |1.5.0 |2025-02-07 |CRAN (R 4.4.1) | |KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.4.1) | |keyring |1.4.1 |2025-06-15 |CRAN (R 4.4.1) | |knitr |1.50 |2025-03-16 |CRAN (R 4.4.1) | -|labeling |0.4.3 |2023-08-29 |CRAN (R 4.4.1) | |later |1.4.2 |2025-04-08 |RSPM (R 4.4.0) | |lattice |0.22-7 |2025-04-02 |CRAN (R 4.4.1) | |lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) | @@ -163,14 +158,9 @@ |qqconf |1.3.2 |2023-04-14 |CRAN (R 4.4.0) | |qqplotr |0.0.6 |2023-01-25 |CRAN (R 4.4.0) | |quarto |1.5.0 |2025-07-28 |RSPM (R 4.4.0) | -|R.cache |0.17.0 |2025-05-02 |CRAN (R 4.4.1) | -|R.methodsS3 |1.8.2 |2022-06-13 |CRAN (R 4.4.1) | -|R.oo |1.27.1 |2025-05-02 |CRAN (R 4.4.1) | -|R.utils |2.13.0 |2025-02-24 |CRAN (R 4.4.1) | |R6 |2.6.1 |2025-02-15 |CRAN (R 4.4.1) | |ragg |1.4.0 |2025-04-10 |RSPM (R 4.4.0) | |rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.4.0) | -|rappdirs |0.3.3 |2021-01-31 |CRAN (R 4.4.1) | |rbibutils |2.3 |2024-10-04 |CRAN (R 4.4.1) | |RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.4.1) | |Rcpp |1.1.0 |2025-07-02 |CRAN (R 4.4.1) | @@ -209,7 +199,6 @@ |stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) | |stringr |1.5.1 |2023-11-14 |RSPM (R 4.4.0) | |stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) | -|styler |1.10.3 |2024-04-07 |CRAN (R 4.4.0) | |systemfonts |1.2.3 |2025-04-30 |CRAN (R 4.4.1) | |testthat |3.2.3 |2025-01-13 |CRAN (R 4.4.1) | |textshaping |1.0.1 |2025-05-01 |RSPM (R 4.4.0) | @@ -224,11 +213,8 @@ |tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) | |urlchecker |1.0.1 |2021-11-30 |CRAN (R 4.4.1) | |usethis |3.1.0 |2024-11-26 |RSPM (R 4.4.0) | -|utf8 |1.2.6 |2025-06-08 |CRAN (R 4.4.1) | |uuid |1.2-1 |2024-07-29 |CRAN (R 4.4.1) | -|V8 |6.0.6 |2025-08-18 |CRAN (R 4.4.1) | |vctrs |0.6.5 |2023-12-01 |CRAN (R 4.4.0) | -|viridisLite |0.4.2 |2023-05-02 |CRAN (R 4.4.1) | |vroom |1.6.5 |2023-12-05 |CRAN (R 4.4.0) | |withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) | |writexl |1.5.4 |2025-04-15 |CRAN (R 4.4.1) | diff --git a/app_docker/app.R b/app_docker/app.R index 21c246e1..0f193d1d 100644 --- a/app_docker/app.R +++ b/app_docker/app.R @@ -1,7 +1,7 @@ ######## -#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpigVRui/file787d121e91b3.R +#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpFr1XvR/file15f634a33505f.R ######## i18n_path <- here::here("translations") @@ -62,7 +62,7 @@ i18n$set_translation_language("en") #### Current file: /Users/au301842/FreesearchR/R//app_version.R ######## -app_version <- function()'25.10.5' +app_version <- function()'25.11.1' ######## @@ -83,7 +83,6 @@ app_version <- function()'25.10.5' #' mtcars |> baseline_table() #' mtcars |> baseline_table(fun.args = list(by = "gear")) baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary, vars = NULL) { - out <- do.call(fun, c(list(data = data), fun.args)) return(out) } @@ -94,19 +93,26 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary, #' #' @param data data #' @param ... passed as fun.arg to baseline_table() -#' @param strat.var grouping/strat variable #' @param add.p add comparison/p-value #' @param add.overall add overall column +#' @param by.var specify stratification variable +#' @param theme set table theme +#' @param detail_level specify detail level. Either "minimal" or "extended". #' #' @returns gtsummary table list object #' @export #' #' @examples #' mtcars |> create_baseline(by.var = "gear", add.p = "yes" == "yes") +#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended") +#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm") +#' #' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet") -create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon")) { +create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) { theme <- match.arg(theme) + detail_level <- match.arg(detail_level) + if (by.var == "none" | !by.var %in% names(data)) { by.var <- NULL } @@ -124,11 +130,32 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS args <- list(...) + # browser() + + if (!any(hasName(args, c("type", "statistic")))) { + if (detail_level == "extended") { + args <- + modifyList( + args, + list( + type = list(gtsummary::all_continuous() ~ "continuous2", + gtsummary::all_dichotomous() ~ "categorical"), + statistic = list(gtsummary::all_continuous() ~ c( + "{median} ({p25}, {p75})", + "{mean} ({sd})", + "{min}, {max}")) + ) + ) + } + } + parameters <- list( data = data, - fun.args = list(by = by.var, ...) + fun.args = purrr::list_flatten(list(by = by.var, args)) ) + + # browser() out <- do.call( baseline_table, parameters @@ -4274,7 +4301,7 @@ data_types <- function() { #### Current file: /Users/au301842/FreesearchR/R//hosted_version.R ######## -hosted_version <- function()'v25.10.5-251031' +hosted_version <- function()'v25.11.1-251109' ######## @@ -9914,6 +9941,17 @@ ui_elements <- function(selection) { value = "acc_pan_chars", title = "Settings", icon = bsicons::bs_icon("table"), + # vectorSelectInput( + # inputId = "baseline_theme", + # selected = "none", + # label = i18n$t("Select table theme"), + # choices = c( + # "The Journal of the American Medical Association" = "jama", + # "The Lancet"="lancet", + # "The New England Journal of Medicine" = "nejm", + # "The Quarterly Journal of Economics" = "qjecon") + # ), + shiny::uiOutput("detail_level"), shiny::uiOutput("strat_var"), shiny::helpText(i18n$t("Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.")), shiny::conditionalPanel( @@ -13201,7 +13239,7 @@ server <- function(input, output, session) { columnSelectInput( inputId = "strat_var", selected = "none", - label = "Select variable to stratify baseline", + label = i18n$t("Select variable to stratify baseline"), data = shiny::reactive(rv$data_filtered)(), col_subset = c( "none", @@ -13210,6 +13248,37 @@ server <- function(input, output, session) { ) }) + # output$baseline_theme <- shiny::renderUI({ + # choices <- + # + # vectorSelectInput( + # inputId = "baseline_theme", + # selected = "none", + # label = i18n$t("Select table theme"), + # choices = c( + # "The Journal of the American Medical Association" = "jama", + # "The Lancet"="lancet", + # "The New England Journal of Medicine" = "nejm", + # "The Quarterly Journal of Economics" = "qjecon") + # ) + # }) + + + output$detail_level <- shiny::renderUI({ + shiny::radioButtons( + inputId = "detail_level", + label = i18n$t("Level of detail"), + selected = "minimal", + inline = TRUE,choiceValues = c("minimal", + "extended"), + choiceNames = c( + i18n$t("Minimal"), + i18n$t("Extensive") + ) + ) + }) + + ############################################################################## ######### ######### Descriptive evaluations @@ -13235,30 +13304,39 @@ server <- function(input, output, session) { # }) + + shiny::observeEvent( list( input$act_eval ), { shiny::req(input$strat_var) + # shiny::req(input$baseline_theme) + shiny::req(input$detail_level) shiny::req(rv$list$data) + + parameters <- list( by.var = input$strat_var, add.p = input$add_p == "yes", - add.overall = TRUE + add.overall = TRUE, + # theme = input$baseline_theme, + detail_level = input$detail_level ) ## Limits maximum number of levels included in baseline table to 20. data <- rv$list$data |> lapply(\(.x){ # browser() - if (is.factor(.x)){ - cut_var(.x,breaks=20,type="top") + if (is.factor(.x)) { + cut_var(.x, breaks = 20, type = "top") } else { .x } - }) |> dplyr::bind_cols() + }) |> + dplyr::bind_cols() # Attempt to introduce error on analysing too large dataset # tryCatch( diff --git a/app_docker/translations/translation_da.csv b/app_docker/translations/translation_da.csv index 22cafcfa..6f697a07 100644 --- a/app_docker/translations/translation_da.csv +++ b/app_docker/translations/translation_da.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/app_docker/translations/translation_de.csv b/app_docker/translations/translation_de.csv index d8947867..54a25983 100644 --- a/app_docker/translations/translation_de.csv +++ b/app_docker/translations/translation_de.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/app_docker/translations/translation_sv.csv b/app_docker/translations/translation_sv.csv index b9e18015..99bed52e 100644 --- a/app_docker/translations/translation_sv.csv +++ b/app_docker/translations/translation_sv.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/app_docker/translations/translation_sw.csv b/app_docker/translations/translation_sw.csv index 70d1fe1c..d94b1894 100644 --- a/app_docker/translations/translation_sw.csv +++ b/app_docker/translations/translation_sw.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/inst/translations/translation_da.csv b/inst/translations/translation_da.csv index 22cafcfa..6f697a07 100644 --- a/inst/translations/translation_da.csv +++ b/inst/translations/translation_da.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/inst/translations/translation_de.csv b/inst/translations/translation_de.csv index d8947867..54a25983 100644 --- a/inst/translations/translation_de.csv +++ b/inst/translations/translation_de.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/inst/translations/translation_sv.csv b/inst/translations/translation_sv.csv index b9e18015..99bed52e 100644 --- a/inst/translations/translation_sv.csv +++ b/inst/translations/translation_sv.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/inst/translations/translation_sw.csv b/inst/translations/translation_sw.csv index 70d1fe1c..d94b1894 100644 --- a/inst/translations/translation_sw.csv +++ b/inst/translations/translation_sw.csv @@ -291,3 +291,7 @@ "Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels" "Side-by-side barplot","Side-by-side barplot" "Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels" +"Select table theme","Select table theme" +"Level of detail","Level of detail" +"Minimal","Minimal" +"Extensive","Extensive" diff --git a/man/create_baseline.Rd b/man/create_baseline.Rd index 4c13ff3c..df159590 100644 --- a/man/create_baseline.Rd +++ b/man/create_baseline.Rd @@ -10,7 +10,8 @@ create_baseline( by.var, add.p = FALSE, add.overall = FALSE, - theme = c("jama", "lancet", "nejm", "qjecon") + theme = c("jama", "lancet", "nejm", "qjecon"), + detail_level = c("minimal", "extended") ) } \arguments{ @@ -18,11 +19,15 @@ create_baseline( \item{...}{passed as fun.arg to baseline_table()} +\item{by.var}{specify stratification variable} + \item{add.p}{add comparison/p-value} \item{add.overall}{add overall column} -\item{strat.var}{grouping/strat variable} +\item{theme}{set table theme} + +\item{detail_level}{specify detail level. Either "minimal" or "extended".} } \value{ gtsummary table list object @@ -32,5 +37,8 @@ Create a baseline table } \examples{ mtcars |> create_baseline(by.var = "gear", add.p = "yes" == "yes") +mtcars |> create_baseline(by.var = "gear", detail_level = "extended") +mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm") + create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet") }