From bfa92eb166b59c46b1365a9b5eaba10e0ab7c693 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Wed, 7 Aug 2019 15:58:32 +0200 Subject: [PATCH] (v0.7.1.9028) predict update --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- R/resistance_predict.R | 5 +++-- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 6 ++++-- docs/news/index.html | 8 ++++---- docs/reference/index.html | 2 +- docs/reference/resistance_predict.html | 7 ++++--- man/resistance_predict.Rd | 5 +++-- 11 files changed, 25 insertions(+), 20 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 892b37d0..103df4b8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.7.1.9027 +Version: 0.7.1.9028 Date: 2019-08-07 Title: Antimicrobial Resistance Analysis Authors@R: c( @@ -68,7 +68,7 @@ Suggests: VignetteBuilder: knitr URL: https://msberends.gitlab.io/AMR, https://gitlab.com/msberends/AMR BugReports: https://gitlab.com/msberends/AMR/issues -License: GPL-2 +License: GPL-2 | file LICENSE Encoding: UTF-8 LazyData: true RoxygenNote: 6.1.1 diff --git a/NEWS.md b/NEWS.md index 0eba434b..9000e85c 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9027 +# AMR 0.7.1.9028 ### 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/R/resistance_predict.R b/R/resistance_predict.R index d13a256e..33fb7f83 100755 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -61,7 +61,7 @@ #' @importFrom dplyr %>% pull mutate mutate_at n group_by_at summarise filter filter_at all_vars n_distinct arrange case_when n_groups transmute ungroup #' @inheritSection AMR Read more on our website! #' @examples -#' x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010) +#' x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010, model = "binomial") #' plot(x) #' ggplot_rsi_predict(x) #' @@ -70,7 +70,7 @@ #' x <- septic_patients %>% #' filter_first_isolate() %>% #' filter(mo_genus(mo) == "Staphylococcus") %>% -#' resistance_predict("PEN") +#' resistance_predict("PEN", model = "binomial") #' plot(x) #' #' @@ -86,6 +86,7 @@ #' filter(mo == as.mo("E. coli")) %>% #' resistance_predict(col_ab = "AMX", #' col_date = "date", +#' model = "binomial", #' info = FALSE, #' minimum = 15) #' diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 4ded8f9c..4a77fd66 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028 diff --git a/docs/articles/index.html b/docs/articles/index.html index 3683dc1f..bf344f7e 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028 diff --git a/docs/authors.html b/docs/authors.html index df56c1c3..f9176bd5 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028 diff --git a/docs/index.html b/docs/index.html index b455e745..c8fdd943 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028 @@ -377,7 +377,9 @@

License

diff --git a/docs/news/index.html b/docs/news/index.html index ad64ee33..f44c6cf9 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028
@@ -225,9 +225,9 @@ -
+

-AMR 0.7.1.9027 Unreleased +AMR 0.7.1.9028 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 1469d0e5..c0d47db3 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9027 + 0.7.1.9028
@@ -342,7 +342,7 @@

Examples

# NOT RUN {
-x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010)
+x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010, model = "binomial")
 plot(x)
 ggplot_rsi_predict(x)
 
@@ -351,7 +351,7 @@
 x <- septic_patients %>%
   filter_first_isolate() %>%
   filter(mo_genus(mo) == "Staphylococcus") %>%
-  resistance_predict("PEN")
+  resistance_predict("PEN", model = "binomial")
 plot(x)
 
 
@@ -367,6 +367,7 @@
     filter(mo == as.mo("E. coli")) %>%
     resistance_predict(col_ab = "AMX",
                        col_date = "date",
+                       model = "binomial",
                        info = FALSE,
                        minimum = 15)
 
diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd
index 0b6820b5..6824f899 100644
--- a/man/resistance_predict.Rd
+++ b/man/resistance_predict.Rd
@@ -80,7 +80,7 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
 }
 
 \examples{
-x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010)
+x <- resistance_predict(septic_patients, col_ab = "AMX", year_min = 2010, model = "binomial")
 plot(x)
 ggplot_rsi_predict(x)
 
@@ -89,7 +89,7 @@ library(dplyr)
 x <- septic_patients \%>\%
   filter_first_isolate() \%>\%
   filter(mo_genus(mo) == "Staphylococcus") \%>\%
-  resistance_predict("PEN")
+  resistance_predict("PEN", model = "binomial")
 plot(x)
 
 
@@ -105,6 +105,7 @@ if (!require(ggplot2)) {
     filter(mo == as.mo("E. coli")) \%>\%
     resistance_predict(col_ab = "AMX",
                        col_date = "date",
+                       model = "binomial",
                        info = FALSE,
                        minimum = 15)