mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 21:22:01 +02:00
(v2.1.1.9196) fix eucast, unit tests
This commit is contained in:
@ -350,28 +350,29 @@ test_that("sir works", {
|
||||
)
|
||||
|
||||
out_vet <- as.sir(vet, host = vet$animal, guideline = "CLSI 2023")
|
||||
# host column name instead of values
|
||||
# give host column name instead of values
|
||||
expect_identical(
|
||||
out_vet,
|
||||
as.sir(vet, host = "animal", guideline = "CLSI 2023")
|
||||
)
|
||||
|
||||
# check outcomes
|
||||
expect_identical(out_vet$PRA, as.sir(c("S", NA, "S", NA, NA, "R", NA, NA, NA, "I", NA)))
|
||||
expect_identical(out_vet$PRA, as.sir(c("S", NA, "S", NA, NA, "R", NA, NA, NA, "R", NA)))
|
||||
expect_identical(out_vet$FLR, as.sir(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, "R", NA)))
|
||||
|
||||
out_vet <- as.sir(vet, host = "animal", guideline = "EUCAST 2023")
|
||||
expect_identical(out_vet$PRA, rep(NA_sir_, 11))
|
||||
expect_identical(out_vet$FLR, as.sir(c("S", "S", NA, "S", "S", NA, "I", "R", NA, "R", "R")))
|
||||
# expect_identical(out_vet$FLR, as.sir(c("S", "S", NA, "S", "S", NA, "I", "R", NA, "R", "R")))
|
||||
expect_identical(out_vet$FLR, as.sir(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, "R", NA)))
|
||||
|
||||
sir_history <- sir_interpretation_history()
|
||||
expect_identical(
|
||||
sort(sir_history$host),
|
||||
c(
|
||||
"cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats",
|
||||
"cats", "cats", "cats", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "dogs",
|
||||
"dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs",
|
||||
"horse", "horse", "horse", "horse", "horse", "horse", "horse", "horse", "horse", "poultry", "poultry", "poultry", "poultry"
|
||||
"cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cats", "cattle",
|
||||
"cattle", "cattle", "cattle", "cattle", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs",
|
||||
"dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "horse", "horse", "horse", "horse", "horse", "horse", "horse", "horse",
|
||||
"horse", "horse", "poultry", "poultry", "poultry", "poultry", "poultry"
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user