diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 515beb6c..253557a1 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -109,9 +109,10 @@ jobs: key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-v4 - name: Install AMR and tinytest and update dependencies + # some old R instances have trouble installing tinytest, so we ship it too run: | install.packages("data-raw/AMR_latest.tar.gz") - install.packages("data-raw/tinytest_1.2.4.tar.gz") + trimws <- AMR:::trimws; install.packages("data-raw/tinytest_1.2.4.tar.gz") source("data-raw/_install_deps.R") shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index ab0420fa..7b1df64e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.6.0.9042 +Version: 1.6.0.9043 Date: 2021-05-17 Title: Antimicrobial Resistance Data Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 05264c82..5c16162f 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# `AMR` 1.6.0.9042 +# `AMR` 1.6.0.9043 ## Last updated: 17 May 2021 ### New diff --git a/R/first_isolate.R b/R/first_isolate.R index 8ee669ac..432ab98d 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -50,7 +50,7 @@ #' @details #' To conduct epidemiological analyses on antimicrobial resistance data, only so-called first isolates should be included to prevent overestimation and underestimation of antimicrobial resistance. Different methods can be used to do so, see below. #' -#' These functions are context-aware. This means that then the `x` argument can be left blank, see *Examples*. +#' These functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*. #' #' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but more efficient for data sets containing microorganism codes or names. #' diff --git a/R/key_antimicrobials.R b/R/key_antimicrobials.R index 9d7fdc1e..1af47321 100755 --- a/R/key_antimicrobials.R +++ b/R/key_antimicrobials.R @@ -37,7 +37,7 @@ #' @param only_rsi_columns a [logical] to indicate whether only columns must be included that were transformed to class `` (see [as.rsi()]) on beforehand (defaults to `FALSE`) #' @param ... ignored, only in place to allow future extensions #' @details -#' The [key_antimicrobials()] and [all_antimicrobials()] functions are context-aware. This means that then the `x` argument can be left blank, see *Examples*. +#' The [key_antimicrobials()] and [all_antimicrobials()] functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*. #' #' The function [key_antimicrobials()] returns a [character] vector with 12 antimicrobial results for every isolate. The function [all_antimicrobials()] returns a [character] vector with all antimicrobial results for every isolate. These vectors can then be compared using [antimicrobials_equal()], to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (`"."`) by [key_antimicrobials()] and ignored by [antimicrobials_equal()]. #' diff --git a/R/mdro.R b/R/mdro.R index 35a1c1b0..fb3d0a37 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -37,7 +37,7 @@ #' @param verbose a [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not. #' @inheritSection eucast_rules Antibiotics #' @details -#' These functions are context-aware. This means that then the `x` argument can be left blank, see *Examples*. +#' These functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*. #' #' For the `pct_required_classes` argument, values above 1 will be divided by 100. This is to support both fractions (`0.75` or `3/4`) and percentages (`75`). #' diff --git a/R/mo.R b/R/mo.R index 4faab984..b741e238 100755 --- a/R/mo.R +++ b/R/mo.R @@ -469,7 +469,7 @@ exec_as.mo <- function(x, x <- strip_whitespace(x, dyslexia_mode) # translate 'unknown' names back to English if (any(x %like% "unbekannt|onbekend|desconocid|sconosciut|iconnu|desconhecid", na.rm = TRUE)) { - trns <- subset(translations_file, pattern %like% "unknown" | only_affect_mo_names == TRUE) + trns <- subset(translations_file, pattern %like% "unknown" | affect_mo_name == TRUE) langs <- LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"] for (l in langs) { for (i in seq_len(nrow(trns))) { diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 569e5818..6d9499d2 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/404.html b/docs/404.html index d0fa7a71..d371cdb4 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index aecda1e3..c2ea2125 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index 078ef63a..35e34a1e 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -39,7 +39,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 diff --git a/docs/articles/index.html b/docs/articles/index.html index 08a7eab3..3a879adf 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 diff --git a/docs/authors.html b/docs/authors.html index 5cfcf556..07d02cb0 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 @@ -236,13 +236,14 @@ Source: inst/CITATION -

Berends MS, Luz CF et al. (2021). AMR - An R Package for Working with Antimicrobial Resistance Data. bioRxiv, https://doi.org/10.1101/810622

+

Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2021). AMR - An R Package for Working with +Antimicrobial Resistance Data. Journal of Statistical Software (accepted for publication), https://www.biorxiv.org/content/10.1101/810622v4

@Article{,
   title = {AMR - An R Package for Working with Antimicrobial Resistance Data},
   author = {M S Berends and C F Luz and A W Friedrich and B N M Sinha and C J Albers and C Glasner},
   doi = {1.24720276528394e-05},
-  journal = {bioRxiv},
-  publisher = {Cold Spring Harbor Laboratory},
+  journal = {Journal of Statistical Software},
+  pages = {Accepted for publication},
   year = {2021},
   url = {https://www.biorxiv.org/content/10.1101/810622v4},
 }
diff --git a/docs/index.html b/docs/index.html index f7faf761..d95a6f64 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,37 +1,76 @@ + - - - - + + + -Antimicrobial Resistance Data Analysis • AMR (for R) - + +AMR (for R) • AMR (for R) + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
-
+
-
+ + +
+ +
- +

Note: the rules of ‘EUCAST Clinical Breakpoints v11.0 (2021)’ are now implemented.

@@ -218,9 +259,9 @@ library(dplyr) example_isolates %>% - mutate(bacteria = mo_fullname(mo)) %>% - filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>% - select(bacteria, aminoglycosides(), carbapenems()) + mutate(bacteria = mo_fullname(mo)) %>% + filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>% + select(bacteria, aminoglycosides(), carbapenems()) #> NOTE: Using column 'mo' as input for mo_is_gram_negative() #> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant() #> NOTE: Determining intrinsic resistance based on 'EUCAST Expert Rules' and @@ -229,7 +270,7 @@ #> 'KAN' (kanamycin) and 'TOB' (tobramycin) #> Selecting carbapenems: columns 'IPM' (imipenem) and 'MEM' (meropenem)

With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (mo_is_gram_negative() and mo_is_intrinsic_resistant()) and a column selection on two antibiotic groups (aminoglycosides() and carbapenems()), the reference data about all microorganisms and all antibiotics in the AMR package make sure you get what you meant:

- +
@@ -391,7 +432,7 @@

The latest and unpublished development version can be installed from GitHub using:

 install.packages("remotes") # if you haven't already
-remotes::install_github("msberends/AMR")
+remotes::install_github("msberends/AMR")

You can also download the latest build from our repository: https://github.com/msberends/AMR/raw/master/data-raw/AMR_latest.tar.gz

@@ -453,7 +494,7 @@
  • It analyses the data with convenient functions that use well-known methods.

    @@ -500,59 +541,22 @@ + + -
    + + + diff --git a/docs/news/index.html b/docs/news/index.html index 28799537..d2b9d7da 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043 @@ -236,9 +236,9 @@ Source: NEWS.md -
    -

    - Unreleased AMR 1.6.0.9042

    +
    +

    + Unreleased AMR 1.6.0.9043

    Last updated: 17 May 2021 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 52145d2c..c2160931 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2021-05-17T09:24Z +last_built: 2021-05-17T17:42Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/index.html b/docs/reference/index.html index cac9b7a6..ab8509b3 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043

    diff --git a/docs/survey.html b/docs/survey.html index 712d11da..54586883 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9042 + 1.6.0.9043
    diff --git a/inst/CITATION b/inst/CITATION index 7f456181..fa8e09b9 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -5,11 +5,12 @@ citEntry( title = "AMR - An R Package for Working with Antimicrobial Resistance Data", author = "M S Berends and C F Luz and A W Friedrich and B N M Sinha and C J Albers and C Glasner", doi = {10.1101/810622}, - journal = "bioRxiv", - publisher = "Cold Spring Harbor Laboratory", + journal = "Journal of Statistical Software", + pages = "Accepted for publication", year = 2021, url = "https://www.biorxiv.org/content/10.1101/810622v4", - textVersion = "Berends MS, Luz CF et al. (2021). AMR - An R Package for Working with Antimicrobial Resistance Data. bioRxiv, https://doi.org/10.1101/810622" + textVersion = "Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2021). AMR - An R Package for Working with +Antimicrobial Resistance Data. Journal of Statistical Software (accepted for publication), https://www.biorxiv.org/content/10.1101/810622v4" ) citFooter("This preprint was accepted for publication in the Journal of Statistical Software, but we are awaiting the actual publication. Many thanks for using our open-source method to work with microbial and antimicrobial data!") diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd index 1577073e..8168dfa1 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -95,7 +95,7 @@ Determine first (weighted) isolates of all microorganisms of every patient per e \details{ To conduct epidemiological analyses on antimicrobial resistance data, only so-called first isolates should be included to prevent overestimation and underestimation of antimicrobial resistance. Different methods can be used to do so, see below. -These functions are context-aware. This means that then the \code{x} argument can be left blank, see \emph{Examples}. +These functions are context-aware. This means that the \code{x} argument can be left blank if used inside a \link{data.frame} call, see \emph{Examples}. The \code{\link[=first_isolate]{first_isolate()}} function is a wrapper around the \code{\link[=is_new_episode]{is_new_episode()}} function, but more efficient for data sets containing microorganism codes or names. diff --git a/man/key_antimicrobials.Rd b/man/key_antimicrobials.Rd index 0e37b89f..45df3a17 100644 --- a/man/key_antimicrobials.Rd +++ b/man/key_antimicrobials.Rd @@ -61,7 +61,7 @@ antimicrobials_equal( These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see \code{\link[=first_isolate]{first_isolate()}}). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes. } \details{ -The \code{\link[=key_antimicrobials]{key_antimicrobials()}} and \code{\link[=all_antimicrobials]{all_antimicrobials()}} functions are context-aware. This means that then the \code{x} argument can be left blank, see \emph{Examples}. +The \code{\link[=key_antimicrobials]{key_antimicrobials()}} and \code{\link[=all_antimicrobials]{all_antimicrobials()}} functions are context-aware. This means that the \code{x} argument can be left blank if used inside a \link{data.frame} call, see \emph{Examples}. The function \code{\link[=key_antimicrobials]{key_antimicrobials()}} returns a \link{character} vector with 12 antimicrobial results for every isolate. The function \code{\link[=all_antimicrobials]{all_antimicrobials()}} returns a \link{character} vector with all antimicrobial results for every isolate. These vectors can then be compared using \code{\link[=antimicrobials_equal]{antimicrobials_equal()}}, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (\code{"."}) by \code{\link[=key_antimicrobials]{key_antimicrobials()}} and ignored by \code{\link[=antimicrobials_equal]{antimicrobials_equal()}}. diff --git a/man/mdro.Rd b/man/mdro.Rd index 582b49bd..43bed458 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -80,7 +80,7 @@ Ordered \link{factor} with levels \code{Negative} < \verb{Positive, unconfirmed} Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines. } \details{ -These functions are context-aware. This means that then the \code{x} argument can be left blank, see \emph{Examples}. +These functions are context-aware. This means that the \code{x} argument can be left blank if used inside a \link{data.frame} call, see \emph{Examples}. For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}).
  • bacteria AMK