(v3.0.1.9123) Add method argument to sir_combine() for resistance within a group (most_resistant), and restore the AMR 3.0.1 behaviour of count_*() and proportion_*() for multiple antimicrobials (#321)

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-12 21:37:13 +02:00
1 parent 239c5a87a8
commit bf12e3abe7
13 files changed
+322 -141

No files matched your search

+1 -6
View File
@@ -68,17 +68,12 @@ test_that("test-count.R", {
expect_equal(example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = TRUE), 1687)
expect_equal(example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = FALSE), 1764)
expect_equal(example_isolates %>% count_all(AMC, GEN, only_all_tested = TRUE), 1798)
expect_equal(example_isolates %>% count_all(AMC, GEN, only_all_tested = FALSE), 1875)
expect_equal(example_isolates %>% count_all(AMC, GEN, only_all_tested = FALSE), 1936)
expect_identical(
example_isolates %>% count_all(AMC, GEN, only_all_tested = TRUE),
example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = TRUE) +
example_isolates %>% count_resistant(AMC, GEN, only_all_tested = TRUE)
)
expect_identical(
example_isolates %>% count_all(AMC, GEN, only_all_tested = FALSE),
example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = FALSE) +
example_isolates %>% count_resistant(AMC, GEN, only_all_tested = FALSE)
)
# count of cases
expect_equal(