1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 06:02:01 +02:00

(v1.3.0.9035) mdro() for EUCAST 3.2, examples cleanup

This commit is contained in:
2020-09-29 23:35:46 +02:00
parent 68e6e1e329
commit 4e0374af29
94 changed files with 1143 additions and 1165 deletions

View File

@ -31,14 +31,16 @@ test_that("mdro works", {
expect_error(mdro(example_isolates, col_mo = "invalid", info = TRUE))
outcome <- suppressWarnings(mdro(example_isolates))
outcome <- mdro(example_isolates, "eucast3.1", info = TRUE)
outcome <- eucast_exceptional_phenotypes(example_isolates, info = TRUE)
# check class
expect_equal(outcome %>% class(), c("ordered", "factor"))
expect_equal(class(outcome), c("ordered", "factor"))
outcome <- mdro(example_isolates, "nl", info = TRUE)
# check class
expect_equal(outcome %>% class(), c("ordered", "factor"))
expect_equal(class(outcome), c("ordered", "factor"))
library(dplyr)
# example_isolates should have these finding using Dutch guidelines
expect_equal(outcome %>% cleaner::freq() %>% pull(count),
c(1969, 25, 6)) # 1969 neg, 25 unconfirmed, 6 pos