mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:51:59 +02:00
(v1.5.0.9015) unit test fix, grouped first isolates
This commit is contained in:
@ -96,7 +96,8 @@ test_that("EUCAST rules work", {
|
||||
AZM = as.rsi("R"),
|
||||
CLR = factor("R"),
|
||||
stringsAsFactors = FALSE),
|
||||
version_expertrules = 3.1)$CLR))
|
||||
version_expertrules = 3.1,
|
||||
only_rsi_columns = FALSE)$CLR))
|
||||
b <- example_isolates$ERY
|
||||
expect_identical(a[!is.na(b)],
|
||||
b[!is.na(b)])
|
||||
|
@ -212,4 +212,9 @@ test_that("first isolates work", {
|
||||
# only one isolate, so return fast
|
||||
expect_true(first_isolate(data.frame(mo = "Escherichia coli", date = Sys.Date(), patient = "patient"), info = TRUE))
|
||||
|
||||
# groups
|
||||
x <- example_isolates %>% group_by(ward_icu) %>% mutate(first = first_isolate())
|
||||
y <- example_isolates %>% group_by(ward_icu) %>% mutate(first = first_isolate(.))
|
||||
expect_identical(x, y)
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user