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

Merge branch 'premaster'

This commit is contained in:
2019-08-09 09:33:26 +02:00
17 changed files with 173 additions and 164 deletions

View File

@ -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)
})