From c1803f2ab654fb3d74f3db8459a8d9f18f99a5bb Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Mon, 25 Nov 2024 18:36:27 -0500 Subject: [PATCH] Fix check --- R/ard_event_rates.R | 2 +- _pkgdown.yml | 1 + tests/testthat/test-ard_event_rates.R | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/ard_event_rates.R b/R/ard_event_rates.R index 1d4dab81..a2384871 100644 --- a/R/ard_event_rates.R +++ b/R/ard_event_rates.R @@ -157,7 +157,7 @@ ard_event_rates <- function(data, if (ord) { lst_results[[length(lst_results)]] <- lst_results[[length(lst_results)]] |> - mutate(variable_level = as.list(as.character(unlist(variable_level)))) + dplyr::mutate(variable_level = as.list(as.character(unlist(.data$variable_level)))) } } diff --git a/_pkgdown.yml b/_pkgdown.yml index c129d233..e1cfcec2 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -88,6 +88,7 @@ reference: - ard_categorical_ci.data.frame - ard_regression - ard_regression_basic + - ard_event_rates - title: "Helpers" - contents: diff --git a/tests/testthat/test-ard_event_rates.R b/tests/testthat/test-ard_event_rates.R index babf9a9b..68e5a93a 100644 --- a/tests/testthat/test-ard_event_rates.R +++ b/tests/testthat/test-ard_event_rates.R @@ -18,7 +18,7 @@ test_that("ard_event_rates() works with default settings", { variable_level == "CARDIAC DISORDERS", stat_name == "n" ) |> - get_ard_statistics(), + cards::get_ard_statistics(), list( n = cards::ADAE |> dplyr::filter( @@ -98,7 +98,7 @@ test_that("ard_event_rates(ordered) works", { variable_level == "MODERATE", stat_name == "n" ) |> - get_ard_statistics(), + cards::get_ard_statistics(), list( n = adae |> dplyr::arrange(AESEV) |> @@ -214,7 +214,7 @@ test_that("ard_hierarchical_count() works with by variable not present in 'denom group2_level == "MILD", variable_level == "CARDIAC DISORDERS" ) |> - get_ard_statistics(), + cards::get_ard_statistics(), list( n = cards::ADAE |> dplyr::filter(