1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 07:51:57 +02:00
This commit is contained in:
2018-04-03 16:07:32 +02:00
parent 4a47e59e6f
commit 3165c50d06
13 changed files with 226 additions and 158 deletions

View File

@ -14,3 +14,18 @@ test_that("abname works", {
expect_equal(abname("amox", from = 'molis'), "Amoxicillin")
expect_equal(abname("J01CA04", from = 'atc'), "Amoxicillin")
})
test_that("guess_bactid works", {
expect_identical(guess_bactid(c("E. coli", "H. influenzae")), c("ESCCOL", "HAEINF"))
expect_equal(guess_bactid("Escherichia coli"), "ESCCOL")
expect_equal(guess_bactid("Negative rods"), "GNR")
expect_equal(guess_bactid(c("stau",
"STAU",
"staaur",
"S. aureus",
"S aureus",
"Staphylococcus aureus",
"MRSA",
"VISA")),
rep("STAAUR", 8))
})

View File

@ -7,11 +7,6 @@ test_that("keyantibiotics work", {
expect_false(key_antibiotics_equal("SSS", "SIS", ignore_I = FALSE))
})
test_that("guess_bactid works", {
expect_equal(guess_bactid("E. coli"), "ESCCOL")
expect_equal(guess_bactid("Escherichia coli"), "ESCCOL")
})
test_that("first isolates work", {
# septic_patients contains 1960 out of 2000 first isolates
#septic_ptns <- septic_patients