1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 22:22:03 +02:00

(v0.8.0.9008) new verbose mode for MDROs

This commit is contained in:
2019-11-03 22:24:42 +01:00
parent 09c4b04cd0
commit 29e448883d
42 changed files with 338 additions and 343 deletions

View File

@ -22,7 +22,7 @@
context("freq.R")
test_that("frequency table works", {
library(clean)
library(cleaner)
# mo
expect_true(is.freq(freq(example_isolates$mo)))
# for this to work, the output of mo_gramstain() is to be expected as follows:

View File

@ -133,6 +133,7 @@ test_that("mdro works", {
"S. aureus", "R", "R", "I", "I", "I", "I", "I", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R"
)
expect_equal(as.integer(mdro(stau)), c(1:4))
expect_s3_class(mdro(stau, verbose = TRUE), "data.frame")
ente <- tribble(
~mo, ~GEH, ~STH, ~IPM, ~MEM, ~DOR, ~CIP, ~LVX, ~MFX, ~VAN, ~TEC, ~TGC, ~DAP, ~LNZ, ~AMP, ~QDA, ~DOX, ~MNO,
@ -142,6 +143,7 @@ test_that("mdro works", {
"Enterococcus", "R", "R", "I", "I", "I", "I", "I", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R"
)
expect_equal(as.integer(mdro(ente)), c(1:4))
expect_s3_class(mdro(ente, verbose = TRUE), "data.frame")
entero <- tribble(
~mo, ~GEN, ~TOB, ~AMK, ~NET, ~CPT, ~TCC, ~TZP, ~ETP, ~IPM, ~MEM, ~DOR, ~CZO, ~CXM, ~CTX, ~CAZ, ~FEP, ~FOX, ~CTT, ~CIP, ~SXT, ~TGC, ~ATM, ~AMP, ~AMC, ~SAM, ~CHL, ~FOS, ~COL, ~TCY, ~DOX, ~MNO,
@ -151,6 +153,7 @@ test_that("mdro works", {
"E. coli", "R", "R", "I", "I", "I", "I", "I", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R"
)
expect_equal(as.integer(mdro(entero)), c(1:4))
expect_s3_class(mdro(entero, verbose = TRUE), "data.frame")
pseud <- tribble(
~mo, ~GEN, ~TOB, ~AMK, ~NET, ~IPM, ~MEM, ~DOR, ~CAZ, ~FEP, ~CIP, ~LVX, ~TCC, ~TZP, ~ATM, ~FOS, ~COL, ~PLB,
@ -160,6 +163,7 @@ test_that("mdro works", {
"P. aeruginosa", "R", "R", "I", "I", "I", "I", "I", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R"
)
expect_equal(as.integer(mdro(pseud)), c(1:4))
expect_s3_class(mdro(pseud, verbose = TRUE), "data.frame")
acin <- tribble(
~mo, ~GEN, ~TOB, ~AMK, ~NET, ~IPM, ~MEM, ~DOR, ~CIP, ~LVX, ~TZP, ~TCC, ~CTX, ~CRO, ~CAZ, ~FEP, ~SXT, ~SAM, ~COL, ~PLB, ~TCY, ~DOX, ~MNO,
@ -169,5 +173,6 @@ test_that("mdro works", {
"A. baumannii", "R", "R", "I", "I", "I", "I", "I", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R"
)
expect_equal(as.integer(mdro(acin)), c(1:4))
expect_s3_class(mdro(acin, verbose = TRUE), "data.frame")
})