mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 15:21:58 +02:00
(v1.7.1.9063) not_intrinsic_resistant
This commit is contained in:
@ -69,6 +69,7 @@ expect_identical(colnames(set_ab_names(example_isolates[, 20:25], language = "nl
|
||||
c("Cefoxitine", "Cefotaxim", "Ceftazidim", "Ceftriaxon", "Gentamicine", "Tobramycine"))
|
||||
expect_identical(colnames(set_ab_names(example_isolates[, 20:25], property = "atc")),
|
||||
c("J01DC01", "J01DD01", "J01DD02", "J01DD04", "J01GB03", "J01GB01"))
|
||||
|
||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) {
|
||||
expect_identical(example_isolates %>% set_ab_names(),
|
||||
example_isolates %>% rename_with(set_ab_names))
|
||||
|
@ -76,6 +76,17 @@ expect_equal(nrow(example_isolates[all(c(carbapenems(), aminoglycosides()) == "R
|
||||
expect_equal(nrow(example_isolates[any(carbapenems() == "R"), penicillins()]), 55, tolerance = 0.5)
|
||||
expect_equal(ncol(example_isolates[any(carbapenems() == "R"), penicillins()]), 7, tolerance = 0.5)
|
||||
|
||||
x <- data.frame(x = 0,
|
||||
mo = 0,
|
||||
gen = "S",
|
||||
genta = "S",
|
||||
J01GB03 = "S",
|
||||
tobra = "S",
|
||||
Tobracin = "S")
|
||||
# should have the first hits
|
||||
expect_identical(colnames(x[, aminoglycosides()]),
|
||||
c("gen", "tobra"))
|
||||
|
||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) {
|
||||
expect_equal(example_isolates %>% select(administrable_per_os() & penicillins()) %>% ncol(), 5, tolerance = 0.5)
|
||||
expect_equal(example_isolates %>% select(administrable_iv() & penicillins()) %>% ncol(), 7, tolerance = 0.5)
|
@ -92,6 +92,8 @@ expect_identical(mo_property("Escherichia coli", property = "genus"),
|
||||
mo_genus("Escherichia coli"))
|
||||
expect_identical(mo_property("Escherichia coli", property = "species"),
|
||||
mo_species("Escherichia coli"))
|
||||
expect_identical(mo_property("Escherichia coli", property = "species_id"),
|
||||
mo_lpsn("Escherichia coli"))
|
||||
|
||||
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
|
||||
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
|
||||
|
Reference in New Issue
Block a user