(v3.0.1.9137) Add the guideline argument to count_df(), proportion_df(), sir_df(), ggplot_sir(), geom_sir(), and labels_sir_count(), so that with CLSI the 'I' category is merged with R, and describe in the documentation of get_AMR_locale() that LANG takes precedence over LANGUAGE

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-15 08:25:37 +02:00
1 parent 46f5de1d36
commit dbd95ffa46
17 files changed
+118 -40

No files matched your search

+16 -2
View File
@@ -99,14 +99,28 @@ test_that("test-proportion.R", {
c(1181, 577, 116)
)
# proportion_df
# proportion_df, which combines 'I' with S for EUCAST and with R for CLSI
expect_equal(
example_isolates %>% select(AMX) %>% proportion_df() %>% pull(value),
example_isolates %>% select(AMX) %>% proportion_df(guideline = "EUCAST") %>% pull(value),
c(
example_isolates$AMX %>% proportion_SI(),
example_isolates$AMX %>% proportion_R()
)
)
expect_equal(
example_isolates %>% select(AMX) %>% proportion_df(guideline = "CLSI") %>% pull(value),
c(
example_isolates$AMX %>% proportion_S(),
example_isolates$AMX %>% proportion_IR()
)
)
expect_equal(
example_isolates %>% select(AMX) %>% sir_df(guideline = "CLSI") %>% pull(isolates),
c(
example_isolates$AMX %>% count_S(),
example_isolates$AMX %>% count_IR()
)
)
expect_equal(
example_isolates %>% select(AMX) %>% proportion_df(combine_SI = FALSE) %>% pull(value),
c(