Skip to content

Commit

Permalink
213 update standalone@main (#225)
Browse files Browse the repository at this point in the history
remove "reference_pkg = cardx" argument for package install checks.
update standalone scripts to pull from insightsengineering repo

closes #213 



--------------------------------------------------------------------------------

Pre-review Checklist (if item does not apply, mark is as complete)
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] PR branch has pulled the most recent updates from master branch:
`usethis::pr_merge_main()`
- [ ] If a bug was fixed, a unit test was added.
- [ ] If a new `ard_*()` function was added, it passes the ARD
structural checks from `cards::check_ard_structure()`.
- [ ] If a new `ard_*()` function was added, `set_cli_abort_call()` has
been set.
- [ ] If a new `ard_*()` function was added and it depends on another
package (such as, `broom`), `is_pkg_installed("broom", reference_pkg =
"cardx")` has been set in the function call and the following added to
the roxygen comments: `@examplesIf
do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom"",
reference_pkg = "cardx"))`
- [ ] Code coverage is suitable for any new functions/features
(generally, 100% coverage for new code): `devtools::test_coverage()`

Reviewer Checklist (if item does not apply, mark is as complete)

- [ ] If a bug was fixed, a unit test was added.
- [ ] Code coverage is suitable for any new functions/features:
`devtools::test_coverage()`

When the branch is ready to be merged:
- [ ] Update `NEWS.md` with the changes from this pull request under the
heading "`# cardx (development version)`". If there is an issue
associated with the pull request, reference it in parentheses at the end
update (see `NEWS.md` for examples).
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] Approve Pull Request
- [ ] Merge the PR. Please use "Squash and merge" or "Rebase and merge".
  • Loading branch information
ayogasekaram authored Oct 22, 2024
1 parent 1a494b9 commit 8692226
Show file tree
Hide file tree
Showing 140 changed files with 390 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pre-review Checklist (if item does not apply, mark is as complete)
- [ ] If a bug was fixed, a unit test was added.
- [ ] If a new `ard_*()` function was added, it passes the ARD structural checks from `cards::check_ard_structure()`.
- [ ] If a new `ard_*()` function was added, `set_cli_abort_call()` has been set.
- [ ] If a new `ard_*()` function was added and it depends on another package (such as, `broom`), `is_pkg_installed("broom", reference_pkg = "cardx")` has been set in the function call and the following added to the roxygen comments: `@examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom"", reference_pkg = "cardx"))`
- [ ] If a new `ard_*()` function was added and it depends on another package (such as, `broom`), `is_pkg_installed("broom")` has been set in the function call and the following added to the roxygen comments: `@examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom""))`
- [ ] Code coverage is suitable for any new functions/features (generally, 100% coverage for new code): `devtools::test_coverage()`

Reviewer Checklist (if item does not apply, mark is as complete)
Expand Down
2 changes: 1 addition & 1 deletion R/add_total_n.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf cardx:::is_pkg_installed("survey", reference_pkg = "cardx")
#' @examplesIf cardx:::is_pkg_installed("survey")
#' svy_titanic <- survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq)
#'
#' ard_total_n(svy_titanic)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_aod_wald_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
#' @return data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("aod", "broom.helpers"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("aod", "broom.helpers")))
#' lm(AGE ~ ARM, data = cards::ADSL) |>
#' ard_aod_wald_test()
ard_aod_wald_test <- function(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("aod", "broom.helpers"), reference_pkg = "cardx")
check_pkg_installed(c("aod", "broom.helpers"))

# check inputs ---------------------------------------------------------------
check_not_missing(x)
Expand Down
2 changes: 1 addition & 1 deletion R/ard_attributes.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey"))
#' data(api, package = "survey")
#' dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
#'
Expand Down
4 changes: 2 additions & 2 deletions R/ard_car_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @return data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom.helpers", "car", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom.helpers", "car", "parameters")))
#' lm(AGE ~ ARM, data = cards::ADSL) |>
#' ard_car_anova()
#'
Expand All @@ -18,7 +18,7 @@ ard_car_anova <- function(x, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(pkg = c("broom.helpers", "car", "parameters"), reference_pkg = "cardx")
check_pkg_installed(pkg = c("broom.helpers", "car", "parameters"))

# check inputs ---------------------------------------------------------------
check_not_missing(x)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_car_vif.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
#' @rdname ard_car_vif
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "car", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "car"))
#' lm(AGE ~ ARM + SEX, data = cards::ADSL) |>
#' ard_car_vif()
ard_car_vif <- function(x, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed("car", reference_pkg = "cardx")
check_pkg_installed("car")

# check inputs ---------------------------------------------------------------
check_not_missing(x)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_categorical.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf cardx:::is_pkg_installed("survey", reference_pkg = "cardx")
#' @examplesIf cardx:::is_pkg_installed("survey")
#' svy_titanic <- survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq)
#'
#' ard_categorical(svy_titanic, variables = c(Class, Age), by = Survived)
Expand All @@ -58,7 +58,7 @@ ard_categorical.survey.design <- function(data,
),
...) {
set_cli_abort_call()
check_pkg_installed(pkg = "survey", reference_pkg = "cardx")
check_pkg_installed(pkg = "survey")
check_dots_empty()
deff <- TRUE # we may update in the future to make this an argument for users

Expand Down
4 changes: 2 additions & 2 deletions R/ard_categorical_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @return an ARD data frame
#' @name ard_categorical_ci
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom"))
#' # compute CI for binary variables
#' ard_categorical_ci(mtcars, variables = c(vs, am), method = "wilson")
#'
Expand Down Expand Up @@ -63,7 +63,7 @@ ard_categorical_ci.data.frame <- function(data,
check_dots_empty()

# check installed packages ---------------------------------------------------
check_pkg_installed(pkg = "broom", reference_pkg = "cardx")
check_pkg_installed(pkg = "broom")

# process inputs -------------------------------------------------------------
cards::process_selectors(data, variables = {{ variables }}, by = {{ by }})
Expand Down
2 changes: 1 addition & 1 deletion R/ard_categorical_ci.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey"))
#' data(api, package = "survey")
#' dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
#'
Expand Down
4 changes: 2 additions & 2 deletions R/ard_continuous.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey"))
#' data(api, package = "survey")
#' dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
#'
Expand All @@ -53,7 +53,7 @@ ard_continuous.survey.design <- function(data, variables, by = NULL,
check_dots_empty()

# check installed packages ---------------------------------------------------
check_pkg_installed(pkg = "survey", reference_pkg = "cardx")
check_pkg_installed(pkg = "survey")

# check inputs ---------------------------------------------------------------
check_not_missing(variables)
Expand Down
2 changes: 1 addition & 1 deletion R/ard_continuous_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @return ARD data frame
#' @name ard_continuous_ci
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom"))
#' ard_continuous_ci(mtcars, variables = c(mpg, hp), method = "wilcox.test")
#' ard_continuous_ci(mtcars, variables = mpg, by = am, method = "t.test")
NULL
Expand Down
2 changes: 1 addition & 1 deletion R/ard_continuous_ci.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "survey"))
#' data(api, package = "survey")
#' dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
#'
Expand Down
4 changes: 2 additions & 2 deletions R/ard_dichotomous.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf cardx:::is_pkg_installed("survey", reference_pkg = "cardx")
#' @examplesIf cardx:::is_pkg_installed("survey")
#' survey::svydesign(ids = ~1, data = mtcars, weights = ~1) |>
#' ard_dichotomous(by = vs, variables = c(cyl, am), value = list(cyl = 4))
ard_dichotomous.survey.design <- function(data,
Expand All @@ -32,7 +32,7 @@ ard_dichotomous.survey.design <- function(data,
...) {
set_cli_abort_call()
check_dots_empty()
check_pkg_installed(pkg = "survey", reference_pkg = "cardx")
check_pkg_installed(pkg = "survey")

# check inputs ---------------------------------------------------------------
check_not_missing(variables)
Expand Down
8 changes: 4 additions & 4 deletions R/ard_effectsize_cohens_d.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' The data are then passed as
#' `effectsize::cohens_d(x = data_wide[[<by level 1>]], y = data_wide[[<by level 2>]], paired = TRUE, ...)`.
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters")))
#' cards::ADSL |>
#' dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
#' ard_effectsize_cohens_d(by = ARM, variables = AGE)
Expand All @@ -52,7 +52,7 @@ ard_effectsize_cohens_d <- function(data, by, variables, conf.level = 0.95, ...)
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("effectsize", "parameters"), reference_pkg = "cardx")
check_pkg_installed(c("effectsize", "parameters"))

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down Expand Up @@ -103,7 +103,7 @@ ard_effectsize_paired_cohens_d <- function(data, by, variables, id, conf.level =
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("effectsize", "parameters"), reference_pkg = "cardx")
check_pkg_installed(c("effectsize", "parameters"))

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down Expand Up @@ -175,7 +175,7 @@ ard_effectsize_paired_cohens_d <- function(data, by, variables, id, conf.level =
#'
#' @return ARD data frame
#' @keywords internal
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters")))
#' cardx:::.format_cohens_d_results(
#' by = "ARM",
#' variable = "AGE",
Expand Down
8 changes: 4 additions & 4 deletions R/ard_effectsize_hedges_g.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' The data are then passed as
#' `effectsize::hedges_g(x = data_wide[[<by level 1>]], y = data_wide[[<by level 2>]], paired = TRUE, ...)`.
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters")))
#' cards::ADSL |>
#' dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
#' ard_effectsize_hedges_g(by = ARM, variables = AGE)
Expand All @@ -52,7 +52,7 @@ ard_effectsize_hedges_g <- function(data, by, variables, conf.level = 0.95, ...)
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("effectsize", "parameters"), reference_pkg = "cardx")
check_pkg_installed(c("effectsize", "parameters"))

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down Expand Up @@ -101,7 +101,7 @@ ard_effectsize_paired_hedges_g <- function(data, by, variables, id, conf.level =
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("effectsize", "parameters"), reference_pkg = "cardx")
check_pkg_installed(c("effectsize", "parameters"))

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down Expand Up @@ -158,7 +158,7 @@ ard_effectsize_paired_hedges_g <- function(data, by, variables, id, conf.level =
#'
#' @return ARD data frame
#' @keywords internal
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("effectsize", "parameters")))
#' cardx:::.format_hedges_g_results(
#' by = "ARM",
#' variable = "AGE",
Expand Down
4 changes: 2 additions & 2 deletions R/ard_emmeans_mean_difference.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "emmeans", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "emmeans"))
#' ard_emmeans_mean_difference(
#' data = mtcars,
#' formula = mpg ~ am + cyl,
Expand All @@ -55,7 +55,7 @@ ard_emmeans_mean_difference <- function(data, formula, method,
set_cli_abort_call()

# check package installation -------------------------------------------------
check_pkg_installed(c("emmeans", package), reference_pkg = "cardx")
check_pkg_installed(c("emmeans", package))
check_not_missing(data)
check_not_missing(formula)
check_not_missing(method)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_missing.survey.design.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @return an ARD data frame of class 'card'
#' @export
#'
#' @examplesIf cardx:::is_pkg_installed("survey", reference_pkg = "cardx")
#' @examplesIf cardx:::is_pkg_installed("survey")
#' svy_titanic <- survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq)
#'
#' ard_missing(svy_titanic, variables = c(Class, Age), by = Survived)
Expand Down Expand Up @@ -37,7 +37,7 @@ ard_missing.survey.design <- function(data,
...) {
set_cli_abort_call()
check_dots_empty()
check_pkg_installed(pkg = "survey", reference_pkg = "cardx")
check_pkg_installed(pkg = "survey")

# process inputs -------------------------------------------------------------
check_not_missing(variables)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @return data frame
#' @name ard_regression
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom.helpers", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom.helpers"))
#' lm(AGE ~ ARM, data = cards::ADSL) |>
#' ard_regression(add_estimate_to_reference_rows = TRUE)
NULL
Expand All @@ -28,7 +28,7 @@ ard_regression.default <- function(x, tidy_fun = broom.helpers::tidy_with_broom_
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(pkg = "broom.helpers", reference_pkg = "cardx")
check_pkg_installed(pkg = "broom.helpers")

# check inputs ---------------------------------------------------------------
check_not_missing(x)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_regression_basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' @name ard_regression_basic
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom.helpers", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom.helpers"))
#' lm(AGE ~ ARM, data = cards::ADSL) |>
#' ard_regression_basic()
ard_regression_basic <- function(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters,
Expand All @@ -38,7 +38,7 @@ ard_regression_basic <- function(x, tidy_fun = broom.helpers::tidy_with_broom_or
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(pkg = "broom.helpers", reference_pkg = "cardx")
check_pkg_installed(pkg = "broom.helpers")

# check inputs ---------------------------------------------------------------
check_not_missing(x)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_smd_smd.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "smd", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "smd"))
#' ard_smd_smd(cards::ADSL, by = SEX, variables = AGE)
#' ard_smd_smd(cards::ADSL, by = SEX, variables = AGEGR1)
ard_smd_smd <- function(data, by, variables, std.error = TRUE, conf.level = 0.95, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed("smd", reference_pkg = "cardx")
check_pkg_installed("smd")

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down
6 changes: 3 additions & 3 deletions R/ard_stats_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' @return ARD data frame
#' @name ard_stats_anova
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom", "withr", "lme4"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom", "withr", "lme4")))
#' anova(
#' lm(mpg ~ am, mtcars),
#' lm(mpg ~ am + hp, mtcars)
Expand Down Expand Up @@ -73,7 +73,7 @@ ard_stats_anova.anova <- function(x, method_text = "ANOVA results from `stats::a

# check inputs ---------------------------------------------------------------
check_dots_empty()
check_pkg_installed("broom", reference_pkg = "cardx")
check_pkg_installed("broom")
check_string(method_text)

# return df in cards formats -------------------------------------------------
Expand All @@ -100,7 +100,7 @@ ard_stats_anova.data.frame <- function(x,

# check inputs ---------------------------------------------------------------
check_dots_empty()
check_pkg_installed(c("broom", "withr", package), reference_pkg = "cardx")
check_pkg_installed(c("broom", "withr", package))
check_not_missing(formulas)
check_class(formulas, cls = "list")
walk(
Expand Down
4 changes: 2 additions & 2 deletions R/ard_stats_aov.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom.helpers", "parameters"), reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = c("broom.helpers", "parameters")))
#' ard_stats_aov(AGE ~ ARM, data = cards::ADSL)
ard_stats_aov <- function(formula, data, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed(c("broom.helpers", "parameters"), reference_pkg = "cardx")
check_pkg_installed(c("broom.helpers", "parameters"))

# check/process inputs -------------------------------------------------------
check_not_missing(formula)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_stats_chisq_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#' @return ARD data frame
#' @export
#'
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom", reference_pkg = "cardx"))
#' @examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom"))
#' cards::ADSL |>
#' ard_stats_chisq_test(by = "ARM", variables = "AGEGR1")
ard_stats_chisq_test <- function(data, by, variables, ...) {
set_cli_abort_call()

# check installed packages ---------------------------------------------------
check_pkg_installed("broom", reference_pkg = "cardx")
check_pkg_installed("broom")

# check/process inputs -------------------------------------------------------
check_not_missing(data)
Expand Down
Loading

0 comments on commit 8692226

Please sign in to comment.