1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 07:51:57 +02:00

first inclusion of ITIS data

This commit is contained in:
2018-09-24 23:33:29 +02:00
parent df5d82fff3
commit 9c566585b0
29 changed files with 734 additions and 466 deletions

View File

@ -10,9 +10,9 @@ test_that("first isolates work", {
col_mo = "mo",
info = TRUE),
na.rm = TRUE),
1330)
1315)
# septic_patients contains 1426 out of 2000 first *weighted* isolates
# septic_patients contains 1411 out of 2000 first *weighted* isolates
expect_equal(
suppressWarnings(
sum(
@ -24,8 +24,8 @@ test_that("first isolates work", {
type = "keyantibiotics",
info = TRUE),
na.rm = TRUE)),
1425)
# and 1449 when not ignoring I
1411)
# and 1435 when not ignoring I
expect_equal(
suppressWarnings(
sum(
@ -38,8 +38,8 @@ test_that("first isolates work", {
type = "keyantibiotics",
info = TRUE),
na.rm = TRUE)),
1448)
# and 1430 when using points
1435)
# and 1416 when using points
expect_equal(
suppressWarnings(
sum(
@ -51,9 +51,9 @@ test_that("first isolates work", {
type = "points",
info = TRUE),
na.rm = TRUE)),
1430)
1416)
# septic_patients contains 1176 out of 2000 first non-ICU isolates
# septic_patients contains 1161 out of 2000 first non-ICU isolates
expect_equal(
sum(
first_isolate(septic_patients,
@ -64,7 +64,7 @@ test_that("first isolates work", {
info = TRUE,
icu_exclude = TRUE),
na.rm = TRUE),
1175)
1161)
# set 1500 random observations to be of specimen type 'Urine'
random_rows <- sample(x = 1:2000, size = 1500, replace = FALSE)