mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 12:31:58 +02:00
(v0.7.1.9031) include_unknown for first_isolate()
This commit is contained in:
@ -187,5 +187,25 @@ test_that("first isolates work", {
|
||||
info = TRUE),
|
||||
na.rm = TRUE),
|
||||
1322)
|
||||
|
||||
# unknown MOs
|
||||
expect_equal(septic_patients %>%
|
||||
mutate(mo = ifelse(mo == "B_ESCHR_COL", "UNKNOWN", mo)) %>%
|
||||
mutate(first = first_isolate(., include_unknown = FALSE)) %>%
|
||||
.$first %>%
|
||||
sum(),
|
||||
1062)
|
||||
expect_equal(septic_patients %>%
|
||||
mutate(mo = ifelse(mo == "B_ESCHR_COL", "UNKNOWN", mo)) %>%
|
||||
mutate(first = first_isolate(., include_unknown = TRUE)) %>%
|
||||
.$first %>%
|
||||
sum(),
|
||||
1529)
|
||||
expect_equal(septic_patients %>%
|
||||
mutate(mo = ifelse(mo == "B_ESCHR_COL", NA, mo)) %>%
|
||||
mutate(first = first_isolate(.)) %>%
|
||||
.$first %>%
|
||||
sum(),
|
||||
1062)
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user