From 7031d281ca2fed4d5fd3fddbbad188e2321c33ac Mon Sep 17 00:00:00 2001 From: ayogasekaram Date: Tue, 13 Aug 2024 19:21:46 +0000 Subject: [PATCH] updating for style check. --- tests/testthat/test-ard_categorical.survey.design.R | 12 ++++++------ .../testthat/test-ard_categorical_ci.survey.design.R | 2 +- tests/testthat/test-ard_continuous.survey.design.R | 1 - tests/testthat/test-ard_effectsize_cohens_d.R | 2 +- tests/testthat/test-ard_effectsize_hedges_g.R | 3 +-- tests/testthat/test-ard_stats_chisq_test.R | 2 +- tests/testthat/test-ard_stats_fisher_test.R | 2 +- tests/testthat/test-ard_stats_kruskal_test.R | 2 +- tests/testthat/test-ard_stats_mcnemar_test.R | 2 +- tests/testthat/test-ard_stats_mood_test.R | 2 +- tests/testthat/test-ard_stats_oneway_test.R | 2 +- tests/testthat/test-ard_stats_prop_test.R | 2 +- tests/testthat/test-ard_stats_t_test.R | 2 +- tests/testthat/test-ard_stats_t_test_onesample.R | 2 +- tests/testthat/test-ard_stats_wilcox_test.R | 2 +- .../testthat/test-ard_stats_wilcox_test_onesample.R | 2 +- tests/testthat/test-ard_survey_svychisq.R | 2 +- tests/testthat/test-ard_survey_svyranktest.R | 2 +- tests/testthat/test-ard_survey_svyttest.R | 2 +- tests/testthat/test-ard_survival_survdiff.R | 2 +- tests/testthat/test-ard_survival_survfit_diff.R | 2 +- 21 files changed, 25 insertions(+), 27 deletions(-) diff --git a/tests/testthat/test-ard_categorical.survey.design.R b/tests/testthat/test-ard_categorical.survey.design.R index d3fce90f0..2dfc1caa1 100644 --- a/tests/testthat/test-ard_categorical.survey.design.R +++ b/tests/testthat/test-ard_categorical.survey.design.R @@ -1296,12 +1296,12 @@ test_that("ard_categorical follows ard structure", { svy_titanic <- survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq) expect_silent( - ard_categorical( - svy_titanic, - variables = c(Class, Age), - by = Survived, - denominator = "row" - ) |> + ard_categorical( + svy_titanic, + variables = c(Class, Age), + by = Survived, + denominator = "row" + ) |> cards::check_ard_structure(method = FALSE) ) }) diff --git a/tests/testthat/test-ard_categorical_ci.survey.design.R b/tests/testthat/test-ard_categorical_ci.survey.design.R index 310516f6a..978ac521b 100644 --- a/tests/testthat/test-ard_categorical_ci.survey.design.R +++ b/tests/testthat/test-ard_categorical_ci.survey.design.R @@ -114,7 +114,7 @@ test_that("ard_categorical_ci(method)", { test_that("ard_categorical_ci.survey.design() follows ard structure", { expect_silent( - ard_categorical_ci(dclus1, variables = c(both, awards), method = "likelihood")|> + ard_categorical_ci(dclus1, variables = c(both, awards), method = "likelihood") |> cards::check_ard_structure(method = TRUE) ) }) diff --git a/tests/testthat/test-ard_continuous.survey.design.R b/tests/testthat/test-ard_continuous.survey.design.R index 498944a86..110deebb6 100644 --- a/tests/testthat/test-ard_continuous.survey.design.R +++ b/tests/testthat/test-ard_continuous.survey.design.R @@ -518,4 +518,3 @@ test_that("ard_continuous.survey.design() follows ard structure", { cards::check_ard_structure(method = FALSE) ) }) - diff --git a/tests/testthat/test-ard_effectsize_cohens_d.R b/tests/testthat/test-ard_effectsize_cohens_d.R index a2e0716bf..e1b826fb8 100644 --- a/tests/testthat/test-ard_effectsize_cohens_d.R +++ b/tests/testthat/test-ard_effectsize_cohens_d.R @@ -114,7 +114,7 @@ test_that("ard_effectsize_cohens_d() follows ard structure", { expect_silent( ADSL_paired |> - ard_effectsize_paired_cohens_d(by = ARM, variable = AGE, id = USUBJID)|> + ard_effectsize_paired_cohens_d(by = ARM, variable = AGE, id = USUBJID) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_effectsize_hedges_g.R b/tests/testthat/test-ard_effectsize_hedges_g.R index 0e721a882..c908ddb21 100644 --- a/tests/testthat/test-ard_effectsize_hedges_g.R +++ b/tests/testthat/test-ard_effectsize_hedges_g.R @@ -110,8 +110,7 @@ test_that("ard_effectsize_cohens_d() follows ard structure", { expect_silent( ADSL_paired |> - ard_effectsize_paired_hedges_g(by = ARM, variable = AGE, id = USUBJID)|> + ard_effectsize_paired_hedges_g(by = ARM, variable = AGE, id = USUBJID) |> cards::check_ard_structure(method = FALSE) ) }) - diff --git a/tests/testthat/test-ard_stats_chisq_test.R b/tests/testthat/test-ard_stats_chisq_test.R index c6eb8bac7..938860b62 100644 --- a/tests/testthat/test-ard_stats_chisq_test.R +++ b/tests/testthat/test-ard_stats_chisq_test.R @@ -54,7 +54,7 @@ test_that("shuffle_ard fills missing group levels if the group is meaningful", { test_that("ard_stats_chisq_test() follows ard structure", { expect_silent( cards::ADSL |> - ard_stats_chisq_test(by = ARM, variables = AGEGR1)|> + ard_stats_chisq_test(by = ARM, variables = AGEGR1) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_fisher_test.R b/tests/testthat/test-ard_stats_fisher_test.R index 0210476da..c0ad682ab 100644 --- a/tests/testthat/test-ard_stats_fisher_test.R +++ b/tests/testthat/test-ard_stats_fisher_test.R @@ -33,7 +33,7 @@ test_that("ard_stats_fisher_test() works", { test_that("ard_stats_fisher_test() follows ard structure", { expect_silent( cards::ADSL[1:20, ] |> - ard_stats_fisher_test(by = ARM, variables = AGEGR1)|> + ard_stats_fisher_test(by = ARM, variables = AGEGR1) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_kruskal_test.R b/tests/testthat/test-ard_stats_kruskal_test.R index 138bae8b0..bbc50b971 100644 --- a/tests/testthat/test-ard_stats_kruskal_test.R +++ b/tests/testthat/test-ard_stats_kruskal_test.R @@ -40,7 +40,7 @@ test_that("ard_stats_kruskal_test() works", { test_that("ard_stats_kruskal_test() follows ard structure", { expect_silent( cards::ADSL |> - ard_stats_kruskal_test(by = ARM, variable = BMIBL)|> + ard_stats_kruskal_test(by = ARM, variable = BMIBL) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_mcnemar_test.R b/tests/testthat/test-ard_stats_mcnemar_test.R index ff8937afe..7ae17ae4d 100644 --- a/tests/testthat/test-ard_stats_mcnemar_test.R +++ b/tests/testthat/test-ard_stats_mcnemar_test.R @@ -72,7 +72,7 @@ test_that("ard_stats_mcnemar_test() works", { test_that("ard_stats_mcnemar_test() follows ard structure", { expect_silent( cards::ADSL |> - ard_stats_mcnemar_test(by = SEX, variables = EFFFL)|> + ard_stats_mcnemar_test(by = SEX, variables = EFFFL) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_mood_test.R b/tests/testthat/test-ard_stats_mood_test.R index d7160afdf..2cb0e0833 100644 --- a/tests/testthat/test-ard_stats_mood_test.R +++ b/tests/testthat/test-ard_stats_mood_test.R @@ -39,7 +39,7 @@ test_that("ard_stats_mood_test() works", { test_that("ard_stats_mood_test() follows ard structure", { expect_silent( cards::ADSL |> - ard_stats_mood_test(by = SEX, variable = AGE)|> + ard_stats_mood_test(by = SEX, variable = AGE) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_oneway_test.R b/tests/testthat/test-ard_stats_oneway_test.R index 424e72819..001266563 100644 --- a/tests/testthat/test-ard_stats_oneway_test.R +++ b/tests/testthat/test-ard_stats_oneway_test.R @@ -30,7 +30,7 @@ test_that("ard_stats_oneway_test() works", { test_that("ard_stats_oneway_test() follows ard structure", { expect_silent( - ard_stats_oneway_test(AGE ~ ARM, data = cards::ADSL)|> + ard_stats_oneway_test(AGE ~ ARM, data = cards::ADSL) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_prop_test.R b/tests/testthat/test-ard_stats_prop_test.R index 60d55d51c..73d632c67 100644 --- a/tests/testthat/test-ard_stats_prop_test.R +++ b/tests/testthat/test-ard_stats_prop_test.R @@ -89,7 +89,7 @@ test_that("ard_stats_prop_test() error messaging", { test_that("ard_stats_prop_test() follows ard structure", { expect_silent( mtcars |> - ard_stats_prop_test(by = vs, variables = am, conf.level = 0.90)|> + ard_stats_prop_test(by = vs, variables = am, conf.level = 0.90) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_t_test.R b/tests/testthat/test-ard_stats_t_test.R index c9d72ed04..7aedd3dba 100644 --- a/tests/testthat/test-ard_stats_t_test.R +++ b/tests/testthat/test-ard_stats_t_test.R @@ -120,7 +120,7 @@ test_that("ard_stats_t_test() follows ard structure", { expect_silent( cards::ADSL |> dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |> - ard_stats_t_test(by = ARM, variable = AGE, var.equal = TRUE)|> + ard_stats_t_test(by = ARM, variable = AGE, var.equal = TRUE) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_t_test_onesample.R b/tests/testthat/test-ard_stats_t_test_onesample.R index 3e50350d8..f6e128a50 100644 --- a/tests/testthat/test-ard_stats_t_test_onesample.R +++ b/tests/testthat/test-ard_stats_t_test_onesample.R @@ -57,7 +57,7 @@ test_that("ard_stats_t_test_onesample() follows ard structure", { by = ARM, conf.level = 0.9, mu = 1 - )|> + ) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_wilcox_test.R b/tests/testthat/test-ard_stats_wilcox_test.R index 5fe1c07a1..322a4ac57 100644 --- a/tests/testthat/test-ard_stats_wilcox_test.R +++ b/tests/testthat/test-ard_stats_wilcox_test.R @@ -127,7 +127,7 @@ test_that("ard_stats_wilcox_test() follows ard structure", { expect_silent( cards::ADSL |> dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |> - ard_stats_wilcox_test(by = ARM, variable = AGE, correct = FALSE, conf.int = TRUE)|> + ard_stats_wilcox_test(by = ARM, variable = AGE, correct = FALSE, conf.int = TRUE) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_stats_wilcox_test_onesample.R b/tests/testthat/test-ard_stats_wilcox_test_onesample.R index 51607d9f4..89cc5667d 100644 --- a/tests/testthat/test-ard_stats_wilcox_test_onesample.R +++ b/tests/testthat/test-ard_stats_wilcox_test_onesample.R @@ -60,7 +60,7 @@ test_that("ard_stats_wilcox_test_onesample() follows ard structure", { conf.level = 0.9, conf.int = TRUE, mu = 1 - )|> + ) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_survey_svychisq.R b/tests/testthat/test-ard_survey_svychisq.R index 4ccdd6839..86ed81e4b 100644 --- a/tests/testthat/test-ard_survey_svychisq.R +++ b/tests/testthat/test-ard_survey_svychisq.R @@ -75,7 +75,7 @@ test_that("ard_survey_svychisq() follows ard structure", { variables = sch.wide, by = comp.imp, statistic = "F" - )|> + ) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_survey_svyranktest.R b/tests/testthat/test-ard_survey_svyranktest.R index 34436ba3b..9df43c185 100644 --- a/tests/testthat/test-ard_survey_svyranktest.R +++ b/tests/testthat/test-ard_survey_svyranktest.R @@ -49,7 +49,7 @@ test_that("ard_survey_svyranktest() follows ard structure", { variable = enroll, by = comp.imp, test = "wilcoxon" - )|> + ) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_survey_svyttest.R b/tests/testthat/test-ard_survey_svyttest.R index 89321a8ad..ece44b7e3 100644 --- a/tests/testthat/test-ard_survey_svyttest.R +++ b/tests/testthat/test-ard_survey_svyttest.R @@ -83,7 +83,7 @@ test_that("ard_survey_svyttest() follows ard structure", { variable = enroll, by = comp.imp, conf.level = 0.9 - )|> + ) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_survival_survdiff.R b/tests/testthat/test-ard_survival_survdiff.R index 35809d559..eb2a17031 100644 --- a/tests/testthat/test-ard_survival_survdiff.R +++ b/tests/testthat/test-ard_survival_survdiff.R @@ -65,7 +65,7 @@ test_that("ard_survival_survdiff() follows ard structure", { data(api, package = "survey") dclus2 <- survey::svydesign(id = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) expect_silent( - ard_survival_survdiff(survival::Surv(AVAL, CNSR) ~ TRTA, data = cards::ADTTE)|> + ard_survival_survdiff(survival::Surv(AVAL, CNSR) ~ TRTA, data = cards::ADTTE) |> cards::check_ard_structure() ) }) diff --git a/tests/testthat/test-ard_survival_survfit_diff.R b/tests/testthat/test-ard_survival_survfit_diff.R index d19ba6f0e..f99146874 100644 --- a/tests/testthat/test-ard_survival_survfit_diff.R +++ b/tests/testthat/test-ard_survival_survfit_diff.R @@ -66,7 +66,7 @@ test_that("ard_survival_survfit_diff() follows ard structure", { withr::local_package("survival") sf <- survfit(Surv(AVAL, 1 - CNSR) ~ SEX, cards::ADTTE) expect_silent( - ard_survival_survfit_diff(sf, times = c(25, 50))|> + ard_survival_survfit_diff(sf, times = c(25, 50)) |> cards::check_ard_structure() ) })