From f67c739892bb7d3b5bf395eb7ea2a08e921c892b Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Wed, 7 Aug 2019 18:56:14 +0200 Subject: [PATCH] (v0.7.1.9029) unit test --- DESCRIPTION | 2 +- NEWS.md | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 8 ++++---- docs/reference/index.html | 2 +- docs/reference/resistance_predict.html | 2 +- tests/testthat/test-resistance_predict.R | 19 ++++++++++--------- 10 files changed, 22 insertions(+), 21 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 103df4b8..fecbee04 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.7.1.9028 +Version: 0.7.1.9029 Date: 2019-08-07 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 9000e85c..8e79b00e 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9028 +# AMR 0.7.1.9029 ### Breaking * Function `freq()` has moved to a new package, [`clean`](https://github.com/msberends/clean) ([CRAN link](https://cran.r-project.org/package=clean)). Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the `freq()` function. The [`clean`](https://github.com/msberends/clean) package is available on CRAN and will be installed automatically when updating the `AMR` package, that now imports it. In a later stage, the `skewness()` and `kurtosis()` functions will be moved to the `clean` package too. diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 4a77fd66..0ae1a683 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029 diff --git a/docs/articles/index.html b/docs/articles/index.html index bf344f7e..5d9b5448 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029 diff --git a/docs/authors.html b/docs/authors.html index f9176bd5..108bbd95 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029 diff --git a/docs/index.html b/docs/index.html index c8fdd943..f173c0ae 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029 diff --git a/docs/news/index.html b/docs/news/index.html index f44c6cf9..7f3360ae 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029 @@ -225,9 +225,9 @@ -
+

-AMR 0.7.1.9028 Unreleased +AMR 0.7.1.9029 Unreleased

@@ -1218,7 +1218,7 @@ Using as.mo(..., allow_uncertain = 3)

Contents

diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index c0d47db3..eb063ac4 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9028 + 0.7.1.9029
diff --git a/tests/testthat/test-resistance_predict.R b/tests/testthat/test-resistance_predict.R index 8f891f9d..94b7ab12 100644 --- a/tests/testthat/test-resistance_predict.R +++ b/tests/testthat/test-resistance_predict.R @@ -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)