Let aggregated analyses follow the guideline for the 'I' category in count_df(), proportion_df(), sir_df(), the plotting functions, antibiogram(), wisca(), and bug_drug_combinations(), deprecate combine_SI in favour of guideline, fix format() on bug_drug_combinations() counting I as resistant, and add a shared section 'Interpretation of SIR'

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-15 09:58:21 +02:00
1 parent dbd95ffa46
commit 0efc8826c8
32 files changed
+511 -199

No files matched your search

+7 -1
View File
@@ -122,7 +122,7 @@ test_that("test-proportion.R", {
)
)
expect_equal(
example_isolates %>% select(AMX) %>% proportion_df(combine_SI = FALSE) %>% pull(value),
example_isolates %>% select(AMX) %>% proportion_df(guideline = NULL) %>% pull(value),
c(
example_isolates$AMX %>% proportion_S(),
example_isolates$AMX %>% proportion_I(),
@@ -130,6 +130,12 @@ test_that("test-proportion.R", {
)
)
expect_error(susceptibility(example_isolates$AMX, guideline = NULL))
expect_identical(
suppressWarnings(sir_df(example_isolates[, "AMX"], combine_SI = TRUE, guideline = "CLSI")),
sir_df(example_isolates[, "AMX"], guideline = "EUCAST")
)
# expect_warning(example_isolates %>% group_by(ward) %>% summarise(across(KAN, sir_confidence_interval)))
}