mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 09:59:39 +02:00
This commit is contained in:
parent
a82a5c6378
commit
6db500d13a
3 changed files with 23 additions and 4 deletions
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
|||
# FreesearchR 25.5.5
|
||||
|
||||
- *FIX* several minor bugs and polish
|
||||
|
||||
# FreesearchR 25.5.4
|
||||
|
||||
- *FIX* correctly omit NAs in `data_type()` call
|
||||
|
|
|
@ -96,15 +96,17 @@
|
|||
#' # gtsummary::bold_p()
|
||||
#' }
|
||||
regression_table <- function(x, ...) {
|
||||
args <- list(...)
|
||||
|
||||
if ("list" %in% class(x)) {
|
||||
x |>
|
||||
purrr::map(\(.m){
|
||||
regression_table_create(x = .m, ...) |>
|
||||
regression_table_create(x = .m, args.list = args) |>
|
||||
gtsummary::add_n()
|
||||
}) |>
|
||||
gtsummary::tbl_stack()
|
||||
} else {
|
||||
regression_table_create(x, ...)
|
||||
regression_table_create(x, args.list = args)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7090,18 +7090,31 @@ symmetrical_scale_x_log10 <- function(plot, breaks = c(1, 2, 3, 5, 10), ...) {
|
|||
#' # gtsummary::bold_p()
|
||||
#' }
|
||||
regression_table <- function(x, ...) {
|
||||
args <- list(...)
|
||||
|
||||
if ("list" %in% class(x)) {
|
||||
x |>
|
||||
purrr::map(\(.m){
|
||||
regression_table_create(x = .m, ...) |>
|
||||
regression_table_create(x = .m, args.list = args) |>
|
||||
gtsummary::add_n()
|
||||
}) |>
|
||||
gtsummary::tbl_stack()
|
||||
} else {
|
||||
regression_table_create(x, ...)
|
||||
regression_table_create(x, args.list = args)
|
||||
}
|
||||
}
|
||||
|
||||
#' Create regression summary table
|
||||
#'
|
||||
#' @param x (list of) regression model
|
||||
#' @param ... ignored for now
|
||||
#' @param args.list args.list for the summary function
|
||||
#' @param fun table summary function. Default is "gtsummary::tbl_regression"
|
||||
#' @param theme summary table theme
|
||||
#'
|
||||
#' @returns gtsummary list object
|
||||
#' @export
|
||||
#'
|
||||
regression_table_create <- function(x, ..., args.list = NULL, fun = "gtsummary::tbl_regression", theme = c("jama", "lancet", "nejm", "qjecon")) {
|
||||
# Stripping custom class
|
||||
class(x) <- class(x)[class(x) != "freesearchr_model"]
|
||||
|
|
Loading…
Add table
Reference in a new issue