From b7e2d7b9b82381d56ef23b2c8c059a8c7df3090e Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Mon, 29 Jul 2019 17:34:57 +0200 Subject: [PATCH] (v0.7.1.9016) deps --- DESCRIPTION | 2 +- NAMESPACE | 3 +++ NEWS.md | 2 +- R/first_isolate.R | 2 +- R/mic.R | 2 ++ R/mo.R | 1 + R/resistance_predict.R | 2 +- R/rsi.R | 4 +++- 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/as.mic.html | 6 ++++-- docs/reference/as.rsi.html | 6 ++++-- docs/reference/index.html | 2 +- man/as.mic.Rd | 2 ++ man/as.rsi.Rd | 2 ++ 18 files changed, 34 insertions(+), 18 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index beb819a6..2bbf0a14 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.7.1.9015 +Version: 0.7.1.9016 Date: 2019-07-29 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NAMESPACE b/NAMESPACE index 42b15afb..16953cd9 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -196,6 +196,7 @@ exportMethods(summary.mic) exportMethods(summary.mo) exportMethods(summary.rsi) importFrom(clean,freq) +importFrom(clean,top_freq) importFrom(crayon,bgGreen) importFrom(crayon,bgRed) importFrom(crayon,bgYellow) @@ -222,6 +223,7 @@ importFrom(dplyr,arrange_at) importFrom(dplyr,between) importFrom(dplyr,bind_rows) importFrom(dplyr,case_when) +importFrom(dplyr,desc) importFrom(dplyr,distinct) importFrom(dplyr,everything) importFrom(dplyr,filter) @@ -250,6 +252,7 @@ importFrom(dplyr,summarise) importFrom(dplyr,summarise_if) importFrom(dplyr,tibble) importFrom(dplyr,transmute) +importFrom(dplyr,ungroup) importFrom(dplyr,vars) importFrom(graphics,arrows) importFrom(graphics,axis) diff --git a/NEWS.md b/NEWS.md index 4dee93cc..43191e47 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9015 +# AMR 0.7.1.9016 ### 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. We decided to create a new package 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/first_isolate.R b/R/first_isolate.R index ba95f4a1..2625e455 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -70,7 +70,7 @@ #' @keywords isolate isolates first #' @seealso \code{\link{key_antibiotics}} #' @export -#' @importFrom dplyr arrange_at lag between row_number filter mutate arrange pull +#' @importFrom dplyr arrange_at lag between row_number filter mutate arrange pull ungroup #' @importFrom crayon blue bold silver #' @return Logical vector #' @source Methodology of this function is based on: \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}. diff --git a/R/mic.R b/R/mic.R index b88647f6..f8222e9b 100755 --- a/R/mic.R +++ b/R/mic.R @@ -51,6 +51,8 @@ #' #' plot(mic_data) #' barplot(mic_data) +#' +#' library(clean) #' freq(mic_data) as.mic <- function(x, na.rm = FALSE) { if (is.mic(x)) { diff --git a/R/mo.R b/R/mo.R index da13af6f..bf14e7af 100755 --- a/R/mo.R +++ b/R/mo.R @@ -1412,6 +1412,7 @@ print.mo <- function(x, ...) { #' @exportMethod summary.mo #' @importFrom dplyr n_distinct +#' @importFrom clean freq top_freq #' @export #' @noRd summary.mo <- function(object, ...) { diff --git a/R/resistance_predict.R b/R/resistance_predict.R index b4a97706..80110d54 100755 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -58,7 +58,7 @@ #' @rdname resistance_predict #' @export #' @importFrom stats predict glm lm -#' @importFrom dplyr %>% pull mutate mutate_at n group_by_at summarise filter filter_at all_vars n_distinct arrange case_when n_groups transmute +#' @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) diff --git a/R/rsi.R b/R/rsi.R index 3abec415..39178ba6 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -50,7 +50,7 @@ #' @return Ordered factor with new class \code{rsi} #' @keywords rsi #' @export -#' @importFrom dplyr %>% +#' @importFrom dplyr %>% desc arrange filter #' @seealso \code{\link{as.mic}} #' @inheritSection AMR Read more on our website! #' @examples @@ -73,6 +73,8 @@ #' #' plot(rsi_data) # for percentages #' barplot(rsi_data) # for frequencies +#' +#' library(clean) #' freq(rsi_data) # frequency table with informative header #' #' # using dplyr's mutate diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 9aba1cdb..74bc4851 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016 diff --git a/docs/articles/index.html b/docs/articles/index.html index b6c61875..cfaa3525 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016 diff --git a/docs/authors.html b/docs/authors.html index 5150acd4..99804da6 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016 diff --git a/docs/index.html b/docs/index.html index 9fc450e4..0626c136 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016 diff --git a/docs/news/index.html b/docs/news/index.html index 5efeb137..e368a07d 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016 @@ -225,9 +225,9 @@ -
+

-AMR 0.7.1.9015 Unreleased +AMR 0.7.1.9016 Unreleased

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

Contents

@@ -289,7 +289,9 @@ plot(mic_data) barplot(mic_data) -freq(mic_data) + +library(clean) +freq(mic_data) # }
@@ -336,7 +336,9 @@ plot(rsi_data) # for percentages barplot(rsi_data) # for frequencies -freq(rsi_data) # frequency table with informative header + +library(clean) +freq(rsi_data) # frequency table with informative header # using dplyr's mutate library(dplyr) diff --git a/docs/reference/index.html b/docs/reference/index.html index 4b797266..c94ded65 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9015 + 0.7.1.9016
diff --git a/man/as.mic.Rd b/man/as.mic.Rd index 25a09b47..b46617e9 100755 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -47,6 +47,8 @@ as.rsi(x = as.mic(4), plot(mic_data) barplot(mic_data) + +library(clean) freq(mic_data) } \seealso{ diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 2f19890e..5751e176 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -90,6 +90,8 @@ as.rsi(x = as.mic(4), plot(rsi_data) # for percentages barplot(rsi_data) # for frequencies + +library(clean) freq(rsi_data) # frequency table with informative header # using dplyr's mutate