From 05dcb436601e6b1490ed312588f65169aad59cb2 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Sun, 25 Aug 2019 23:25:12 +0200 Subject: [PATCH] (v0.7.1.9060) globals --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/bug_drug_combinations.R | 6 +++--- R/globals.R | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2c44bec9..0e511b56 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.7.1.9059 +Version: 0.7.1.9060 Date: 2019-08-25 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 37cb658c..a2d59f54 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9059 +# AMR 0.7.1.9060 ### Breaking * Function `freq()` has moved to a new package, [`clean`](https://github.com/msberends/clean) ([CRAN link](https://cran.r-project.org/package=clean)). The `freq()` function still works, since it is re-exported from the `clean` package to this `AMR` package. 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/bug_drug_combinations.R b/R/bug_drug_combinations.R index 8f418abf..ef32b5b4 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -78,9 +78,9 @@ format.bugdrug <- function(x, combine_SI = TRUE, add_ab_group = TRUE, ...) { } y <- x %>% mutate(mo = mo_name(mo), - txt = paste0(AMR:::percent(isolates / total, force_zero = TRUE), - " (", trimws(format(isolates, big.mark = ",")), "/", - trimws(format(total, big.mark = ",")), ")")) %>% + txt = paste0(percent(isolates / total, force_zero = TRUE), + " (", trimws(format(isolates, big.mark = ",")), "/", + trimws(format(total, big.mark = ",")), ")")) %>% select(ab, mo, txt) %>% spread(mo, txt) %>% mutate_all(~ifelse(is.na(.), "", .)) %>% diff --git a/R/globals.R b/R/globals.R index 46f68624..a61399b6 100755 --- a/R/globals.R +++ b/R/globals.R @@ -86,6 +86,7 @@ globalVariables(c(".", "species_id", "subspecies", "synonyms", + "total", "txt", "value", "xdr",