From cb0da82cb9456570826887502a9f51119ec8e41c Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Fri, 31 May 2024 20:32:37 -0700 Subject: [PATCH 1/2] closes #163 --- R/ard_aod_wald_test.R | 7 +++++-- man/ard_aod_wald_test.Rd | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/R/ard_aod_wald_test.R b/R/ard_aod_wald_test.R index ec87532ab..ecb883980 100644 --- a/R/ard_aod_wald_test.R +++ b/R/ard_aod_wald_test.R @@ -6,6 +6,7 @@ #' #' @param x regression model object #' @param ... arguments passed to `aod::wald.test(...)` +#' @inheritParams ard_regression #' #' @return data frame #' @export @@ -13,8 +14,10 @@ #' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "aod", reference_pkg = "cardx")) #' lm(AGE ~ ARM, data = cards::ADSL) |> #' ard_aod_wald_test() -ard_aod_wald_test <- function(x, ...) { +ard_aod_wald_test <- function(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, ...) { set_cli_abort_call() + check_pkg_installed("broom.helpers", reference_pkg = "cardx") + # check installed packages --------------------------------------------------- check_pkg_installed("aod", reference_pkg = "cardx") @@ -23,7 +26,7 @@ ard_aod_wald_test <- function(x, ...) { # run regression() ----------------------------------------------------------- reg_model <- cards::eval_capture_conditions( - ard_regression_basic(x, intercept = TRUE, stats_to_remove = c( + ard_regression_basic(x, tidy_fun = tidy_fun, intercept = TRUE, stats_to_remove = c( "var_type", "var_label", "var_class", "label", diff --git a/man/ard_aod_wald_test.Rd b/man/ard_aod_wald_test.Rd index 2469ac1ba..0d7ec6129 100644 --- a/man/ard_aod_wald_test.Rd +++ b/man/ard_aod_wald_test.Rd @@ -4,11 +4,18 @@ \alias{ard_aod_wald_test} \title{ARD Wald Test} \usage{ -ard_aod_wald_test(x, ...) +ard_aod_wald_test( + x, + tidy_fun = broom.helpers::tidy_with_broom_or_parameters, + ... +) } \arguments{ \item{x}{regression model object} +\item{tidy_fun}{(\code{function})\cr +a tidier. Default is \code{\link[broom.helpers:tidy_with_broom_or_parameters]{broom.helpers::tidy_with_broom_or_parameters}}} + \item{...}{arguments passed to \code{aod::wald.test(...)}} } \value{ From 251f3d1899a00423704e3624796c586683318902 Mon Sep 17 00:00:00 2001 From: ddsjoberg Date: Sat, 1 Jun 2024 03:33:32 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.1.0.9052 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d97c22914..01569208a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: cardx Title: Extra Analysis Results Data Utilities -Version: 0.1.0.9051 +Version: 0.1.0.9052 Authors@R: c( person("Daniel", "Sjoberg", , "danield.sjoberg@gmail.com", role = c("aut", "cre")), person("Abinaya", "Yogasekaram", , "abinaya.yogasekaram@contractors.roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index d11bcea46..0d2e90eb9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# cardx 0.1.0.9051 +# cardx 0.1.0.9052 ### Breaking Changes