mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 16:21:59 +02:00
(v2.1.1.9163) cleanup
This commit is contained in:
@ -29,11 +29,13 @@
|
||||
|
||||
# extra tests for {vctrs} pkg support
|
||||
if (AMR:::pkg_is_available("tibble")) {
|
||||
test <- tibble::tibble(ab = as.ab("CIP"),
|
||||
mo = as.mo("Escherichia coli"),
|
||||
mic = as.mic(2),
|
||||
disk = as.disk(20),
|
||||
sir = as.sir("S"))
|
||||
test <- tibble::tibble(
|
||||
ab = as.ab("CIP"),
|
||||
mo = as.mo("Escherichia coli"),
|
||||
mic = as.mic(2),
|
||||
disk = as.disk(20),
|
||||
sir = as.sir("S")
|
||||
)
|
||||
check1 <- lapply(test, class)
|
||||
test[1, "ab"] <- "GEN"
|
||||
test[1, "mo"] <- "B_KLBSL_PNMN"
|
||||
@ -45,9 +47,11 @@ if (AMR:::pkg_is_available("tibble")) {
|
||||
test[1, "sir"] <- "R"
|
||||
check2 <- lapply(test, class)
|
||||
expect_identical(check1, check2)
|
||||
|
||||
test <- tibble::tibble(cipro = as.sir("S"),
|
||||
variable = "test")
|
||||
|
||||
test <- tibble::tibble(
|
||||
cipro = as.sir("S"),
|
||||
variable = "test"
|
||||
)
|
||||
expect_equal(nrow(test[quinolones() == "S", ]), 1)
|
||||
expect_equal(nrow(test[quinolones() == "R", ]), 0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user