1
0
mirror of https://github.com/msberends/AMR.git synced 2026-02-23 23:39:12 +01:00

(v3.0.1.9021) add guideline to resistance() and susceptibility()

This commit is contained in:
2026-02-12 20:34:06 +01:00
parent 499c830ee7
commit 12cf144b19
14 changed files with 145 additions and 36 deletions

View File

@@ -30,8 +30,10 @@
test_that("test-count.R", {
skip_on_cran()
expect_equal(count_resistant(example_isolates$AMX), count_R(example_isolates$AMX))
expect_equal(count_susceptible(example_isolates$AMX), count_SI(example_isolates$AMX))
expect_equal(count_R(example_isolates$AMX), count_resistant(example_isolates$AMX))
expect_equal(count_SI(example_isolates$AMX), count_susceptible(example_isolates$AMX))
expect_equal(count_IR(example_isolates$AMX), count_resistant(example_isolates$AMX, guideline = "CLSI"))
expect_equal(count_S(example_isolates$AMX), count_susceptible(example_isolates$AMX, guideline = "CLSI"))
expect_equal(count_all(example_isolates$AMX), n_sir(example_isolates$AMX))
# AMX resistance in `example_isolates`

View File

@@ -32,6 +32,8 @@ test_that("test-proportion.R", {
expect_equal(proportion_R(example_isolates$AMX), resistance(example_isolates$AMX))
expect_equal(proportion_SI(example_isolates$AMX), susceptibility(example_isolates$AMX))
expect_equal(proportion_IR(example_isolates$AMX), resistance(example_isolates$AMX, guideline = "CLSI"))
expect_equal(proportion_S(example_isolates$AMX), susceptibility(example_isolates$AMX, guideline = "CLSI"))
# AMX resistance in `example_isolates`
expect_equal(proportion_R(example_isolates$AMX), 0.5955556, tolerance = 0.0001)
expect_equal(proportion_I(example_isolates$AMX), 0.002222222, tolerance = 0.0001)