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

(v1.4.0.9045) unit tests

This commit is contained in:
2020-12-25 00:06:11 +01:00
parent df37584189
commit 291f802be3
15 changed files with 45 additions and 49 deletions

View File

@ -52,6 +52,7 @@ test_that("proportions works", {
0.9382647,
tolerance = 0.0001)
library(dplyr)
# percentages
expect_equal(example_isolates %>%
group_by(hospital_id) %>%
@ -79,7 +80,7 @@ test_that("proportions works", {
expect_warning(proportion_R(as.character(example_isolates$AMC)))
expect_warning(proportion_S(as.character(example_isolates$AMC)))
expect_warning(proportion_S(as.character(example_isolates$AMC,
example_isolates$GEN)))
example_isolates$GEN)))
expect_warning(n_rsi(as.character(example_isolates$AMC,
example_isolates$GEN)))
expect_equal(suppressWarnings(n_rsi(as.character(example_isolates$AMC,