count_all and some fixes

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2018-10-12 16:35:18 +02:00
1 parent e7d937d36e
commit 5b5b95a47b
22 files changed
+232 -246

No files matched your search

+5
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 %>%