diff --git a/inst/WORDLIST b/inst/WORDLIST index a85b9c57d..719e85a6e 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -5,6 +5,7 @@ CMD Chisq Clopper Codecov +Haenszel Hoffmann Jeffreys Kaplan diff --git a/tests/testthat/test-ard_stats_mantelhaen_test.R b/tests/testthat/test-ard_stats_mantelhaen_test.R index 8067eb3bc..b242cea4f 100644 --- a/tests/testthat/test-ard_stats_mantelhaen_test.R +++ b/tests/testthat/test-ard_stats_mantelhaen_test.R @@ -34,7 +34,8 @@ test_that("ard_stats_mantelhaen_test.data.frame() works", { test_that("ard_stats_mantelhaen_test.array() works", { penicillin <- array( - c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), dim = c(2, 2, 5), + c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), + dim = c(2, 2, 5), dimnames = list( Delay = c("None", "1.5h"), Response = c("Cured", "Died"), Penicillin.Level = c("1/8", "1/4", "1/2", "1", "4") ) @@ -47,7 +48,8 @@ test_that("ard_stats_mantelhaen_test.array() works", { # error messages for incorrect array structure bad_array <- array( - c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), dim = c(4, 5), + c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), + dim = c(4, 5), dimnames = list( Delay = c("None", "1.5h", "Cured", "Died"), Penicillin.Level = c("1/8", "1/4", "1/2", "1", "4") ) @@ -58,7 +60,8 @@ test_that("ard_stats_mantelhaen_test.array() works", { error = TRUE ) bad_array <- array( - c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), dim = c(2, 2, 5) + c(0, 0, 6, 5, 3, 0, 3, 6, 6, 2, 0, 4, 5, 6, 1, 0, 2, 5, 0, 0), + dim = c(2, 2, 5) ) expect_snapshot( ard_mantelhaentest <- bad_array |>