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

(v0.7.1.9029) unit test

This commit is contained in:
2019-08-07 18:56:14 +02:00
parent bfa92eb166
commit f67c739892
10 changed files with 22 additions and 21 deletions

View File

@ -22,15 +22,16 @@
context("portion.R")
test_that("prediction of rsi works", {
# AMX_R <- septic_patients %>%
# filter(mo == "B_ESCHR_COL") %>%
# rsi_predict(col_ab = "AMX",
# col_date = "date",
# minimum = 10,
# info = TRUE) %>%
# pull("value")
# # AMX resistance will increase according to data set `septic_patients`
# expect_true(AMX_R[3] < AMX_R[20])
AMX_R <- septic_patients %>%
filter(mo == "B_ESCHR_COL") %>%
rsi_predict(col_ab = "AMX",
col_date = "date",
model = "binomial",
minimum = 10,
info = TRUE) %>%
pull("value")
# AMX resistance will increase according to data set `septic_patients`
expect_true(AMX_R[3] < AMX_R[20])
x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010, model = "binomial")
plot(x)