mdro and 1st isolate improvements

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2018-10-23 11:15:05 +02:00
1 parent 299c5bea43
commit 7997de6a6d
8 files changed
+138 -95

No files matched your search

+8 -1
View File
@@ -119,11 +119,18 @@ test_that("first isolates work", {
# errors
expect_error(first_isolate("date", "patient_id", col_mo = "mo"))
expect_error(first_isolate(septic_patients))
expect_error(first_isolate(septic_patients,
col_date = "non-existing col",
col_mo = "mo"))
# look for columns itself
expect_message(first_isolate(septic_patients))
expect_message(first_isolate(septic_patients %>%
mutate(mo = as.character(mo)) %>%
left_join_microorganisms(),
col_genus = "genus",
col_species = "species"))
# if mo is not an mo class, result should be the same
expect_identical(septic_patients %>%
mutate(mo = as.character(mo)) %>%