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

documentation fix

This commit is contained in:
2019-05-13 20:16:51 +02:00
parent 2ea0c93e44
commit f6bf54b37d
13 changed files with 71 additions and 60 deletions

View File

@ -39,37 +39,37 @@ test_that("prediction of rsi works", {
library(dplyr)
expect_output(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_output(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
model = "binomial",
col_ab = "AMX",
col_date = "date",
info = TRUE))
expect_output(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_output(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
model = "loglin",
col_ab = "AMX",
col_date = "date",
info = TRUE))
expect_output(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_output(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
model = "lin",
col_ab = "AMX",
col_date = "date",
info = TRUE))
expect_error(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_error(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
model = "INVALID MODEL",
col_ab = "AMX",
col_date = "date",
info = TRUE))
expect_error(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_error(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
col_ab = "NOT EXISTING COLUMN",
col_date = "date",
info = TRUE))
expect_error(rsi_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_error(rsi_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
col_ab = "AMX",
col_date = "NOT EXISTING COLUMN",
info = TRUE))
# almost all E. coli are MEM S in the Netherlands :)
expect_error(resistance_predict(tbl = filter(septic_patients, mo == "B_ESCHR_COL"),
expect_error(resistance_predict(x = filter(septic_patients, mo == "B_ESCHR_COL"),
col_ab = "MEM",
col_date = "date",
info = TRUE))