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

count_all and some fixes

This commit is contained in:
2018-10-12 16:35:18 +02:00
parent e7d937d36e
commit 5b5b95a47b
22 changed files with 232 additions and 246 deletions

View File

@ -10,8 +10,13 @@ test_that("counts work", {
expect_equal(count_S(septic_patients$amox) + count_I(septic_patients$amox),
count_SI(septic_patients$amox))
library(dplyr)
expect_equal(septic_patients %>% count_S(amcl), 1057)
expect_equal(septic_patients %>% count_S(amcl, gent), 1396)
expect_equal(septic_patients %>% count_all(amcl, gent), 1517)
expect_identical(septic_patients %>% count_all(amcl, gent),
septic_patients %>% count_S(amcl, gent) +
septic_patients %>% count_IR(amcl, gent))
# count of cases
expect_equal(septic_patients %>%