Skip to content

Commit

Permalink
Update WORDLIST
Browse files Browse the repository at this point in the history
  • Loading branch information
edelarua committed Nov 30, 2024
1 parent c9d41b1 commit a54ea54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CMD
Chisq
Clopper
Codecov
Haenszel
Hoffmann
Jeffreys
Kaplan
Expand Down
9 changes: 6 additions & 3 deletions tests/testthat/test-ard_stats_mantelhaen_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand All @@ -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")
)
Expand All @@ -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 |>
Expand Down

0 comments on commit a54ea54

Please sign in to comment.