mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:51:59 +02:00
(v1.8.0.9002) as.rsi() cleanup, more informative warnings
This commit is contained in:
@ -87,8 +87,9 @@ expect_identical(
|
||||
"Sthafilokkockus aureeuzz",
|
||||
"Staphylococcus aureus",
|
||||
"MRSA",
|
||||
"VISA")))),
|
||||
rep("B_STPHY_AURS", 9))
|
||||
"VISA",
|
||||
"meth.-resis. S. aureus (MRSA)")))),
|
||||
rep("B_STPHY_AURS", 10))
|
||||
expect_identical(
|
||||
as.character(
|
||||
as.mo(c("EHEC", "EPEC", "EIEC", "STEC", "ATEC", "UPEC"))),
|
||||
@ -243,7 +244,7 @@ expect_stdout(print(mo_uncertainties()))
|
||||
expect_equal(suppressMessages(as.mo(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A"))),
|
||||
as.mo(c("Salmonella enterica", "Salmonella enterica", "Salmonella")))
|
||||
|
||||
# no virusses
|
||||
# no viruses
|
||||
expect_equal(as.character(as.mo("Virus")), NA_character_)
|
||||
|
||||
# summary
|
||||
|
@ -39,6 +39,7 @@ if (AMR:::pkg_is_available("ggplot2")) {
|
||||
}
|
||||
expect_stdout(print(as.rsi(c("S", "I", "R"))))
|
||||
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
||||
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
||||
expect_equal(suppressWarnings(as.logical(as.rsi("INVALID VALUE"))), NA)
|
||||
expect_equal(summary(as.rsi(c("S", "R"))),
|
||||
structure(c("Class" = "rsi",
|
||||
@ -75,6 +76,7 @@ if (AMR:::pkg_is_available("skimr", min_version = "2.0.0")) {
|
||||
}
|
||||
}
|
||||
|
||||
expect_equal(as.rsi(c("", "-", NA, "NULL")), c(NA_rsi_, NA_rsi_, NA_rsi_, NA_rsi_))
|
||||
|
||||
# S. pneumoniae/ampicillin in EUCAST 2020: 0.5-2 ug/ml (R is only > 2)
|
||||
expect_equal(as.character(
|
||||
|
Reference in New Issue
Block a user