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

eucast rules fix, 1st isolate fix, website update

This commit is contained in:
2018-12-31 01:48:53 +01:00
parent 469b145d8c
commit 2e4d703338
51 changed files with 1473 additions and 1760 deletions

View File

@ -19,7 +19,7 @@
context("first_isolate.R")
test_that("first isolates work", {
# septic_patients contains 1315 out of 2000 first isolates
# septic_patients contains 1317 out of 2000 first isolates
expect_equal(
sum(
first_isolate(tbl = septic_patients,
@ -28,9 +28,9 @@ test_that("first isolates work", {
col_mo = "mo",
info = TRUE),
na.rm = TRUE),
1315)
1317)
# septic_patients contains 1411 out of 2000 first *weighted* isolates
# septic_patients contains 1413 out of 2000 first *weighted* isolates
expect_equal(
suppressWarnings(
sum(
@ -43,7 +43,7 @@ test_that("first isolates work", {
type = "keyantibiotics",
info = TRUE),
na.rm = TRUE)),
1411)
1413)
# should be same for tibbles
expect_equal(
suppressWarnings(
@ -57,8 +57,8 @@ test_that("first isolates work", {
type = "keyantibiotics",
info = TRUE),
na.rm = TRUE)),
1411)
# and 1435 when not ignoring I
1413)
# and 1436 when not ignoring I
expect_equal(
suppressWarnings(
sum(
@ -71,8 +71,8 @@ test_that("first isolates work", {
type = "keyantibiotics",
info = TRUE),
na.rm = TRUE)),
1435)
# and 1416 when using points
1436)
# and 1417 when using points
expect_equal(
suppressWarnings(
sum(
@ -84,9 +84,9 @@ test_that("first isolates work", {
type = "points",
info = TRUE),
na.rm = TRUE)),
1416)
1417)
# septic_patients contains 1161 out of 2000 first non-ICU isolates
# septic_patients contains 1163 out of 2000 first non-ICU isolates
expect_equal(
sum(
first_isolate(septic_patients,
@ -97,7 +97,7 @@ test_that("first isolates work", {
info = TRUE,
icu_exclude = TRUE),
na.rm = TRUE),
1161)
1163)
# set 1500 random observations to be of specimen type 'Urine'
random_rows <- sample(x = 1:2000, size = 1500, replace = FALSE)