Skip to content

Commit

Permalink
updating for style check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayogasekaram committed Aug 13, 2024
1 parent 00416ae commit 7031d28
Showing 21 changed files with 25 additions and 27 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-ard_categorical.survey.design.R
Original file line number Diff line number Diff line change
@@ -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)
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_categorical_ci.survey.design.R
Original file line number Diff line number Diff line change
@@ -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)
)
})
1 change: 0 additions & 1 deletion tests/testthat/test-ard_continuous.survey.design.R
Original file line number Diff line number Diff line change
@@ -518,4 +518,3 @@ test_that("ard_continuous.survey.design() follows ard structure", {
cards::check_ard_structure(method = FALSE)
)
})

2 changes: 1 addition & 1 deletion tests/testthat/test-ard_effectsize_cohens_d.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
3 changes: 1 addition & 2 deletions tests/testthat/test-ard_effectsize_hedges_g.R
Original file line number Diff line number Diff line change
@@ -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)
)
})

2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_chisq_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_fisher_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_kruskal_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_mcnemar_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_mood_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_oneway_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_prop_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_t_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_t_test_onesample.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_wilcox_test.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_stats_wilcox_test_onesample.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_survey_svychisq.R
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ test_that("ard_survey_svychisq() follows ard structure", {
variables = sch.wide,
by = comp.imp,
statistic = "F"
)|>
) |>
cards::check_ard_structure()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_survey_svyranktest.R
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ test_that("ard_survey_svyranktest() follows ard structure", {
variable = enroll,
by = comp.imp,
test = "wilcoxon"
)|>
) |>
cards::check_ard_structure()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_survey_svyttest.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_survival_survdiff.R
Original file line number Diff line number Diff line change
@@ -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()
)
})
2 changes: 1 addition & 1 deletion tests/testthat/test-ard_survival_survfit_diff.R
Original file line number Diff line number Diff line change
@@ -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()
)
})

0 comments on commit 7031d28

Please sign in to comment.