mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:11:54 +02:00
Fix for antibiogram()
in R <=3.4
This commit is contained in:
@ -124,8 +124,8 @@ expect_identical(as.character(as.mo(" ")), NA_character_)
|
||||
expect_warning(as.mo("ab"))
|
||||
|
||||
expect_identical(
|
||||
suppressWarnings(as.character(as.mo(c("Qq species", "", "MRSA", "K. pneu rhino", "esco")))),
|
||||
c("UNKNOWN", NA_character_, "B_STPHY_AURS", "B_KLBSL_PNMN_RHNS", "B_ESCHR_COLI")
|
||||
suppressWarnings(as.character(as.mo(c("Qq species", "MRSA", "K. pneu rhino", "esco")))),
|
||||
c("UNKNOWN", "B_STPHY_AURS", "B_KLBSL_PNMN_RHNS", "B_ESCHR_COLI")
|
||||
)
|
||||
|
||||
# check for Becker classification
|
||||
@ -317,10 +317,7 @@ expect_warning(x[[1]] <- "invalid code")
|
||||
expect_warning(c(x[1], "test"))
|
||||
|
||||
# ignoring patterns
|
||||
expect_identical(
|
||||
as.character(as.mo(c("E. coli", "E. coli ignorethis"), ignore_pattern = "this")),
|
||||
c("B_ESCHR_COLI", NA)
|
||||
)
|
||||
expect_true(is.na(as.mo("E. coli ignorethis", ignore_pattern = "this")))
|
||||
|
||||
# frequency tables
|
||||
if (AMR:::pkg_is_available("cleaner")) {
|
||||
|
Reference in New Issue
Block a user