mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
feat: loading of local data was internalised based on the datamods package
This commit is contained in:
parent
2c39313ffb
commit
9c1d6ed630
11 changed files with 467 additions and 69 deletions
|
|
@ -70,38 +70,6 @@
|
|||
#' purrr::map(regression_table) |>
|
||||
#' tbl_merge()
|
||||
#' }
|
||||
#' regression_table <- function(x, ...) {
|
||||
#' UseMethod("regression_table")
|
||||
#' }
|
||||
#'
|
||||
#' #' @rdname regression_table
|
||||
#' #' @export
|
||||
#' regression_table.list <- function(x, ...) {
|
||||
#' x |>
|
||||
#' purrr::map(\(.m){
|
||||
#' regression_table(x = .m, ...) |>
|
||||
#' gtsummary::add_n()
|
||||
#' }) |>
|
||||
#' gtsummary::tbl_stack()
|
||||
#' }
|
||||
#'
|
||||
#' #' @rdname regression_table
|
||||
#' #' @export
|
||||
#' regression_table.default <- function(x, ..., args.list = NULL, fun = "gtsummary::tbl_regression") {
|
||||
#' # Stripping custom class
|
||||
#' class(x) <- class(x)[class(x) != "freesearchr_model"]
|
||||
#'
|
||||
#' if (any(c(length(class(x)) != 1, class(x) != "lm"))) {
|
||||
#' if (!"exponentiate" %in% names(args.list)) {
|
||||
#' args.list <- c(args.list, list(exponentiate = TRUE))
|
||||
#' }
|
||||
#' }
|
||||
#'
|
||||
#' out <- do.call(getfun(fun), c(list(x = x), args.list))
|
||||
#' out |>
|
||||
#' gtsummary::add_glance_source_note() # |>
|
||||
#' # gtsummary::bold_p()
|
||||
#' }
|
||||
regression_table <- function(x, ...) {
|
||||
args <- list(...)
|
||||
|
||||
|
|
@ -179,5 +147,3 @@ tbl_merge <- function(data) {
|
|||
}
|
||||
}
|
||||
|
||||
# as_kable(tbl) |> write_lines(file=here::here("inst/apps/data_analysis_modules/www/_table1.md"))
|
||||
# as_kable_extra(tbl)|> write_lines(file=here::here("inst/apps/data_analysis_modules/www/table1.md"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue