From e467cc103e0a7ef7174b7acefbb7b5f489446cdb Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 22 May 2020 20:15:19 +0200 Subject: [PATCH] (v1.1.0.9017) as.ab() update, added ab_url() --- .gitlab-ci.yml | 4 +- DESCRIPTION | 4 +- NAMESPACE | 1 + NEWS.md | 20 +- R/ab.R | 2 +- R/ab_property.R | 31 +- R/lifecycle.R | 24 +- docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 29 +- docs/news/index.html | 33 +- docs/pkgdown.yml | 2 +- docs/reference/AMR-deprecated.html | 4 +- docs/reference/AMR-tidyverse.html | 291 ------------ docs/reference/AMR-vctrs.html | 287 ------------ docs/reference/ab_property.html | 10 +- docs/reference/age.html | 8 +- docs/reference/age_groups.html | 8 +- docs/reference/antivirals.html | 326 -------------- docs/reference/as.ab.html | 6 +- docs/reference/as.disk.html | 6 +- docs/reference/as.mic.html | 6 +- docs/reference/as.mo.html | 6 +- docs/reference/as.rsi.html | 6 +- docs/reference/atc_online.html | 4 +- docs/reference/availability.html | 6 +- docs/reference/bug_drug_combinations.html | 8 +- docs/reference/count.html | 6 +- docs/reference/eucast_rules.html | 4 +- docs/reference/extended-functions.html | 283 ------------ docs/reference/filter_ab_class.html | 6 +- docs/reference/first_isolate.html | 6 +- docs/reference/g.test.html | 6 +- docs/reference/ggplot_pca.html | 4 +- docs/reference/ggplot_rsi.html | 4 +- docs/reference/guess_ab_col.html | 6 +- docs/reference/index.html | 4 +- docs/reference/join.html | 6 +- docs/reference/key_antibiotics.html | 6 +- docs/reference/kurtosis.html | 6 +- docs/reference/lifecycle.html | 36 +- docs/reference/like.html | 6 +- docs/reference/mdro.html | 4 +- docs/reference/mo_source.html | 8 +- docs/reference/p_symbol.html | 6 +- docs/reference/pca.html | 4 +- docs/reference/portion.html | 518 ---------------------- docs/reference/proportion.html | 6 +- docs/reference/read.4D.html | 433 ------------------ docs/reference/reexports.html | 278 ------------ docs/reference/resistance_predict.html | 4 +- docs/reference/skewness.html | 6 +- docs/reference/translate.html | 6 +- index.md | 26 +- man/AMR-deprecated.Rd | 2 +- man/ab_property.Rd | 8 +- man/age.Rd | 4 +- man/age_groups.Rd | 4 +- man/as.ab.Rd | 2 +- man/as.disk.Rd | 4 +- man/as.mic.Rd | 4 +- man/as.mo.Rd | 4 +- man/as.rsi.Rd | 4 +- man/atc_online.Rd | 2 +- man/availability.Rd | 4 +- man/bug_drug_combinations.Rd | 4 +- man/count.Rd | 4 +- man/eucast_rules.Rd | 2 +- man/filter_ab_class.Rd | 4 +- man/first_isolate.Rd | 4 +- man/g.test.Rd | 2 +- man/ggplot_pca.Rd | 2 +- man/ggplot_rsi.Rd | 2 +- man/guess_ab_col.Rd | 2 +- man/join.Rd | 4 +- man/key_antibiotics.Rd | 4 +- man/kurtosis.Rd | 2 +- man/lifecycle.Rd | 28 +- man/like.Rd | 4 +- man/mdro.Rd | 2 +- man/mo_source.Rd | 4 +- man/p_symbol.Rd | 2 +- man/pca.Rd | 2 +- man/proportion.Rd | 4 +- man/resistance_predict.Rd | 2 +- man/skewness.Rd | 2 +- man/translate.Rd | 4 +- tests/testthat/test-ab_property.R | 3 + 90 files changed, 269 insertions(+), 2694 deletions(-) delete mode 100644 docs/reference/AMR-tidyverse.html delete mode 100644 docs/reference/AMR-vctrs.html delete mode 100644 docs/reference/antivirals.html delete mode 100644 docs/reference/extended-functions.html delete mode 100644 docs/reference/portion.html delete mode 100644 docs/reference/read.4D.html delete mode 100644 docs/reference/reexports.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a6640b..ddc70103 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,7 +56,7 @@ before_script: # ---- TEST -R-release: +R-release_test: stage: test when: always allow_failure: false @@ -70,7 +70,7 @@ R-release: paths: - installed_deps/ -R-devel: +R-devel_test: stage: test when: always image: rocker/r-devel diff --git a/DESCRIPTION b/DESCRIPTION index c0295067..ffa41678 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.1.0.9016 -Date: 2020-05-21 +Version: 1.1.0.9017 +Date: 2020-05-22 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NAMESPACE b/NAMESPACE index 0279915e..0339b4f9 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -72,6 +72,7 @@ export(ab_name) export(ab_property) export(ab_synonyms) export(ab_tradenames) +export(ab_url) export(age) export(age_groups) export(anti_join_microorganisms) diff --git a/NEWS.md b/NEWS.md index c86846d4..fc1d1d93 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,22 +1,26 @@ -# AMR 1.1.0.9016 -## Last updated: 21-May-2020 +# AMR 1.1.0.9017 +## Last updated: 22-May-2020 ### Breaking -* Removed code dependency on all other R packages, making this package fully independent on the development process of others. This is a major code change, but will probably not be noticeable by most users. +* Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users. - Making this package independent on especially the tidyverse tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings. + Making this package independent of especially the tidyverse (e.g. packages `dplyr` and `tidyr`) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings. + Negative effects of this change are: * Function `freq()` that was borrowed from the `cleaner` package was removed. Use `cleaner::freq()`, or run `library("cleaner")` before you use `freq()`. - * Printing values of class `mo` or `ab` in a tibble will no longer be in colour and printing `rsi` in a tibble will show the class ``, not `` anymore. This is purely a visual effect. + * Printing values of class `mo` or `rsi` in a tibble will no longer be in colour and printing `rsi` in a tibble will show the class ``, not `` anymore. This is purely a visual effect. * All functions from the `mo_*` family (like `mo_name()` and `mo_gramstain()`) are noticeably slower when running on hundreds of thousands of rows. * For developers: classes `mo` and `ab` now both also inherit class `character`, to support any data transformation. This change invalidates code that checks for class length == 1. ### Changed -* The EUCAST rules function (`eucast_rules()`) at default no longer applies "other" rules that are made available by this package (like setting ampicillin = R when ampicillin + enzym inhibitor = R). The default input value for `rules` is now `c("breakpoints", "expert")` instead of `"all"`, but this can be changed by the user. To return to the old behaviour, set `options(AMR.eucast_rules = "all")`. +* EUCAST rules: + * The `eucast_rules()` function no longer applies "other" rules at default that are made available by this package (like setting ampicillin = R when ampicillin + enzym inhibitor = R). The default input value for `rules` is now `c("breakpoints", "expert")` instead of `"all"`, but this can be changed by the user. To return to the old behaviour, set `options(AMR.eucast_rules = "all")`. + * Added official drug names to verbose output of `eucast_rules()` +* Added function `ab_url()` to return the direct URL of an antimicrobial agent from the official WHO website +* Improvements for algorithm in `as.ab()`, so that e.g. `as.ab("ampi sul")` and `ab_name("ampi sul")` work +* Functions `ab_atc()` and `ab_group()` now return `NA` if no antimicrobial agent could be found * Small fix for some text input that could not be coerced as valid MIC values -* Fix for cases where some functions of newer versions of the `dplyr` package (such as `bind_rows()`) would not preserve the right class for microorganisms (class `mo`) and antibiotics (class `ab`) * Fixed interpretation of generic CLSI interpretation rules (thanks to Anthony Underwood) -* Added official drug names to verbose output of `eucast_rules()` ### Other * Removed previously deprecated function `p.symbol()` - it was replaced with `p_symbol()` diff --git a/R/ab.R b/R/ab.R index cac11131..f1cae98d 100755 --- a/R/ab.R +++ b/R/ab.R @@ -216,7 +216,7 @@ as.ab <- function(x, ...) { # replace multiple same characters to single one with '+', like "ll" -> "l+" x_spelling <- gsub("(.)\\1+", "\\1+", x_spelling) # replace spaces and slashes with a possibility on both - x_spelling <- gsub("[ /]", "( |/)", x_spelling) + x_spelling <- gsub("[ /]", "( .*|.*/)", x_spelling) # try if name starts with it found <- antibiotics[which(antibiotics$name %like% paste0("^", x_spelling)), ]$ab diff --git a/R/ab_property.R b/R/ab_property.R index 074224c1..3399ebe6 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -31,6 +31,8 @@ #' @param units a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples #' @param ... other parameters passed on to [as.ab()] #' @details All output will be [translate]d where possible. +#' +#' The function [ab_url()] will return the direct URL to the official WHO website. A warning will be returned if the reauired ATC code is not available. #' @inheritSection as.ab Source #' @rdname ab_property #' @name ab_property @@ -52,6 +54,7 @@ #' ab_group("AMX") # "Beta-lactams/penicillins" #' ab_atc_group1("AMX") # "Beta-lactam antibacterials, penicillins" #' ab_atc_group2("AMX") # "Penicillins with extended spectrum" +#' ab_url("AMX") # link to the official WHO page #' #' # smart lowercase tranformation #' ab_name(x = c("AMC", "PLB")) # "Amoxicillin/clavulanic acid" "Polymyxin B" @@ -183,6 +186,31 @@ ab_info <- function(x, language = get_locale(), ...) { units = ab_ddd(x, administration = "iv", units = TRUE)))) } + +#' @rdname ab_property +#' @export +ab_url <- function(x, open = FALSE, ...) { + ab <- as.ab(x = x, ... = ...) + u <- paste0("https://www.whocc.no/atc_ddd_index/?code=", ab_atc(ab), "&showdescription=no") + u[is.na(ab_atc(ab))] <- NA_character_ + names(u) <- ab_name(ab) + + NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(ab_atc(ab))] + if (length(NAs) > 0) { + warning("No ATC code available for ", paste0(NAs, collapse = ", "), ".") + } + + if (open == TRUE) { + if (length(u) > 1 & !is.na(u[1L])) { + warning("only the first URL will be opened, as `browseURL()` only suports one string.") + } + if (!is.na(u[1L])) { + utils::browseURL(u[1L]) + } + } + u +} + #' @rdname ab_property #' @export ab_property <- function(x, property = "name", language = get_locale(), ...) { @@ -217,8 +245,7 @@ ab_validate <- function(x, property, ...) { } else if (property %like% "ddd") { return(as.double(x)) } else { - # return "(input)" for NAs - x[is.na(x) & !is.na(x_bak)] <- paste0("(", x_bak[is.na(x) & !is.na(x_bak)], ")") + x[is.na(x) & !is.na(x_bak)] <- NA return(x) } } diff --git a/R/lifecycle.R b/R/lifecycle.R index ed8f123e..bf887b78 100644 --- a/R/lifecycle.R +++ b/R/lifecycle.R @@ -20,37 +20,31 @@ # ==================================================================== # ############### -# NOTE TO SELF: could also have done this with the 'lifecycle' package, but why add another dependency for such an easy job? +# NOTE TO SELF: could also have done this with the 'lifecycle' package, but why add a package dependency for such an easy job?? ############### #' Lifecycles of functions in the `AMR` package #' @name lifecycle #' @rdname lifecycle -#' @description Our functions are categorised using [the lifecycle circle of the `tidyverse` as found on www.tidyverse.org/lifecycle](https://www.tidyverse.org/lifecycle). +#' @description Functions in this `AMR` package are categorised using [the lifecycle circle of the `tidyverse` as found on www.tidyverse.org/lifecycle](https://www.tidyverse.org/lifecycle). #' #' \if{html}{\figure{lifecycle_tidyverse.svg}{options: height=200px style=margin-bottom:5px} \cr} -#' This page contains a section for every lifecycle (with text borrowed from the aforementioned `tidyverse` website), so they can be used in the manual pages of our functions. +#' This page contains a section for every lifecycle (with text borrowed from the aforementioned `tidyverse` website), so they can be used in the manual pages of the functions. #' @section Experimental lifecycle: #' \if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **experimental**. An experimental function is in the very early stages of development. The unlying code might be changing frequently as we rapidly iterate and explore variations in search of the best fit. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions will not be included in releases we submit to CRAN, since they have not yet matured enough. +#' The [lifecycle][AMR::lifecycle] of this function is **experimental**. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this `AMR` package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough. #' @section Maturing lifecycle: #' \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **maturing**. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +#' The [lifecycle][AMR::lifecycle] of this function is **maturing**. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. #' @section Stable lifecycle: #' \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **stable**. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +#' The [lifecycle][AMR::lifecycle] of this function is **stable**. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. #' -#' If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +#' If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. #' @section Retired lifecycle: #' \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **retired**. A retired function is no longer under active development, and (if appropiate) a better alternative is available. We will only make the necessary changes to ensure that retired functions remain available. No new arguments will be added, and only the most critical bugs will be fixed. -#' @section Archived lifecycle: -#' \if{html}{\figure{lifecycle_archived.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **archived**. The development of an archived function has ended, and it is no longer available in future package versions. -#' @section Dormant lifecycle: -#' \if{html}{\figure{lifecycle_dormant.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **dormant**. A dormant function is currently not under active development and has not reached a stable phase. We might return to it in the future. As with experimental functions, you are best off waiting until a function is more mature before you use it in production code. +#' The [lifecycle][AMR::lifecycle] of this function is **retired**. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed. #' @section Questioning lifecycle: #' \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -#' The [lifecycle][AMR::lifecycle] of this function is **questioning**. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our `AMR` package at all. +#' The [lifecycle][AMR::lifecycle] of this function is **questioning**. This function might be no longer be optimal approach, or is it questionable whether this function should be in this `AMR` package at all. NULL diff --git a/docs/404.html b/docs/404.html index c11fc012..a677dbcd 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index e29fb5b0..959a8265 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 diff --git a/docs/articles/index.html b/docs/articles/index.html index 52616c29..81baec6c 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 diff --git a/docs/authors.html b/docs/authors.html index ad14db22..c89d0737 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 diff --git a/docs/index.html b/docs/index.html index c2cdfc2a..e3afa203 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 @@ -191,16 +191,16 @@ AMR (for R)
-

18 October 2019
METHODS PAPER PREPRINTED
-A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/810622). It was updated on 18 December 2019 and in parallel sent to a journal. Please click here for the paper on bioRxiv’s publishers page.

+

METHODS PAPER PREPRINTED
+A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/810622). Please click here for the paper on bioRxiv’s publishers page.

What is AMR (for R)?

-

(TLDR - to find out how to conduct AMR analysis, please continue reading here to get started.

+

(To find out how to conduct AMR analysis, please continue reading here to get started.

AMR is a free, open-source and independent R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.

After installing this package, R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.

-

We created this package for both routine data analysis and academic research (as part of our PhD theses) at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and is free software (see Copyright). It is fully independent on any other R package and only requires R version 3.0.0 (April 2013) or higher to run.

+

This package was created for both routine data analysis and academic research, at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and is free software (see Copyright). It is fully independent of any other R package and can be used with all versions of R since R-3.0.0 (April 2013) and has a total file size of only 5 MB. It was designed to work in any setting, including those with very limited resources.

Used in more than 100 countries
Since its first public release in early 2018, this package has been downloaded from more than 100 countries (source: CRAN logs). Click the map to enlarge, to see the names of the countries. @@ -232,26 +232,11 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/

  • Getting properties for any antibiotic (like name, code of EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name) (manual)
  • Plotting antimicrobial resistance (tutorial)
  • Applying EUCAST expert rules (manual)
  • -
  • Getting SNOMED codes of a microorganism, or get its name associated with a SNOMED code (manual)
  • -
  • Getting LOINC codes of an antibiotic, or get its name associated with a LOINC code (manual)
  • +
  • Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code (manual)
  • +
  • Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code (manual)
  • Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI (link)
  • Principal component analysis for AMR (tutorial)
  • -

    This package is ready-to-use for specialists in many fields:

    -
      -
    • Epidemiologists (both clinical microbiological and research)
    • -
    • (Research) Microbiologists
    • -
    • Biomedical Researchers
    • -
    • Research Pharmacologists
    • -
    • Data Scientists / Data Analysts
    • -
    • Statisticians
    • -
    • Bioinformaticians
    • -
    • Research Veterinarians
    • -
    • Veterinary Epidemiologists
    • -
    • Soil Microbiologists
    • -
    • Extremophile Researchers
    • -
    • Astrobiologists
    • -

    diff --git a/docs/news/index.html b/docs/news/index.html index eb79a1cc..2914bf9d 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017

    @@ -229,24 +229,25 @@ Source: NEWS.md
    -
    -

    -AMR 1.1.0.9016 Unreleased +
    +

    +AMR 1.1.0.9017 Unreleased

    -
    +

    -Last updated: 21-May-2020 +Last updated: 22-May-2020

    Breaking

    • -

      Removed code dependency on all other R packages, making this package fully independent on the development process of others. This is a major code change, but will probably not be noticeable by most users.

      -Making this package independent on especially the tidyverse tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings. Negative effects of this change are: +

      Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.

      +

      Making this package independent of especially the tidyverse (e.g. packages dplyr and tidyr) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.

      +Negative effects of this change are:
      • Function freq() that was borrowed from the cleaner package was removed. Use cleaner::freq(), or run library("cleaner") before you use freq().
      • -
      • Printing values of class mo or ab in a tibble will no longer be in colour and printing rsi in a tibble will show the class <ord>, not <rsi> anymore. This is purely a visual effect.
      • +
      • Printing values of class mo or rsi in a tibble will no longer be in colour and printing rsi in a tibble will show the class <ord>, not <rsi> anymore. This is purely a visual effect.
      • All functions from the mo_* family (like mo_name() and mo_gramstain()) are noticeably slower when running on hundreds of thousands of rows.
      • For developers: classes mo and ab now both also inherit class character, to support any data transformation. This change invalidates code that checks for class length == 1.
      @@ -257,13 +258,19 @@ Making this package independent on especially the tidyverse tremendously increas

      Changed

        -
      • The EUCAST rules function (eucast_rules()) at default no longer applies “other” rules that are made available by this package (like setting ampicillin = R when ampicillin + enzym inhibitor = R). The default input value for rules is now c("breakpoints", "expert") instead of "all", but this can be changed by the user. To return to the old behaviour, set options(AMR.eucast_rules = "all").
      • -
      • Small fix for some text input that could not be coerced as valid MIC values
      • -
      • Fix for cases where some functions of newer versions of the dplyr package (such as bind_rows()) would not preserve the right class for microorganisms (class mo) and antibiotics (class ab)
      • -
      • Fixed interpretation of generic CLSI interpretation rules (thanks to Anthony Underwood)
      • +
      • EUCAST rules: +
          +
        • The eucast_rules() function no longer applies “other” rules at default that are made available by this package (like setting ampicillin = R when ampicillin + enzym inhibitor = R). The default input value for rules is now c("breakpoints", "expert") instead of "all", but this can be changed by the user. To return to the old behaviour, set options(AMR.eucast_rules = "all").
        • Added official drug names to verbose output of eucast_rules()
        +
      • +
      • Added function ab_url() to return the direct URL of an antimicrobial agent from the official WHO website
      • +
      • Improvements for algorithm in as.ab(), so that e.g. as.ab("ampi sul") and ab_name("ampi sul") work
      • +
      • Functions ab_atc() and ab_group() now return NA if no antimicrobial agent could be found
      • +
      • Small fix for some text input that could not be coerced as valid MIC values
      • +
      • Fixed interpretation of generic CLSI interpretation rules (thanks to Anthony Underwood)
      • +

    diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index c7eaa4b4..eba58428 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: WHONET: WHONET.html benchmarks: benchmarks.html resistance_predict: resistance_predict.html -last_built: 2020-05-21T10:28Z +last_built: 2020-05-22T18:14Z urls: reference: https://msberends.gitlab.io/AMR/reference article: https://msberends.gitlab.io/AMR/articles diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index 71342270..26d0dba8 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017

    @@ -253,7 +253,7 @@


    -The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. We will only make the necessary changes to ensure that retired functions remain available. No new arguments will be added, and only the most critical bugs will be fixed.

    +The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.

    Read more on our website!

    diff --git a/docs/reference/AMR-tidyverse.html b/docs/reference/AMR-tidyverse.html deleted file mode 100644 index 88cecd94..00000000 --- a/docs/reference/AMR-tidyverse.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - -Methods for tidyverse — AMR-tidyverse • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    These methods are needed to support methods used by the tidyverse, like joining and transforming data, with new classes that come with this package.

    -
    - -
    scale_type.mo(x)
    -
    -scale_type.ab(x)
    -
    -vec_ptype2.mo(x, y, ...)
    -
    -vec_cast.mo(x, to, ...)
    -
    -vec_ptype2.ab(x, y, ...)
    -
    -vec_cast.ab(x, to, ...)
    - - -

    Stable lifecycle

    - - - -


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/AMR-vctrs.html b/docs/reference/AMR-vctrs.html deleted file mode 100644 index f2a73e8a..00000000 --- a/docs/reference/AMR-vctrs.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - -<code>vctrs</code> methods — AMR-vctrs • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    These methods are needed to support methods used by the tidyverse, like joining and transforming data, with new classes that come with this package.

    -
    - -
    vec_ptype2.mo(x, y, ...)
    -
    -vec_cast.mo(x, to, ...)
    -
    -vec_ptype2.ab(x, y, ...)
    -
    -vec_cast.ab(x, to, ...)
    - - -

    Stable lifecycle

    - - - -


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index 748ee96e..5e74ccc6 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017
    @@ -257,6 +257,8 @@ ab_info(x, language = get_locale(), ...) +ab_url(x, open = FALSE, ...) + ab_property(x, property = "name", language = get_locale(), ...)

    Arguments

    @@ -305,12 +307,13 @@

    Details

    All output will be translated where possible.

    +

    The function ab_url() will return the direct URL to the official WHO website. A warning will be returned if the reauired ATC code is not available.

    Maturing lifecycle


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Source

    @@ -337,6 +340,7 @@ The lifecycle of this function is maturing< ab_group("AMX") # "Beta-lactams/penicillins" ab_atc_group1("AMX") # "Beta-lactam antibacterials, penicillins" ab_atc_group2("AMX") # "Penicillins with extended spectrum" +ab_url("AMX") # link to the official WHO page # smart lowercase tranformation ab_name(x = c("AMC", "PLB")) # "Amoxicillin/clavulanic acid" "Polymyxin B" @@ -379,7 +383,7 @@ The lifecycle of this function is maturing<
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/age.html b/docs/reference/age.html index 7d2287aa..9bf08767 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017
    @@ -266,8 +266,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    @@ -301,7 +301,7 @@ The lifecycle of this function is stable
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 8512f9b1..d0bf90a8 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017

    @@ -275,8 +275,8 @@ The default is to split on young children (0-11), youth (12-24), young adults (2


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    @@ -333,7 +333,7 @@ The lifecycle of this function is stable
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/antivirals.html b/docs/reference/antivirals.html deleted file mode 100644 index d5781d5a..00000000 --- a/docs/reference/antivirals.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - -Data set with ~100 antivirals — antivirals • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    A data set containing all antivirals, according to the ATC code group 'J05' (Antivirals for systemic use).

    -
    - -
    antivirals
    - - -

    Format

    - -

    A data.frame with 102 observations and 7 variables:

    -
    atc

    ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC

    -
    name

    Official name as used by WHONET/EARS-Net or the WHO

    -
    atc_group

    Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC

    -
    oral_ddd

    Defined Daily Dose (DDD), oral treatment

    -
    oral_units

    Units of oral_ddd

    -
    iv_ddd

    Defined Daily Dose (DDD), parenteral treatment

    -
    iv_units

    Units of iv_ddd

    - -
    -

    Source

    - -

    World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): https://www.whocc.no/atc_ddd_index/

    -

    WHOCC

    - - - -


    -This package contains all ~550 antibiotic, antimycotic and antiviral drugs and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, https://www.whocc.no) and the Pharmaceuticals Community Register of the European Commission (http://ec.europa.eu/health/documents/community-register/html/atc.htm).

    -

    These have become the gold standard for international drug utilisation monitoring and research.

    -

    The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.

    -

    NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    -

    See also

    - - - -
    - -
    - - - -
    - - - - - - - - - - - diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 0ddb60f7..393363e3 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -271,7 +271,7 @@


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    WHOCC

    @@ -328,7 +328,7 @@ This package contains all ~550 antibiotic, antimycotic and antiviral dru
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index 04c4631b..fdcbe1aa 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -263,8 +263,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index 109f7934..9962855a 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -263,8 +263,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index e3ef3483..0e37c2c9 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -365,8 +365,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Catalogue of Life

    diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index cc63037f..575568fd 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -330,8 +330,8 @@ A microorganism is categorised as Susceptible, Increased exposure when


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index 83db578b..b1399033 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -83,7 +83,7 @@ This function requires an internet connection." /> AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -307,7 +307,7 @@ This function requires an internet connection." />


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    Read more on our website!

    diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 97fb5380..375a974e 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -261,8 +261,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 2876a87d..54802d0d 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -327,8 +327,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    @@ -365,7 +365,7 @@ The lifecycle of this function is stable
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/count.html b/docs/reference/count.html index 857741a0..4d4353a6 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -83,7 +83,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -310,8 +310,8 @@ count_resistant() should be used to count resistant isolates, count_susceptible(


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Interpretation of R and S/I

    diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 57828c12..b328576e 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 1.1.0.9016 + 1.1.0.9017 @@ -398,7 +398,7 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Read more on our website!

    diff --git a/docs/reference/extended-functions.html b/docs/reference/extended-functions.html deleted file mode 100644 index 1fc3301f..00000000 --- a/docs/reference/extended-functions.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - -Extended functions — extended-functions • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    These functions are extensions of functions in other packages.

    -
    - -
    scale_type.mo(x)
    -
    -scale_type.ab(x)
    - - -

    Stable lifecycle

    - - - -


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/filter_ab_class.html b/docs/reference/filter_ab_class.html index c998ca5b..997aee93 100644 --- a/docs/reference/filter_ab_class.html +++ b/docs/reference/filter_ab_class.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -294,8 +294,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Examples

    if (FALSE) {
    diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html
    index e44c462f..443b91d4 100644
    --- a/docs/reference/first_isolate.html
    +++ b/docs/reference/first_isolate.html
    @@ -82,7 +82,7 @@
           
           
             AMR (for R)
    -        1.1.0.9015
    +        1.1.0.9017
           
         
     
    @@ -387,8 +387,8 @@ To conduct an analysis of antimicrobial resistance, you should only include the
         
     
     


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 2a3fa685..d0e70a55 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -329,7 +329,7 @@


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    Read more on our website!

    @@ -393,7 +393,7 @@ The lifecycle of this function is questioni
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html index ea2d017d..4439fb36 100644 --- a/docs/reference/ggplot_pca.html +++ b/docs/reference/ggplot_pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -376,7 +376,7 @@


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Examples

    # `example_isolates` is a dataset available in the AMR package.
    diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html
    index a8dca305..f97ff905 100644
    --- a/docs/reference/ggplot_rsi.html
    +++ b/docs/reference/ggplot_rsi.html
    @@ -82,7 +82,7 @@
           
           
             AMR (for R)
    -        1.1.0.9015
    +        1.1.0.9017
           
         
     
    @@ -404,7 +404,7 @@
         
     
     


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Read more on our website!

    diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 7c377ed3..2c6b0584 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -265,7 +265,7 @@


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Read more on our website!

    @@ -315,7 +315,7 @@ The lifecycle of this function is maturing<
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index cc481058..148a8863 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.1.0.9016 + 1.1.0.9017 @@ -312,7 +312,7 @@ -

    ab_name() ab_atc() ab_cid() ab_synonyms() ab_tradenames() ab_group() ab_atc_group1() ab_atc_group2() ab_loinc() ab_ddd() ab_info() ab_property()

    +

    ab_name() ab_atc() ab_cid() ab_synonyms() ab_tradenames() ab_group() ab_atc_group1() ab_atc_group2() ab_loinc() ab_ddd() ab_info() ab_url() ab_property()

    Property of an antibiotic

    diff --git a/docs/reference/join.html b/docs/reference/join.html index 095e8220..a33a04fa 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -277,8 +277,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index 765d6a3a..0e16d6fe 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -362,8 +362,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Key antibiotics

    diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 73dc4485..b8354257 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -264,7 +264,7 @@


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    Read more on our website!

    @@ -289,7 +289,7 @@ The lifecycle of this function is questioni
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index f29aba06..bbc15045 100644 --- a/docs/reference/lifecycle.html +++ b/docs/reference/lifecycle.html @@ -49,9 +49,9 @@ - +This page contains a section for every lifecycle (with text borrowed from the aforementioned tidyverse website), so they can be used in the manual pages of the functions." /> @@ -84,7 +84,7 @@ This page contains a section for every lifecycle (with text borrowed from the af AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -234,9 +234,9 @@ This page contains a section for every lifecycle (with text borrowed from the af
    -

    Our functions are categorised using the lifecycle circle of the tidyverse as found on www.tidyverse.org/lifecycle.

    +

    Functions in this AMR package are categorised using the lifecycle circle of the tidyverse as found on www.tidyverse.org/lifecycle.


    -This page contains a section for every lifecycle (with text borrowed from the aforementioned tidyverse website), so they can be used in the manual pages of our functions.

    +This page contains a section for every lifecycle (with text borrowed from the aforementioned tidyverse website), so they can be used in the manual pages of the functions.

    @@ -246,44 +246,32 @@ This page contains a section for every lifecycle (with text borrowed from the af


    -The lifecycle of this function is experimental. An experimental function is in the very early stages of development. The unlying code might be changing frequently as we rapidly iterate and explore variations in search of the best fit. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions will not be included in releases we submit to CRAN, since they have not yet matured enough.

    +The lifecycle of this function is experimental. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this AMR package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.

    Maturing lifecycle


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Stable lifecycle


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Retired lifecycle


    -The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. We will only make the necessary changes to ensure that retired functions remain available. No new arguments will be added, and only the most critical bugs will be fixed.

    -

    Archived lifecycle

    - - - -


    -The lifecycle of this function is archived. The development of an archived function has ended, and it is no longer available in future package versions.

    -

    Dormant lifecycle

    - - - -


    -The lifecycle of this function is dormant. A dormant function is currently not under active development and has not reached a stable phase. We might return to it in the future. As with experimental functions, you are best off waiting until a function is more mature before you use it in production code.

    +The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.

    Questioning lifecycle


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/like.html b/docs/reference/like.html index 75f1eef0..d364b0bb 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -279,8 +279,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 1761c813..c41bb82e 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -333,7 +333,7 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Antibiotics

    diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 428e2b64..4f08deb1 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -307,8 +307,8 @@ mo_genus("lab_Staph_aureus")


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    @@ -330,7 +330,7 @@ The lifecycle of this function is stable
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/p_symbol.html b/docs/reference/p_symbol.html index 03a78e9f..d1dbae16 100644 --- a/docs/reference/p_symbol.html +++ b/docs/reference/p_symbol.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -258,7 +258,7 @@


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    Read more on our website!

    @@ -280,7 +280,7 @@ The lifecycle of this function is questioni
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 282fc95a..2d64955d 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -309,7 +309,7 @@


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Examples

    # `example_isolates` is a dataset available in the AMR package.
    diff --git a/docs/reference/portion.html b/docs/reference/portion.html
    deleted file mode 100644
    index e66aec34..00000000
    --- a/docs/reference/portion.html
    +++ /dev/null
    @@ -1,518 +0,0 @@
    -
    -
    -
    -  
    -  
    -
    -
    -
    -Calculate resistance of isolates — portion • AMR (for R)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -  
    -  
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -  
    -
    -  
    -    
    -
    - - - - -
    - -
    -
    - - -
    -

    These functions can be used to calculate the (co-)resistance of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.

    -

    portion_R and portion_IR can be used to calculate resistance, portion_S and portion_SI can be used to calculate susceptibility.

    -
    - -
    portion_R(..., minimum = 30, as_percent = FALSE,
    -  only_all_tested = FALSE)
    -
    -portion_IR(..., minimum = 30, as_percent = FALSE,
    -  only_all_tested = FALSE)
    -
    -portion_I(..., minimum = 30, as_percent = FALSE,
    -  only_all_tested = FALSE)
    -
    -portion_SI(..., minimum = 30, as_percent = FALSE,
    -  only_all_tested = FALSE)
    -
    -portion_S(..., minimum = 30, as_percent = FALSE,
    -  only_all_tested = FALSE)
    -
    -portion_df(data, translate_ab = "name", language = get_locale(),
    -  minimum = 30, as_percent = FALSE, combine_SI = TRUE,
    -  combine_IR = FALSE)
    -
    -rsi_df(data, translate_ab = "name", language = get_locale(),
    -  minimum = 30, as_percent = FALSE, combine_SI = TRUE,
    -  combine_IR = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ...

    one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with as.rsi if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.

    minimum

    the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum will return NA with a warning. The default number of 30 isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.

    as_percent

    a logical to indicate whether the output must be returned as a hundred fold with % sign (a character). A value of 0.123456 will then be returned as "12.3%".

    only_all_tested

    (for combination therapies, i.e. using more than one variable for ...) a logical to indicate that isolates must be tested for all antibiotics, see section Combination therapy below

    data

    a data.frame containing columns with class rsi (see as.rsi)

    translate_ab

    a column name of the antibiotics data set to translate the antibiotic abbreviations to, using ab_property

    language

    language of the returned text, defaults to system language (see get_locale) and can also be set with getOption("AMR_locale"). Use language = NULL or language = "" to prevent translation.

    combine_SI

    a logical to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the parameter combine_IR, but this now follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is TRUE.

    combine_IR

    a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see parameter combine_SI.

    - -

    Source

    - -

    M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition, 2014, Clinical and Laboratory Standards Institute (CLSI). https://clsi.org/standards/products/microbiology/documents/m39/.

    -

    Wickham H. Tidy Data. The Journal of Statistical Software, vol. 59, 2014. http://vita.had.co.nz/papers/tidy-data.html

    -

    Value

    - -

    Double or, when as_percent = TRUE, a character.

    -

    Details

    - -

    Remember that you should filter your table to let it contain only first isolates! This is needed to exclude duplicates and to reduce selection bias. Use first_isolate to determine them in your data set.

    -

    These functions are not meant to count isolates, but to calculate the portion of resistance/susceptibility. Use the count functions to count isolates. The function portion_SI() is essentially equal to count_SI() / count_all(). Low counts can infuence the outcome - the portion functions may camouflage this, since they only return the portion (albeit being dependent on the minimum parameter).

    -

    The function portion_df takes any variable from data that has an "rsi" class (created with as.rsi) and calculates the portions R, I and S. The resulting tidy data (see Source) data.frame will have three rows (S/I/R) and a column for each group and each variable with class "rsi".

    -

    The function rsi_df works exactly like portion_df, but adds the number of isolates.

    -

    Combination therapy

    - - - -

    When using more than one variable for ... (= combination therapy)), use only_all_tested to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Antibiotic A and Antibiotic B, about how portion_SI works to calculate the %SI:

    -
    ---------------------------------------------------------------------
    -                    only_all_tested = FALSE  only_all_tested = TRUE
    -                    -----------------------  -----------------------
    - Drug A    Drug B   include as  include as   include as  include as
    -                    numerator   denominator  numerator   denominator
    ---------  --------  ----------  -----------  ----------  -----------
    - S or I    S or I       X            X            X            X
    -   R       S or I       X            X            X            X
    -  <NA>     S or I       X            X            -            -
    - S or I      R          X            X            X            X
    -   R         R          -            X            -            X
    -  <NA>       R          -            -            -            -
    - S or I     <NA>        X            X            -            -
    -   R        <NA>        -            -            -            -
    -  <NA>      <NA>        -            -            -            -
    ---------------------------------------------------------------------
    -
    - -

    Please note that, in combination therapies, for only_all_tested = TRUE applies that:

    -   count_S()  +  count_I()  +  count_R()  == count_all()
    -  portion_S() + portion_I() + portion_R() == 1
    -

    and that, in combination therapies, for only_all_tested = FALSE applies that:

    -   count_S()  +  count_I()  +  count_R()  >= count_all()
    -  portion_S() + portion_I() + portion_R() >= 1
    -
    - -

    Using only_all_tested has no impact when only using one antibiotic as input.

    -

    Interpretation of S, I and R

    - - - -

    In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

    -
      -
    • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

    • -
    • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

    • -
    • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

    • -
    - -

    Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

    -

    This AMR package honours this new insight. Use portion_SI to determine antimicrobial susceptibility and count_SI to count susceptible isolates.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    -

    See also

    - -

    count_* to count resistant and susceptible isolates.

    - -

    Examples

    -
    # example_isolates is a data set available in the AMR package.
    -?example_isolates
    -
    -# Calculate resistance
    -portion_R(example_isolates$AMX)
    -portion_IR(example_isolates$AMX)
    -
    -# Or susceptibility
    -portion_S(example_isolates$AMX)
    -portion_SI(example_isolates$AMX)
    -
    -# Do the above with pipes:
    -library(dplyr)
    -example_isolates %>% portion_R(AMX)
    -example_isolates %>% portion_IR(AMX)
    -example_isolates %>% portion_S(AMX)
    -example_isolates %>% portion_SI(AMX)
    -
    -example_isolates %>%
    -  group_by(hospital_id) %>%
    -  summarise(p = portion_SI(CIP),
    -            n = n_rsi(CIP)) # n_rsi works like n_distinct in dplyr
    -
    -example_isolates %>%
    -  group_by(hospital_id) %>%
    -  summarise(R = portion_R(CIP, as_percent = TRUE),
    -            I = portion_I(CIP, as_percent = TRUE),
    -            S = portion_S(CIP, as_percent = TRUE),
    -            n1 = count_all(CIP),  # the actual total; sum of all three
    -            n2 = n_rsi(CIP),      # same - analogous to n_distinct
    -            total = n())          # NOT the number of tested isolates!
    -
    -# Calculate co-resistance between amoxicillin/clav acid and gentamicin,
    -# so we can see that combination therapy does a lot more than mono therapy:
    -example_isolates %>% portion_SI(AMC)      # %SI = 76.3%
    -example_isolates %>% count_all(AMC)       #   n = 1879
    -
    -example_isolates %>% portion_SI(GEN)      # %SI = 75.4%
    -example_isolates %>% count_all(GEN)       #   n = 1855
    -
    -example_isolates %>% portion_SI(AMC, GEN) # %SI = 94.1%
    -example_isolates %>% count_all(AMC, GEN)  #   n = 1939
    -
    -
    -# See Details on how `only_all_tested` works. Example:
    -example_isolates %>%
    -  summarise(numerator = count_SI(AMC, GEN),
    -            denominator = count_all(AMC, GEN),
    -            portion = portion_SI(AMC, GEN))
    -#   numerator denominator portion
    -#        1764        1936  0.9408
    -example_isolates %>%
    -  summarise(numerator = count_SI(AMC, GEN, only_all_tested = TRUE),
    -            denominator = count_all(AMC, GEN, only_all_tested = TRUE),
    -            portion = portion_SI(AMC, GEN, only_all_tested = TRUE))
    -#   numerator denominator portion
    -#       1687        1798   0.9383
    -
    -
    -example_isolates %>%
    -  group_by(hospital_id) %>%
    -  summarise(cipro_p = portion_SI(CIP, as_percent = TRUE),
    -            cipro_n = count_all(CIP),
    -            genta_p = portion_SI(GEN, as_percent = TRUE),
    -            genta_n = count_all(GEN),
    -            combination_p = portion_SI(CIP, GEN, as_percent = TRUE),
    -            combination_n = count_all(CIP, GEN))
    -
    -# Get portions S/I/R immediately of all rsi columns
    -example_isolates %>%
    -  select(AMX, CIP) %>%
    -  portion_df(translate = FALSE)
    -
    -# It also supports grouping variables
    -example_isolates %>%
    -  select(hospital_id, AMX, CIP) %>%
    -  group_by(hospital_id) %>%
    -  portion_df(translate = FALSE)
    -
    -
    -if (FALSE) {
    -
    -# calculate current empiric combination therapy of Helicobacter gastritis:
    -my_table %>%
    -  filter(first_isolate == TRUE,
    -         genus == "Helicobacter") %>%
    -  summarise(p = portion_S(AMX, MTR),  # amoxicillin with metronidazole
    -            n = count_all(AMX, MTR))
    -}
    -
    - -
    - - - -
    - - - - - - - - - - - diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index 3002a0c1..715b0a9d 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -359,8 +359,8 @@ resistance() should be used to calculate resistance, susceptibility() should be


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Interpretation of R and S/I

    diff --git a/docs/reference/read.4D.html b/docs/reference/read.4D.html deleted file mode 100644 index b75170fd..00000000 --- a/docs/reference/read.4D.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - -Read data from 4D database — read.4D • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This function is only useful for the MMB department of the UMCG. Use this function to import data by just defining the file parameter. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with as.mo() and transform all antimicrobial columns with as.rsi().

    -
    - -
    read.4D(
    -  file,
    -  info = interactive(),
    -  header = TRUE,
    -  row.names = NULL,
    -  sep = "\t",
    -  quote = "\"'",
    -  dec = ",",
    -  na.strings = c("NA", "", "."),
    -  skip = 2,
    -  check.names = TRUE,
    -  strip.white = TRUE,
    -  fill = TRUE,
    -  blank.lines.skip = TRUE,
    -  stringsAsFactors = FALSE,
    -  fileEncoding = "UTF-8",
    -  encoding = "UTF-8"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    file

    the name of the file which the data are to be read from. - Each row of the table appears as one line of the file. If it does - not contain an absolute path, the file name is - relative to the current working directory, - getwd(). Tilde-expansion is performed where supported. - This can be a compressed file (see file).

    -

    Alternatively, file can be a readable text-mode - connection (which will be opened for reading if - necessary, and if so closed (and hence destroyed) at - the end of the function call). (If stdin() is used, - the prompts for lines may be somewhat confusing. Terminate input - with a blank line or an EOF signal, Ctrl-D on Unix and - Ctrl-Z on Windows. Any pushback on stdin() will be - cleared before return.)

    -

    file can also be a complete URL. (For the supported URL - schemes, see the ‘URLs’ section of the help for - url.)

    info

    a logical to indicate whether info about the import should be printed, defaults to TRUE in interactive sessions

    header

    a logical value indicating whether the file contains the - names of the variables as its first line. If missing, the value is - determined from the file format: header is set to TRUE - if and only if the first row contains one fewer field than the - number of columns.

    row.names

    a vector of row names. This can be a vector giving - the actual row names, or a single number giving the column of the - table which contains the row names, or character string giving the - name of the table column containing the row names.

    -

    If there is a header and the first row contains one fewer field than - the number of columns, the first column in the input is used for the - row names. Otherwise if row.names is missing, the rows are - numbered.

    -

    Using row.names = NULL forces row numbering. Missing or - NULL row.names generate row names that are considered - to be ‘automatic’ (and not preserved by as.matrix).

    sep

    the field separator character. Values on each line of the - file are separated by this character. If sep = "" (the - default for read.table) the separator is ‘white space’, - that is one or more spaces, tabs, newlines or carriage returns.

    quote

    the set of quoting characters. To disable quoting - altogether, use quote = "". See scan for the - behaviour on quotes embedded in quotes. Quoting is only considered - for columns read as character, which is all of them unless - colClasses is specified.

    dec

    the character used in the file for decimal points.

    na.strings

    a character vector of strings which are to be - interpreted as NA values. Blank fields are also - considered to be missing values in logical, integer, numeric and - complex fields. Note that the test happens after - white space is stripped from the input, so na.strings - values may need their own white space stripped in advance.

    skip

    integer: the number of lines of the data file to skip before - beginning to read data.

    check.names

    logical. If TRUE then the names of the - variables in the data frame are checked to ensure that they are - syntactically valid variable names. If necessary they are adjusted - (by make.names) so that they are, and also to ensure - that there are no duplicates.

    strip.white

    logical. Used only when sep has - been specified, and allows the stripping of leading and trailing - white space from unquoted character fields (numeric fields - are always stripped). See scan for further details - (including the exact meaning of ‘white space’), - remembering that the columns may include the row names.

    fill

    logical. If TRUE then in case the rows have unequal - length, blank fields are implicitly added. See ‘Details’.

    blank.lines.skip

    logical: if TRUE blank lines in the - input are ignored.

    stringsAsFactors

    logical: should character vectors be converted - to factors? Note that this is overridden by as.is and - colClasses, both of which allow finer control.

    fileEncoding

    character string: if non-empty declares the - encoding used on a file (not a connection) so the character data can - be re-encoded. See the ‘Encoding’ section of the help for - file, the ‘R Data Import/Export Manual’ and - ‘Note’.

    encoding

    encoding to be assumed for input strings. It is - used to mark character strings as known to be in - Latin-1 or UTF-8 (see Encoding): it is not used to - re-encode the input, but allows R to handle encoded strings in - their native encoding (if one of those two). See ‘Value’ - and ‘Note’.

    - -

    Details

    - -

    Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer.

    -

    Dormant lifecycle

    - - - -


    -The lifecycle of this function is dormant. A dormant function is currently not under active development and has not reached a stable phase. We might return to it in the future. As with experimental functions, you are best off waiting until a function is more mature before you use it in production code.

    -

    Read more on our website!

    - - - -

    On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html deleted file mode 100644 index c4c938b2..00000000 --- a/docs/reference/reexports.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - -Objects exported from other packages — reexports • AMR (for R) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    These objects are imported from other packages. Follow the links -below to see their documentation.

    - -
    cleaner

    freq

    - - -
    - - - - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index fc27b98c..7bbf5d93 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -362,7 +362,7 @@


    -The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.

    +The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code.

    Interpretation of R and S/I

    diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index d0741ab5..2cd7fac3 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -83,7 +83,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr AMR (for R) - 1.1.0 + 1.1.0.9017 @@ -266,7 +266,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr


    -The lifecycle of this function is questioning. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our AMR package at all.

    +The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR package at all.

    Read more on our website!

    @@ -291,7 +291,7 @@ The lifecycle of this function is questioni
    -

    Site built with pkgdown 1.5.0.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 45cf8470..d4f887ba 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.1.0.9015 + 1.1.0.9017 @@ -250,8 +250,8 @@


    -The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.

    -

    If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    +The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

    +

    If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

    Read more on our website!

    diff --git a/index.md b/index.md index 7f4ecf8e..6a915997 100644 --- a/index.md +++ b/index.md @@ -1,18 +1,17 @@ # `AMR` (for R) -> *18 October 2019* > **METHODS PAPER PREPRINTED** -> A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/810622). It was **updated on 18 December 2019** and in parallel sent to a journal. Please click [here for the paper on bioRxiv's publishers page](https://doi.org/10.1101/810622). +> A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/810622). Please click [here for the paper on bioRxiv's publishers page](https://doi.org/10.1101/810622). ### What is `AMR` (for R)? -*(TLDR - to find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html).* +*(To find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html).* `AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. After installing this package, R knows [**~70,000 distinct microbial species**](./reference/microorganisms.html) and all [**~550 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. -We created this package for both routine data analysis and academic research (as part of our PhD theses) at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)). It is fully independent on any other R package and only requires R version 3.0.0 (April 2013) or higher to run. +This package was created for both routine data analysis and academic research, at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)). It is fully independent of any other R package and can be used with all versions of R since R-3.0.0 (April 2013) and has a total file size of only 5 MB. It was designed to work in any setting, including those with very limited resources.

    @@ -48,26 +47,11 @@ This package can be used for: * Getting properties for any antibiotic (like name, code of EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name) ([manual](./reference/ab_property.html)) * Plotting antimicrobial resistance ([tutorial](./articles/AMR.html)) * Applying EUCAST expert rules ([manual](./reference/eucast_rules.html)) - * Getting SNOMED codes of a microorganism, or get its name associated with a SNOMED code ([manual](./reference/mo_property.html)) - * Getting LOINC codes of an antibiotic, or get its name associated with a LOINC code ([manual](./reference/ab_property.html)) + * Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code ([manual](./reference/mo_property.html)) + * Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code ([manual](./reference/ab_property.html)) * Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI ([link](https://gitlab.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt)) * Principal component analysis for AMR ([tutorial](./articles/PCA.html)) -This package is ready-to-use for specialists in many fields: - - * Epidemiologists (both clinical microbiological and research) - * (Research) Microbiologists - * Biomedical Researchers - * Research Pharmacologists - * Data Scientists / Data Analysts - * Statisticians - * Bioinformaticians - * Research Veterinarians - * Veterinary Epidemiologists - * Soil Microbiologists - * Extremophile Researchers - * Astrobiologists - ### Get this package #### Latest released version diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd index 7c172066..456c38d2 100644 --- a/man/AMR-deprecated.Rd +++ b/man/AMR-deprecated.Rd @@ -28,7 +28,7 @@ These functions are so-called '\link{Deprecated}'. They will be removed in a fut \section{Retired lifecycle}{ \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. We will only make the necessary changes to ensure that retired functions remain available. No new arguments will be added, and only the most critical bugs will be fixed. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed. } \section{Read more on our website!}{ diff --git a/man/ab_property.Rd b/man/ab_property.Rd index 7c2823f0..b318ff61 100644 --- a/man/ab_property.Rd +++ b/man/ab_property.Rd @@ -14,6 +14,7 @@ \alias{ab_loinc} \alias{ab_ddd} \alias{ab_info} +\alias{ab_url} \title{Property of an antibiotic} \usage{ ab_name(x, language = get_locale(), tolower = FALSE, ...) @@ -38,6 +39,8 @@ ab_ddd(x, administration = "oral", units = FALSE, ...) ab_info(x, language = get_locale(), ...) +ab_url(x, open = FALSE, ...) + ab_property(x, property = "name", language = get_locale(), ...) } \arguments{ @@ -68,11 +71,13 @@ Use these functions to return a specific property of an antibiotic from the \lin } \details{ All output will be \link{translate}d where possible. + +The function \code{\link[=ab_url]{ab_url()}} will return the direct URL to the official WHO website. A warning will be returned if the reauired ATC code is not available. } \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Source}{ @@ -99,6 +104,7 @@ ab_tradenames("AMX") # same ab_group("AMX") # "Beta-lactams/penicillins" ab_atc_group1("AMX") # "Beta-lactam antibacterials, penicillins" ab_atc_group2("AMX") # "Penicillins with extended spectrum" +ab_url("AMX") # link to the official WHO page # smart lowercase tranformation ab_name(x = c("AMC", "PLB")) # "Amoxicillin/clavulanic acid" "Polymyxin B" diff --git a/man/age.Rd b/man/age.Rd index 25ac90c5..3d0d3483 100644 --- a/man/age.Rd +++ b/man/age.Rd @@ -24,9 +24,9 @@ Calculates age in years based on a reference date, which is the sytem date at de \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/age_groups.Rd b/man/age_groups.Rd index faf8ef4b..c019e59a 100644 --- a/man/age_groups.Rd +++ b/man/age_groups.Rd @@ -36,9 +36,9 @@ The default is to split on young children (0-11), youth (12-24), young adults (2 \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/as.ab.Rd b/man/as.ab.Rd index abbfb05a..fc3d097a 100644 --- a/man/as.ab.Rd +++ b/man/as.ab.Rd @@ -38,7 +38,7 @@ European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{htt \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{WHOCC}{ diff --git a/man/as.disk.Rd b/man/as.disk.Rd index 139789d1..ce721f98 100644 --- a/man/as.disk.Rd +++ b/man/as.disk.Rd @@ -27,9 +27,9 @@ Interpret disk values as RSI values with \code{\link[=as.rsi]{as.rsi()}}. It sup \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/as.mic.Rd b/man/as.mic.Rd index d0dc3f3a..819e5354 100755 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -27,9 +27,9 @@ To interpret MIC values as RSI values, use \code{\link[=as.rsi]{as.rsi()}} on MI \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/as.mo.Rd b/man/as.mo.Rd index b6b60956..e639d500 100644 --- a/man/as.mo.Rd +++ b/man/as.mo.Rd @@ -133,9 +133,9 @@ Group 3 (least prevalent microorganisms) consists of all other microorganisms. \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Catalogue of Life}{ diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 22f99c0d..a62d9ec8 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -88,9 +88,9 @@ This AMR package honours this new insight. Use \code{\link[=susceptibility]{susc \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/atc_online.Rd b/man/atc_online.Rd index 41752155..6ae5223b 100644 --- a/man/atc_online.Rd +++ b/man/atc_online.Rd @@ -66,7 +66,7 @@ Abbreviations of return values when using \code{property = "U"} (unit): \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } \section{Read more on our website!}{ diff --git a/man/availability.Rd b/man/availability.Rd index 325a4d68..a27da6db 100644 --- a/man/availability.Rd +++ b/man/availability.Rd @@ -23,9 +23,9 @@ The function returns a \code{\link{data.frame}} with columns \code{"resistant"} \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/bug_drug_combinations.Rd b/man/bug_drug_combinations.Rd index c7341517..3681ccbf 100644 --- a/man/bug_drug_combinations.Rd +++ b/man/bug_drug_combinations.Rd @@ -68,9 +68,9 @@ The language of the output can be overwritten with \code{options(AMR_locale)}, p \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/count.Rd b/man/count.Rd index 2a818413..74e7a636 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -75,9 +75,9 @@ The function \code{\link[=count_df]{count_df()}} takes any variable from \code{d \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Interpretation of R and S/I}{ diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd index 315663fc..594f64b5 100644 --- a/man/eucast_rules.Rd +++ b/man/eucast_rules.Rd @@ -156,7 +156,7 @@ The following antibiotics are used for the functions \code{\link[=eucast_rules]{ \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Read more on our website!}{ diff --git a/man/filter_ab_class.Rd b/man/filter_ab_class.Rd index 207392cf..05b052d1 100644 --- a/man/filter_ab_class.Rd +++ b/man/filter_ab_class.Rd @@ -62,9 +62,9 @@ The \code{group} column in \link{antibiotics} data set will be searched for \cod \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \examples{ diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd index 01a8334a..5302942e 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -125,9 +125,9 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/g.test.Rd b/man/g.test.Rd index c1a7a5cf..c153147e 100644 --- a/man/g.test.Rd +++ b/man/g.test.Rd @@ -100,7 +100,7 @@ If there are more than two categories and you want to find out which ones are si \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } \section{Read more on our website!}{ diff --git a/man/ggplot_pca.Rd b/man/ggplot_pca.Rd index aa1ebddd..bb20539f 100644 --- a/man/ggplot_pca.Rd +++ b/man/ggplot_pca.Rd @@ -107,7 +107,7 @@ The colours for labels and points can be changed by adding another scale layer f \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \examples{ diff --git a/man/ggplot_rsi.Rd b/man/ggplot_rsi.Rd index c1d45b31..392861c2 100644 --- a/man/ggplot_rsi.Rd +++ b/man/ggplot_rsi.Rd @@ -138,7 +138,7 @@ At default, the names of antibiotics will be shown on the plots using \code{\lin \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Read more on our website!}{ diff --git a/man/guess_ab_col.Rd b/man/guess_ab_col.Rd index 4687037c..c35ca3bf 100644 --- a/man/guess_ab_col.Rd +++ b/man/guess_ab_col.Rd @@ -25,7 +25,7 @@ You can look for an antibiotic (trade) name or abbreviation and it will search \ \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Read more on our website!}{ diff --git a/man/join.Rd b/man/join.Rd index e53fe763..446b1afe 100755 --- a/man/join.Rd +++ b/man/join.Rd @@ -43,9 +43,9 @@ These functions rely on \code{\link[=merge]{merge()}}, a base R function to do j \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/key_antibiotics.Rd b/man/key_antibiotics.Rd index b01058a4..8d759d83 100755 --- a/man/key_antibiotics.Rd +++ b/man/key_antibiotics.Rd @@ -109,9 +109,9 @@ The function \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}} check \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Key antibiotics}{ diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd index faf08a61..2f710cc2 100644 --- a/man/kurtosis.Rd +++ b/man/kurtosis.Rd @@ -26,7 +26,7 @@ Kurtosis is a measure of the "tailedness" of the probability distribution of a r \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } \section{Read more on our website!}{ diff --git a/man/lifecycle.Rd b/man/lifecycle.Rd index be0ca3b2..e3c85754 100644 --- a/man/lifecycle.Rd +++ b/man/lifecycle.Rd @@ -4,52 +4,40 @@ \alias{lifecycle} \title{Lifecycles of functions in the \code{AMR} package} \description{ -Our functions are categorised using \href{https://www.tidyverse.org/lifecycle}{the lifecycle circle of the \code{tidyverse} as found on www.tidyverse.org/lifecycle}. +Functions in this \code{AMR} package are categorised using \href{https://www.tidyverse.org/lifecycle}{the lifecycle circle of the \code{tidyverse} as found on www.tidyverse.org/lifecycle}. \if{html}{\figure{lifecycle_tidyverse.svg}{options: height=200px style=margin-bottom:5px} \cr} -This page contains a section for every lifecycle (with text borrowed from the aforementioned \code{tidyverse} website), so they can be used in the manual pages of our functions. +This page contains a section for every lifecycle (with text borrowed from the aforementioned \code{tidyverse} website), so they can be used in the manual pages of the functions. } \section{Experimental lifecycle}{ \if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{experimental}. An experimental function is in the very early stages of development. The unlying code might be changing frequently as we rapidly iterate and explore variations in search of the best fit. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions will not be included in releases we submit to CRAN, since they have not yet matured enough. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{experimental}. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this \code{AMR} package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough. } \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Retired lifecycle}{ \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. We will only make the necessary changes to ensure that retired functions remain available. No new arguments will be added, and only the most critical bugs will be fixed. -} - -\section{Archived lifecycle}{ - -\if{html}{\figure{lifecycle_archived.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{archived}. The development of an archived function has ended, and it is no longer available in future package versions. -} - -\section{Dormant lifecycle}{ - -\if{html}{\figure{lifecycle_dormant.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{dormant}. A dormant function is currently not under active development and has not reached a stable phase. We might return to it in the future. As with experimental functions, you are best off waiting until a function is more mature before you use it in production code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed. } \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } diff --git a/man/like.Rd b/man/like.Rd index 7427cf17..ffdd8f4b 100755 --- a/man/like.Rd +++ b/man/like.Rd @@ -42,9 +42,9 @@ Using RStudio? This function can also be inserted from the Addins menu and can h \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/mdro.Rd b/man/mdro.Rd index 9c5d2d67..7852247d 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -95,7 +95,7 @@ Please suggest your own (country-specific) guidelines by letting us know: \url{h \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Antibiotics}{ diff --git a/man/mo_source.Rd b/man/mo_source.Rd index 5046f98c..dd7b59d8 100644 --- a/man/mo_source.Rd +++ b/man/mo_source.Rd @@ -78,9 +78,9 @@ To remove the reference data file completely, just use \code{""} or \code{NULL} \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/man/p_symbol.Rd b/man/p_symbol.Rd index ba589686..154de773 100644 --- a/man/p_symbol.Rd +++ b/man/p_symbol.Rd @@ -20,7 +20,7 @@ Return the symbol related to the p-value: 0 '\verb{***}' 0.001 '\verb{**}' 0.01 \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } \section{Read more on our website!}{ diff --git a/man/pca.Rd b/man/pca.Rd index e0f926d9..55497eb5 100644 --- a/man/pca.Rd +++ b/man/pca.Rd @@ -62,7 +62,7 @@ The result of the \code{\link[=pca]{pca()}} function is a \link{prcomp} object, \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \examples{ diff --git a/man/proportion.Rd b/man/proportion.Rd index 0d6e884a..a61ffcb0 100644 --- a/man/proportion.Rd +++ b/man/proportion.Rd @@ -121,9 +121,9 @@ Using \code{only_all_tested} has no impact when only using one antibiotic as inp \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Interpretation of R and S/I}{ diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd index fcb0268a..0b57263d 100644 --- a/man/resistance_predict.Rd +++ b/man/resistance_predict.Rd @@ -103,7 +103,7 @@ Valid options for the statistical model (parameter \code{model}) are: \section{Maturing lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. This function needs wider usage and more extensive testing in order to optimise the unlying code. } \section{Interpretation of R and S/I}{ diff --git a/man/skewness.Rd b/man/skewness.Rd index 0f0927b6..ffa8b2e9 100644 --- a/man/skewness.Rd +++ b/man/skewness.Rd @@ -28,7 +28,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr \section{Questioning lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. We are no longer convinced that this function is the optimal approach (but we do not know yet what a better approach would be), or whether this function should be in our \code{AMR} package at all. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } \section{Read more on our website!}{ diff --git a/man/translate.Rd b/man/translate.Rd index d8199d5a..f1016e85 100644 --- a/man/translate.Rd +++ b/man/translate.Rd @@ -24,9 +24,9 @@ The system language will be used at default, if that language is supported. The \section{Stable lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} -The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments. +The \link[AMR:lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. -If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } \section{Read more on our website!}{ diff --git a/tests/testthat/test-ab_property.R b/tests/testthat/test-ab_property.R index d0487800..f02778ad 100644 --- a/tests/testthat/test-ab_property.R +++ b/tests/testthat/test-ab_property.R @@ -58,4 +58,7 @@ test_that("ab_property works", { expect_equal(ab_name("21066-6", language = NULL), "Ampicillin") expect_equal(ab_loinc("ampicillin"), c("21066-6", "3355-5", "33562-0", "33919-2", "43883-8", "43884-6", "87604-5")) + + expect_true(ab_url("AMX") %like% "whocc.no") + expect_warning(ab_url("ASP")) })