mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
speed improvements
This commit is contained in:
1 parent
8240959f38
commit
6eaf33baf3
13 files changed
+359
-110
No files matched your search
@@ -19,7 +19,7 @@ test_that("first isolates work", {
|
||||
na.rm = TRUE),
|
||||
1959)
|
||||
|
||||
# septic_patients contains 1961 out of 2000 first *weighted* isolates
|
||||
# septic_patients contains 1963 out of 2000 first *weighted* isolates
|
||||
expect_equal(
|
||||
suppressWarnings(
|
||||
sum(
|
||||
@@ -31,7 +31,7 @@ test_that("first isolates work", {
|
||||
type = "keyantibiotics",
|
||||
info = TRUE),
|
||||
na.rm = TRUE)),
|
||||
1961)
|
||||
1963)
|
||||
# and 1998 when using points
|
||||
expect_equal(
|
||||
suppressWarnings(
|
||||
|
||||
@@ -2,8 +2,8 @@ context("resistance.R")
|
||||
|
||||
test_that("resistance works", {
|
||||
# amox resistance in `septic_patients` should be around 57.56%
|
||||
expect_equal(resistance(septic_patients$amox), 0.5756, tolerance = 0.0001)
|
||||
expect_equal(susceptibility(septic_patients$amox), 1 - 0.5756, tolerance = 0.0001)
|
||||
expect_equal(resistance(septic_patients$amox, include_I = TRUE), 0.5756, tolerance = 0.0001)
|
||||
expect_equal(susceptibility(septic_patients$amox, include_I = FALSE), 1 - 0.5756, tolerance = 0.0001)
|
||||
|
||||
# pita+genta susceptibility around 98.09%
|
||||
expect_equal(susceptibility(septic_patients$pita,
|
||||
|
||||
Reference in new issue
Block a user