From c2b89d541eb8da219bbeb4e007b6f301a03a9f4b Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Sun, 2 Oct 2022 15:31:16 +0200 Subject: [PATCH] update beta version to 1.8.2.*, add JSS paper --- .github/workflows/check-pr.yaml | 10 +- .github/workflows/check.yaml | 10 +- .github/workflows/codecovr.yaml | 10 +- .github/workflows/lintr.yaml | 10 +- .github/workflows/website.yaml | 10 +- CRAN-SUBMISSION | 6 +- DESCRIPTION | 7 +- NAMESPACE | 3 + NEWS.md | 13 +- R/aa_globals.R | 10 +- R/aa_helper_functions.R | 10 +- R/aa_helper_pm_functions.R | 10 +- R/ab.R | 10 +- R/ab_from_text.R | 10 +- R/ab_property.R | 10 +- R/ab_selectors.R | 10 +- R/age.R | 10 +- R/amr.R | 43 ++++--- R/atc_online.R | 10 +- R/availability.R | 10 +- R/bug_drug_combinations.R | 10 +- R/count.R | 10 +- R/custom_eucast_rules.R | 10 +- R/data.R | 10 +- R/deprecated.R | 10 +- R/disk.R | 10 +- R/episode.R | 10 +- R/eucast_rules.R | 10 +- R/first_isolate.R | 10 +- R/g.test.R | 10 +- R/ggplot_pca.R | 10 +- R/ggplot_rsi.R | 10 +- R/guess_ab_col.R | 10 +- R/italicise_taxonomy.R | 10 +- R/join_microorganisms.R | 10 +- R/key_antimicrobials.R | 10 +- R/kurtosis.R | 10 +- R/like.R | 10 +- R/mdro.R | 10 +- R/mean_amr_distance.R | 10 +- R/mic.R | 10 +- R/mo.R | 118 ++++++++++++------ R/mo_matching_score.R | 10 +- R/mo_property.R | 10 +- R/mo_source.R | 10 +- R/pca.R | 10 +- R/plot.R | 10 +- R/proportion.R | 10 +- R/random.R | 10 +- R/resistance_predict.R | 10 +- R/rsi.R | 10 +- R/rsi_calc.R | 10 +- R/rsi_df.R | 10 +- R/skewness.R | 10 +- R/translate.R | 16 ++- R/vctrs.R | 10 +- R/whocc.R | 10 +- R/zzz.R | 26 ++-- README.md | 2 + _pkgdown.yml | 10 +- codecov.yml | 10 +- data-raw/_install_deps.R | 10 +- data-raw/_language_update.R | 10 +- data-raw/_pre_commit_hook.R | 10 +- data-raw/loinc.R | 10 +- data-raw/poorman_prepend.R | 10 +- data-raw/read_EUCAST.R | 10 +- data-raw/reproduction_of_antibiotics.R | 10 +- data-raw/reproduction_of_antivirals.R | 10 +- data-raw/reproduction_of_dosage.R | 10 +- ...reproduction_of_example_isolates_unclean.R | 10 +- .../reproduction_of_intrinsic_resistant.R | 10 +- data-raw/reproduction_of_microorganisms.R | 10 +- data-raw/reproduction_of_rsi_translation.R | 10 +- index.md | 6 +- inst/CITATION | 57 ++++----- inst/tinytest/test-_deprecated.R | 10 +- inst/tinytest/test-_misc.R | 10 +- inst/tinytest/test-ab.R | 10 +- inst/tinytest/test-ab_from_text.R | 10 +- inst/tinytest/test-ab_property.R | 10 +- inst/tinytest/test-ab_selectors.R | 10 +- inst/tinytest/test-age.R | 10 +- inst/tinytest/test-atc_online.R | 10 +- inst/tinytest/test-availability.R | 10 +- inst/tinytest/test-bug_drug_combinations.R | 10 +- inst/tinytest/test-count.R | 10 +- inst/tinytest/test-data.R | 10 +- inst/tinytest/test-disk.R | 8 +- inst/tinytest/test-episode.R | 10 +- inst/tinytest/test-eucast_rules.R | 10 +- inst/tinytest/test-first_isolate.R | 10 +- inst/tinytest/test-g.test.R | 10 +- inst/tinytest/test-get_locale.R | 10 +- inst/tinytest/test-ggplot_rsi.R | 10 +- inst/tinytest/test-guess_ab_col.R | 10 +- inst/tinytest/test-italicise_taxonomy.R | 10 +- inst/tinytest/test-join_microorganisms.R | 10 +- inst/tinytest/test-key_antimicrobials.R | 10 +- inst/tinytest/test-kurtosis.R | 10 +- inst/tinytest/test-like.R | 10 +- inst/tinytest/test-mdro.R | 10 +- inst/tinytest/test-mean_amr_distance.R | 10 +- inst/tinytest/test-mic.R | 10 +- inst/tinytest/test-mo.R | 10 +- inst/tinytest/test-mo_property.R | 10 +- inst/tinytest/test-pca.R | 10 +- inst/tinytest/test-proportion.R | 10 +- inst/tinytest/test-random.R | 10 +- inst/tinytest/test-resistance_predict.R | 10 +- inst/tinytest/test-rsi.R | 10 +- inst/tinytest/test-skewness.R | 10 +- inst/tinytest/test-zzz.R | 10 +- man/AMR.Rd | 81 +++++++++--- man/as.mo.Rd | 13 +- man/translate.Rd | 6 +- pkgdown/extra.css | 10 +- pkgdown/extra.js | 10 +- tests/tinytest.R | 10 +- vignettes/welcome_to_AMR.Rmd | 4 +- 120 files changed, 985 insertions(+), 464 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index c4a0dfde0..a40d4b2a2 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 989df7944..4cb95c42a 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/.github/workflows/codecovr.yaml b/.github/workflows/codecovr.yaml index b0bafc5a8..2fd237a06 100644 --- a/.github/workflows/codecovr.yaml +++ b/.github/workflows/codecovr.yaml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/.github/workflows/lintr.yaml b/.github/workflows/lintr.yaml index 0bb461aea..aa3a71827 100644 --- a/.github/workflows/lintr.yaml +++ b/.github/workflows/lintr.yaml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index d87aaa8ad..52c0d2045 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 6fb45c18f..4d3469d4e 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 1.8.1 -Date: 2022-03-16 18:22:51 UTC -SHA: 7b0f1596bd65fbb72681a7e3a6a7e4e469a891e8 +Version: 1.8.2 +Date: 2022-09-27 12:18:42 UTC +SHA: ccb09706e4f168ab6133de3d2294bcaeed0d3fc8 diff --git a/DESCRIPTION b/DESCRIPTION index 7f614924a..56e432e8b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,10 @@ Package: AMR -Version: 1.8.1.9070 -Date: 2022-09-27 +Version: 1.8.2.9022 +Date: 2022-10-02 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by - using evidence-based methods and reliable reference data such as LPSN - . + using evidence-based methods, as described in . Authors@R: c( person(family = "Berends", c("Matthijs", "S."), role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7620-1800"), email = "m.berends@certe.nl"), person(family = "Luz", c("Christian", "F."), role = c("aut", "ctb"), comment = c(ORCID = "0000-0001-5809-5995")), diff --git a/NAMESPACE b/NAMESPACE index 7a3534000..c652e0aef 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -119,6 +119,7 @@ S3method(print,custom_mdro_guideline) S3method(print,disk) S3method(print,mic) S3method(print,mo) +S3method(print,mo_renamed) S3method(print,mo_uncertainties) S3method(print,pca) S3method(print,rsi) @@ -266,6 +267,7 @@ export(mean_amr_distance) export(mo_authors) export(mo_class) export(mo_domain) +export(mo_failures) export(mo_family) export(mo_fullname) export(mo_gbif) @@ -285,6 +287,7 @@ export(mo_phylum) export(mo_property) export(mo_rank) export(mo_ref) +export(mo_renamed) export(mo_reset_session) export(mo_shortname) export(mo_snomed) diff --git a/NEWS.md b/NEWS.md index 557c9a9ef..d4f81ddd3 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.8.1.9070 +# AMR 1.8.2.9022 This version will eventually become v2.0! We're happy to reach a new major milestone soon! @@ -12,7 +12,7 @@ This version will eventually become v2.0! We're happy to reach a new major miles ### New * EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations. -* All new algorithm for `as.mo()` (and thus internally all `mo_*()` functions) while still following our original set-up as described in our paper. +* All new algorithm for `as.mo()` (and thus internally all `mo_*()` functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03). * A new argument `keep_synonyms` allows to *not* correct for updated taxonomy * It has increased tremendously in speed and returns generally more consequent results * Sequential coercion is now extremely fast as results are stored to the package environment, although coercion of unknown values must be run once per session. Previous results can be reset/removed with the new `mo_reset_session()` function. @@ -42,13 +42,20 @@ This version will eventually become v2.0! We're happy to reach a new major miles * `mo_snomed()` now returns class `character`, not `numeric` anymore (to make long SNOMED codes readable) ### Other -* New website to make use of the new Bootstrap 5 and pkgdown v2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions +* New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions * Added Peter Dutey-Magni, Dmytro Mykhailenko and Anton Mymrikov as contributors, to thank them for their valuable input * All R and Rmd files in this project are now styled using the `styler` package * Set scalar conditional expressions (`&&` and `||`) where possible to comply with the upcoming R 4.3 * An enormous lot of code cleaning, fixing some small bugs on the way +# AMR 1.8.2 + +This is a small intermediate update to include the reference to our publication in the Journal of Statistical Software, DOI 10.18637/jss.v104.i03. + +A major update will be released by the end of 2022 or early 2023 to include the most recent EUCAST and CLSI guidelines, updated microbial taxonomy, and support for 16 languages. + + # AMR 1.8.1 ### Changed diff --git a/R/aa_globals.R b/R/aa_globals.R index 26bd4339c..b857bfbaf 100755 --- a/R/aa_globals.R +++ b/R/aa_globals.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index e3ea45011..1f7c91742 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/aa_helper_pm_functions.R b/R/aa_helper_pm_functions.R index 53e033de0..32d182c16 100644 --- a/R/aa_helper_pm_functions.R +++ b/R/aa_helper_pm_functions.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ab.R b/R/ab.R index 1c03e24db..949e58ea6 100755 --- a/R/ab.R +++ b/R/ab.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ab_from_text.R b/R/ab_from_text.R index 6c8ff85c8..35a48cc0c 100644 --- a/R/ab_from_text.R +++ b/R/ab_from_text.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ab_property.R b/R/ab_property.R index 9cf9ea9c9..f00db75a2 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ab_selectors.R b/R/ab_selectors.R index 832120d64..ea639b23b 100644 --- a/R/ab_selectors.R +++ b/R/ab_selectors.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/age.R b/R/age.R index e1512ae59..bb1bd0c9b 100755 --- a/R/age.R +++ b/R/age.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/amr.R b/R/amr.R index 79a46d990..f7b91ce90 100644 --- a/R/amr.R +++ b/R/amr.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # @@ -25,9 +29,12 @@ #' The `AMR` Package #' +#' @description #' Welcome to the `AMR` package. -#' @details +#' #' `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. +#' +#' This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}). #' #' After installing this package, \R knows `r format_included_data_number(microorganisms)` distinct microbial species and all `r format_included_data_number(rbind(antibiotics[, "atc", drop = FALSE], antivirals[, "atc", drop = FALSE]))` antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. #' @@ -53,21 +60,17 @@ #' #' @section Reference Data Publicly Available: #' All data sets in this `AMR` package (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit [our website for the download links](https://msberends.github.io/AMR/articles/datasets.html). The actual files are of course available on [our GitHub repository](https://github.com/msberends/AMR/tree/main/data-raw). -#' @section Contact Us: -#' For suggestions, comments or questions, please contact us via: -#' -#' Dr. Matthijs S. Berends \cr -#' m.s.berends \[at\] umcg \[dot\] nl \cr -#' University of Groningen -#' Department of Medical Microbiology and Infection Prevention \cr -#' University Medical Center Groningen \cr -#' Post Office Box 30001 \cr -#' 9700 RB Groningen \cr -#' The Netherlands -#' -#' -#' If you have found a bug, please file a new issue at: \cr -#' +#' @source +#' To cite AMR in publications use: +#' +#' Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2022). "AMR: An R Package for Working with Antimicrobial Resistance Data." _Journal of Statistical Software_, *104*(3), 1-31. \doi{10.18637/jss.v104.i03}. +#' +#' A BibTeX entry for LaTeX users is: +#' +#' \preformatted{ +#' `r format(citation("AMR"), style = "bib")` +#' } #' @name AMR +#' @keywords internal #' @rdname AMR -NULL +"_PACKAGE" diff --git a/R/atc_online.R b/R/atc_online.R index c9347cb06..84da04156 100644 --- a/R/atc_online.R +++ b/R/atc_online.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/availability.R b/R/availability.R index aeb7701ae..e51b99507 100644 --- a/R/availability.R +++ b/R/availability.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/bug_drug_combinations.R b/R/bug_drug_combinations.R index b61a8eab4..87f08b8d8 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/count.R b/R/count.R index 715a18295..02dbd71d9 100755 --- a/R/count.R +++ b/R/count.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/custom_eucast_rules.R b/R/custom_eucast_rules.R index 5c4bbc872..3421a5bcb 100644 --- a/R/custom_eucast_rules.R +++ b/R/custom_eucast_rules.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/data.R b/R/data.R index 0d37b486c..8f6b546c0 100755 --- a/R/data.R +++ b/R/data.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/deprecated.R b/R/deprecated.R index ef4f2b0ab..bf83a8535 100755 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/disk.R b/R/disk.R index eaafd0b4c..004d76c99 100644 --- a/R/disk.R +++ b/R/disk.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/episode.R b/R/episode.R index 9dddeb162..6ed02cfdb 100644 --- a/R/episode.R +++ b/R/episode.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 00c516a37..e59e20c5c 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/first_isolate.R b/R/first_isolate.R index 78d2d93f3..41e38b3d2 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/g.test.R b/R/g.test.R index 2cd21f2e7..dbbf748d1 100755 --- a/R/g.test.R +++ b/R/g.test.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ggplot_pca.R b/R/ggplot_pca.R index 679b89124..ddfb20c7a 100755 --- a/R/ggplot_pca.R +++ b/R/ggplot_pca.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/ggplot_rsi.R b/R/ggplot_rsi.R index f25eeaa10..cd1bdb754 100755 --- a/R/ggplot_rsi.R +++ b/R/ggplot_rsi.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/guess_ab_col.R b/R/guess_ab_col.R index e7bf6a5f6..21074a6f8 100755 --- a/R/guess_ab_col.R +++ b/R/guess_ab_col.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/italicise_taxonomy.R b/R/italicise_taxonomy.R index 1745ab5e9..ff1077773 100644 --- a/R/italicise_taxonomy.R +++ b/R/italicise_taxonomy.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/join_microorganisms.R b/R/join_microorganisms.R index d57bda94b..fb281dcc8 100755 --- a/R/join_microorganisms.R +++ b/R/join_microorganisms.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/key_antimicrobials.R b/R/key_antimicrobials.R index 10fa33971..d330ddd17 100755 --- a/R/key_antimicrobials.R +++ b/R/key_antimicrobials.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/kurtosis.R b/R/kurtosis.R index 41cd7763b..ea9442349 100755 --- a/R/kurtosis.R +++ b/R/kurtosis.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/like.R b/R/like.R index c6332c822..933812f06 100755 --- a/R/like.R +++ b/R/like.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mdro.R b/R/mdro.R index fd4052161..96e630b92 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mean_amr_distance.R b/R/mean_amr_distance.R index f8a7c592d..e2395eb09 100644 --- a/R/mean_amr_distance.R +++ b/R/mean_amr_distance.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mic.R b/R/mic.R index d5e4d81e0..806f18212 100755 --- a/R/mic.R +++ b/R/mic.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mo.R b/R/mo.R index 320b19014..02034217e 100755 --- a/R/mo.R +++ b/R/mo.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # @@ -92,7 +96,10 @@ #' - `"S. aureus - please mind: MRSA"`. The last word will be stripped, after which the function will try to find a match. If it does not, the second last word will be stripped, etc. Again, a warning will be thrown that the result *Staphylococcus aureus* (`B_STPHY_AURS`) needs review. #' - `"Fluoroquinolone-resistant Neisseria gonorrhoeae"`. The first word will be stripped, after which the function will try to find a match. A warning will be thrown that the result *Neisseria gonorrhoeae* (`B_NESSR_GNRR`) needs review. #' -#' Use [mo_uncertainties()] to get a [data.frame] that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see *Matching Score for Microorganisms* below). +#' There are three helper functions that can be run after using the [as.mo()] function: +#' - Use [mo_uncertainties()] to get a [data.frame] that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see *Matching Score for Microorganisms* below). +#' - Use [mo_failures()] to get a [character] [vector] with all values that could not be coerced to a valid value. +#' - Use [mo_renamed()] to get a [data.frame] with all values that could be coerced based on old, previously accepted taxonomic names. #' #' ### Microbial Prevalence of Pathogens in Humans #' @@ -369,7 +376,12 @@ as.mo <- function(x, # Keep or replace synonyms ---- gbif_matches <- AMR::microorganisms$gbif_renamed_to[match(out, AMR::microorganisms$mo)] + gbif_matches[!gbif_matches %in% AMR::microorganisms$gbif] <- NA lpsn_matches <- AMR::microorganisms$lpsn_renamed_to[match(out, AMR::microorganisms$mo)] + lpsn_matches[!lpsn_matches %in% AMR::microorganisms$lpsn] <- NA + pkg_env$mo_renamed <- list(old = out[!is.na(gbif_matches) | !is.na(lpsn_matches)], + gbif_matches = gbif_matches[!is.na(gbif_matches) | !is.na(lpsn_matches)], + lpsn_matches = lpsn_matches[!is.na(gbif_matches) | !is.na(lpsn_matches)]) if (isFALSE(keep_synonyms)) { out_old <- out @@ -379,33 +391,26 @@ as.mo <- function(x, lpsn_matches[!lpsn_matches %in% AMR::microorganisms$lpsn] <- NA out[which(!is.na(lpsn_matches))] <- AMR::microorganisms$mo[match(lpsn_matches[which(!is.na(lpsn_matches))], AMR::microorganisms$lpsn)] - if (isTRUE(info) && (any(!is.na(gbif_matches)) || any(!is.na(lpsn_matches))) && message_not_thrown_before("as.mo", gbif_matches[which(!is.na(gbif_matches))], lpsn_matches[which(!is.na(lpsn_matches))]) && length(c(lpsn_matches, gbif_matches)) > 0) { - total_old <- out_old[which(!is.na(gbif_matches) | !is.na(lpsn_matches))] - total_new <- out[which(!is.na(gbif_matches) | !is.na(lpsn_matches))] - - total_new <- total_new[!duplicated(total_old)] - total_old <- total_old[!duplicated(total_old)] - - total_new <- total_new[order(total_old)] - total_old <- total_old[order(total_old)] - - refs_old <- microorganisms$ref[match(total_old, microorganisms$mo)] - refs_old[!is.na(refs_old)] <- paste0(" (", refs_old[!is.na(refs_old)], ")") - refs_old[is.na(refs_old)] <- "" - refs_new <- microorganisms$ref[match(total_new, microorganisms$mo)] - refs_new[!is.na(refs_new)] <- paste0(" (", refs_new[!is.na(refs_new)], ")") - refs_new[is.na(refs_new)] <- "" - - message_( - "The following microorganism", ifelse(length(total_old) > 1, "s were", " was"), " taxonomically renamed (use `keep_synonyms = TRUE` to leave uncorrected):\n", - paste0(" ", font_italic(microorganisms$fullname[match(total_old, microorganisms$mo)], collapse = NULL), - refs_old, - " -> ", font_italic(microorganisms$fullname[match(total_new, microorganisms$mo)], collapse = NULL), - refs_new, - collapse = "\n" - ) - ) - } + # if (isTRUE(info) && (any(!is.na(gbif_matches)) || any(!is.na(lpsn_matches))) && message_not_thrown_before("as.mo", gbif_matches[which(!is.na(gbif_matches))], lpsn_matches[which(!is.na(lpsn_matches))]) && length(c(lpsn_matches, gbif_matches)) > 0) { + # mo_old <- out_old[which(!is.na(gbif_matches) | !is.na(lpsn_matches))] + # mo_new <- out[which(!is.na(gbif_matches) | !is.na(lpsn_matches))] + # + # mo_new <- mo_new[!duplicated(mo_old)] + # mo_old <- mo_old[!duplicated(mo_old)] + # + # mo_new <- mo_new[order(mo_old)] + # mo_old <- mo_old[order(mo_old)] + # + # ref_old <- microorganisms$ref[match(mo_old, microorganisms$mo)] + # ref_old[!is.na(ref_old)] <- paste0(" (", ref_old[!is.na(ref_old)], ")") + # ref_old[is.na(ref_old)] <- "" + # ref_new <- microorganisms$ref[match(mo_new, microorganisms$mo)] + # ref_new[!is.na(ref_new)] <- paste0(" (", ref_new[!is.na(ref_new)], ")") + # ref_new[is.na(ref_new)] <- "" + # + # pkg_env$mo_renamed <- list(mo_old = mo_old, mo_new = mo_new) + # print(mo_renamed(), extra_txt = " (use `keep_synonyms = TRUE` to leave uncorrected)") + # } } else if (is.null(getOption("AMR_keep_synonyms")) && any(!is.na(c(gbif_matches, lpsn_matches))) && message_not_thrown_before("as.mo", "keep_synonyms_warning", entire_session = TRUE)) { # keep synonyms is TRUE, so check if any do have synonyms warning_("Function `as.mo()` returned some old taxonomic names. Use `as.mo(..., keep_synonyms = FALSE)` to clean the input to currently accepted taxonomic names, or set the R option `AMR_keep_synonyms` to `FALSE`. This warning will be shown once per session.") @@ -708,17 +713,16 @@ rep.mo <- function(x, ...) { y } +#' @rdname as.mo +#' @export +mo_failures <- function() { + pkg_env$mo_failures +} + #' @rdname as.mo #' @export mo_uncertainties <- function() { - if (is.null(pkg_env$mo_uncertainties)) { - return(NULL) - } - set_clean_class(as.data.frame(pkg_env$mo_uncertainties, - stringsAsFactors = FALSE - ), - new_class = c("mo_uncertainties", "data.frame") - ) + set_clean_class(pkg_env$mo_uncertainties, new_class = c("mo_uncertainties", "data.frame")) } #' @method print mo_uncertainties @@ -726,8 +730,10 @@ mo_uncertainties <- function() { #' @noRd print.mo_uncertainties <- function(x, ...) { if (NROW(x) == 0) { - return(NULL) + cat(word_wrap("No uncertainties to show. Only uncertainties of the last call of `as.mo()` or any `mo_*()` function are stored.", add_fn = font_blue)) + return(invisible(NULL)) } + cat(word_wrap("Matching scores are based on pathogenicity in humans and the resemblance between the input and the full taxonomic name. See `?mo_matching_score`.\n\n", add_fn = font_blue)) if (has_colour()) { cat(word_wrap("Colour keys: ", @@ -809,6 +815,38 @@ print.mo_uncertainties <- function(x, ...) { cat(txt) } + +#' @rdname as.mo +#' @export +mo_renamed <- function() { + set_clean_class(pkg_env$mo_renamed, new_class = c("mo_renamed", "list")) +} + +#' @method print mo_renamed +#' @export +#' @noRd +print.mo_renamed <- function(x, extra_txt = "", ...) { + if (length(x) == 0) { + cat(word_wrap("No renamed taxonomy to show. Only renamed taxonomy of the last call of `as.mo()` or any `mo_*()` function are stored.", add_fn = font_blue)) + return(invisible(NULL)) + } + + ref_old <- AMR::microorganisms$ref[match(x$mo_old, AMR::microorganisms$mo)] + ref_new <- AMR::microorganisms$ref[match(x$mo_new, AMR::microorganisms$mo)] + ref_old[!is.na(ref_old)] <- paste0(" (", gsub("et al.", font_italic("et al.", collapse = NULL), ref_old[!is.na(ref_old)], fixed = TRUE), ")") + ref_new[!is.na(ref_new)] <- paste0(" (", gsub("et al.", font_italic("et al.", collapse = NULL), ref_new[!is.na(ref_new)], fixed = TRUE), ")") + + message_( + "The following microorganism", ifelse(length(x$mo_old) > 1, "s were", " was"), " taxonomically renamed", extra_txt, ":\n", + paste0(" \u2022 ", font_italic(AMR::microorganisms$fullname[match(x$mo_old, AMR::microorganisms$mo)], collapse = NULL), + ref_old, + " -> ", font_italic(AMR::microorganisms$fullname[match(x$mo_new, AMR::microorganisms$mo)], collapse = NULL), + ref_new, + collapse = "\n" + ) + ) +} + #' @rdname as.mo #' @export mo_reset_session <- function() { diff --git a/R/mo_matching_score.R b/R/mo_matching_score.R index c5655241b..63e0a5fe9 100755 --- a/R/mo_matching_score.R +++ b/R/mo_matching_score.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mo_property.R b/R/mo_property.R index 4bc0e7bd4..bf4470099 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/mo_source.R b/R/mo_source.R index 456bf5e24..1b223ee13 100644 --- a/R/mo_source.R +++ b/R/mo_source.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/pca.R b/R/pca.R index a7ecc88b9..d19869939 100755 --- a/R/pca.R +++ b/R/pca.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/plot.R b/R/plot.R index a198f5735..4c68d7caf 100644 --- a/R/plot.R +++ b/R/plot.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/proportion.R b/R/proportion.R index ff2050973..4e993d576 100755 --- a/R/proportion.R +++ b/R/proportion.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/random.R b/R/random.R index b52230ba6..32df979aa 100644 --- a/R/random.R +++ b/R/random.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/resistance_predict.R b/R/resistance_predict.R index 07a126e73..964cfd31e 100755 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/rsi.R b/R/rsi.R index aa76f8cc9..bb60ea9a0 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/rsi_calc.R b/R/rsi_calc.R index 3cfae64a9..b9a98279b 100755 --- a/R/rsi_calc.R +++ b/R/rsi_calc.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/rsi_df.R b/R/rsi_df.R index d7b6164ee..6da09b7ad 100644 --- a/R/rsi_df.R +++ b/R/rsi_df.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/skewness.R b/R/skewness.R index 682423111..a40a2122e 100755 --- a/R/skewness.R +++ b/R/skewness.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/translate.R b/R/translate.R index ed580f2aa..71db39530 100755 --- a/R/translate.R +++ b/R/translate.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # @@ -27,10 +31,10 @@ #' #' For language-dependent output of AMR functions, like [mo_name()], [mo_gramstain()], [mo_type()] and [ab_name()]. #' @param x text to translate -#' @param language language to choose. Use one of these supported language names or ISO-639-1 codes: `r paste0('"', sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), '" ("' , LANGUAGES_SUPPORTED, '")', collapse = ", ")`. -#' @details The currently `r length(LANGUAGES_SUPPORTED)` supported languages are `r vector_and(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), quotes = FALSE, sort = FALSE)`. All these languages have translations available for all antimicrobial agents and colloquial microorganism names. +#' @param language language to choose. Use one of these supported language names or ISO-639-1 codes: `r vector_or(paste0(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), " (" , LANGUAGES_SUPPORTED, ")"), quotes = FALSE, sort = FALSE)`. +#' @details The currently `r length(LANGUAGES_SUPPORTED)` supported languages are `r vector_or(paste0(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), " (" , LANGUAGES_SUPPORTED, ")"), quotes = FALSE, sort = FALSE)`. All these languages have translations available for all antimicrobial agents and colloquial microorganism names. #' -#' **To silence language notes when this package loads** on a non-English operating system, please set the option `AMR_locale` in your `.Rprofile` file like this: +#' **To silence language notes when this package loads** on a non-English operating system, you can set the option `AMR_locale` in your `.Rprofile` file like this: #' #' ```r #' # Open .Rprofile file diff --git a/R/vctrs.R b/R/vctrs.R index 4e4e5aef2..dcaf1108a 100644 --- a/R/vctrs.R +++ b/R/vctrs.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/whocc.R b/R/whocc.R index ca3a5f68b..cf6c1b133 100755 --- a/R/whocc.R +++ b/R/whocc.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/R/zzz.R b/R/zzz.R index ef4fd1d39..78ea664d7 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # @@ -34,6 +38,7 @@ pkg_env$mo_uncertainties <- data.frame( candidates = character(0), stringsAsFactors = FALSE ) +pkg_env$mo_renamed <- list() pkg_env$mo_previously_coerced <- data.frame( x = character(0), mo = character(0), @@ -121,17 +126,12 @@ if (utf8_supported && !is_latex) { s3_register("vctrs::vec_cast", "character.mic") s3_register("vctrs::vec_cast", "double.mic") s3_register("vctrs::vec_math", "mic") - + # if mo source exists, fire it up (see mo_source()) - try( - { - if (file.exists(getOption("AMR_mo_source", "~/mo_source.rds"))) { - invisible(get_mo_source()) - } - }, - silent = TRUE - ) - + if (tryCatch(file.exists(getOption("AMR_mo_source", "~/mo_source.rds")), error = function(e) FALSE)) { + invisible(get_mo_source()) + } + # be sure to print tibbles as tibbles if (pkg_is_available("tibble", also_load = FALSE)) { loadNamespace("tibble") diff --git a/README.md b/README.md index ba67fbfed..f5133ba5a 100755 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ +This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). + `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. It is currently being used in over 175 countries. After installing this package, R knows ~49,000 distinct microbial species and all ~570 antibiotic, antimycotic, and antiviral drugs by name and code (including ATC, WHONET/EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. Antimicrobial names and group names are available in Danish, Dutch, English, French, German, Italian, Portuguese and Spanish. diff --git a/_pkgdown.yml b/_pkgdown.yml index e6dc548d2..5120403cf 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/codecov.yml b/codecov.yml index 44070ee8a..8c34898f2 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/_install_deps.R b/data-raw/_install_deps.R index d0529fd95..d945312bf 100644 --- a/data-raw/_install_deps.R +++ b/data-raw/_install_deps.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/_language_update.R b/data-raw/_language_update.R index 0547a0f77..ca5df9eac 100644 --- a/data-raw/_language_update.R +++ b/data-raw/_language_update.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/_pre_commit_hook.R b/data-raw/_pre_commit_hook.R index 9c0d6056b..1b16d30ad 100644 --- a/data-raw/_pre_commit_hook.R +++ b/data-raw/_pre_commit_hook.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/loinc.R b/data-raw/loinc.R index a700ac410..97784e22a 100644 --- a/data-raw/loinc.R +++ b/data-raw/loinc.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/poorman_prepend.R b/data-raw/poorman_prepend.R index cc78347eb..74fc453cd 100644 --- a/data-raw/poorman_prepend.R +++ b/data-raw/poorman_prepend.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/read_EUCAST.R b/data-raw/read_EUCAST.R index 6fbcc605e..222631db6 100644 --- a/data-raw/read_EUCAST.R +++ b/data-raw/read_EUCAST.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_antibiotics.R b/data-raw/reproduction_of_antibiotics.R index c9c914b29..8da235cf6 100644 --- a/data-raw/reproduction_of_antibiotics.R +++ b/data-raw/reproduction_of_antibiotics.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_antivirals.R b/data-raw/reproduction_of_antivirals.R index 96303a095..ff6bfc572 100644 --- a/data-raw/reproduction_of_antivirals.R +++ b/data-raw/reproduction_of_antivirals.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_dosage.R b/data-raw/reproduction_of_dosage.R index 0073e6a2a..28e5854fb 100644 --- a/data-raw/reproduction_of_dosage.R +++ b/data-raw/reproduction_of_dosage.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_example_isolates_unclean.R b/data-raw/reproduction_of_example_isolates_unclean.R index 762141930..98bd83142 100644 --- a/data-raw/reproduction_of_example_isolates_unclean.R +++ b/data-raw/reproduction_of_example_isolates_unclean.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_intrinsic_resistant.R b/data-raw/reproduction_of_intrinsic_resistant.R index f97c7ac27..20fdeca4d 100644 --- a/data-raw/reproduction_of_intrinsic_resistant.R +++ b/data-raw/reproduction_of_intrinsic_resistant.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_microorganisms.R b/data-raw/reproduction_of_microorganisms.R index a083632a9..f3e4e92d7 100644 --- a/data-raw/reproduction_of_microorganisms.R +++ b/data-raw/reproduction_of_microorganisms.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/data-raw/reproduction_of_rsi_translation.R b/data-raw/reproduction_of_rsi_translation.R index 68f32e8bc..e8a38cc36 100644 --- a/data-raw/reproduction_of_rsi_translation.R +++ b/data-raw/reproduction_of_rsi_translation.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/index.md b/index.md index 3cb63a6a2..45fef0054 100644 --- a/index.md +++ b/index.md @@ -2,9 +2,11 @@ ### Introduction -The `AMR` package is a [free and open-source](#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) 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 AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. The rationale behind this package was scientifically described in the Journal of Statistical Software (Volume xx, Issue xx; [DOI 10.18637/jss.v000.i00](https://doi.org/10.18637/jss.v000.i00) *- waiting for copy-editing to finish*). +The `AMR` package is a [free and open-source](#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) 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 AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. -After installing this package, R knows [**~49,000 distinct microbial species**](./reference/microorganisms.html) and all [**~570 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, WHONET/EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). This R package formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)) but is [actively and durably maintained](./news) by two public healthcare organisations in the Netherlands. +This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). + +After installing this package, R knows [**~49,000 distinct microbial species**](./reference/microorganisms.html) and all [**~570 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, WHONET/EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl), and is being [actively and durably maintained](./news) by two public healthcare organisations in the Netherlands. ##### Used in 175 countries, translated to 16 languages diff --git a/inst/CITATION b/inst/CITATION index 8774e0470..647d78388 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,38 +1,23 @@ -citHeader("To cite our AMR package in publications, please use below preprint. This preprint was accepted for publication in the Journal of Statistical Software, but we are awaiting the actual publication. Many thanks for using our open-source method to work with microbial and antimicrobial data!") - -citEntry( - entry = "Article", - title = "AMR - An R Package for Working with Antimicrobial Resistance Data", - author = "M S Berends and C F Luz and A W Friedrich and B N M Sinha and C J Albers and C Glasner", - doi = "10.1101/810622", +bibentry(bibtype = "Article", + title = "{AMR}: An {R} Package for Working with Antimicrobial Resistance Data", + author = c(person(given = c("Matthijs", "S."), + family = "Berends", + email = "m.berends@certe.nl"), + person(given = c("Christian", "F."), + family = "Luz"), + person(given = c("Alexander", "W."), + family = "Friedrich"), + person(given = c("Bhanu", "N.", "M."), + family = "Sinha"), + person(given = c("Casper", "J."), + family = "Albers"), + person(given = "Corinna", + family = "Glasner")), journal = "Journal of Statistical Software", - pages = "Accepted for publication", - year = 2021, - url = "https://www.biorxiv.org/content/10.1101/810622", - textVersion = "Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2021). AMR - An R Package for Working with -Antimicrobial Resistance Data. Journal of Statistical Software (accepted for publication), https://www.biorxiv.org/content/10.1101/810622, doi: 10.1101/810622." -) - -citEntry( - entry = "PhdThesis", - title = "A New Instrument for Microbial Epidemiology: Empowering Antimicrobial Resistance Data Analysis", - author = "M S Berends", - publisher = "University of Groningen", - school = "University of Groningen", - doi = "10.33612/diss.177417131", - pages = 287, - year = 2021, - textVersion = "Berends, MS (2021). A New Instrument for Microbial Epidemiology: Empowering Antimicrobial Resistance Data Analysis (PhD thesis). University of Groningen, doi: 10.33612/diss.177417131." -) - -citEntry( - entry = "PhdThesis", - title = "Data Science for Infection Management & Antimicrobial Stewardship", - author = "C F Luz", - publisher = "University of Groningen", - school = "University of Groningen", - doi = "10.33612/diss.192486375", - pages = 326, - year = 2021, - textVersion = "Luz, CF (2021). Data Science for Infection Management & Antimicrobial Stewardship (PhD thesis). University of Groningen, doi: 10.33612/diss.192486375." + year = "2022", + volume = "104", + number = "3", + pages = "1--31", + doi = "10.18637/jss.v104.i03", + header = "To cite AMR in publications use:" ) diff --git a/inst/tinytest/test-_deprecated.R b/inst/tinytest/test-_deprecated.R index 6ae233380..eb5a78757 100644 --- a/inst/tinytest/test-_deprecated.R +++ b/inst/tinytest/test-_deprecated.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-_misc.R b/inst/tinytest/test-_misc.R index 03e1b85e1..80fcbcaf7 100755 --- a/inst/tinytest/test-_misc.R +++ b/inst/tinytest/test-_misc.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-ab.R b/inst/tinytest/test-ab.R index 0a44cc6fc..e755012af 100755 --- a/inst/tinytest/test-ab.R +++ b/inst/tinytest/test-ab.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-ab_from_text.R b/inst/tinytest/test-ab_from_text.R index 5787cb904..446c99339 100644 --- a/inst/tinytest/test-ab_from_text.R +++ b/inst/tinytest/test-ab_from_text.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-ab_property.R b/inst/tinytest/test-ab_property.R index 4ce82eeb2..b6e514a2f 100644 --- a/inst/tinytest/test-ab_property.R +++ b/inst/tinytest/test-ab_property.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-ab_selectors.R b/inst/tinytest/test-ab_selectors.R index c8d48238f..ce36b2090 100644 --- a/inst/tinytest/test-ab_selectors.R +++ b/inst/tinytest/test-ab_selectors.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-age.R b/inst/tinytest/test-age.R index 934ac107d..0020d91ef 100644 --- a/inst/tinytest/test-age.R +++ b/inst/tinytest/test-age.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-atc_online.R b/inst/tinytest/test-atc_online.R index 48e55c4f7..d5bf77473 100644 --- a/inst/tinytest/test-atc_online.R +++ b/inst/tinytest/test-atc_online.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-availability.R b/inst/tinytest/test-availability.R index 3db9ab656..bdf5c356a 100644 --- a/inst/tinytest/test-availability.R +++ b/inst/tinytest/test-availability.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-bug_drug_combinations.R b/inst/tinytest/test-bug_drug_combinations.R index dbafb8817..bd182118f 100644 --- a/inst/tinytest/test-bug_drug_combinations.R +++ b/inst/tinytest/test-bug_drug_combinations.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-count.R b/inst/tinytest/test-count.R index ac64d7730..ae8f035d2 100644 --- a/inst/tinytest/test-count.R +++ b/inst/tinytest/test-count.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-data.R b/inst/tinytest/test-data.R index 2ccc4cd57..dc86a3a42 100644 --- a/inst/tinytest/test-data.R +++ b/inst/tinytest/test-data.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-disk.R b/inst/tinytest/test-disk.R index 70fb6b9ef..47049c89f 100755 --- a/inst/tinytest/test-disk.R +++ b/inst/tinytest/test-disk.R @@ -5,8 +5,12 @@ # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-episode.R b/inst/tinytest/test-episode.R index cd4a63a15..2da879aa0 100644 --- a/inst/tinytest/test-episode.R +++ b/inst/tinytest/test-episode.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-eucast_rules.R b/inst/tinytest/test-eucast_rules.R index a0c4de339..9c55ae58a 100755 --- a/inst/tinytest/test-eucast_rules.R +++ b/inst/tinytest/test-eucast_rules.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-first_isolate.R b/inst/tinytest/test-first_isolate.R index ceb0d86a1..7bcd0f9b3 100755 --- a/inst/tinytest/test-first_isolate.R +++ b/inst/tinytest/test-first_isolate.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-g.test.R b/inst/tinytest/test-g.test.R index adbc5de3b..0d80863ed 100644 --- a/inst/tinytest/test-g.test.R +++ b/inst/tinytest/test-g.test.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-get_locale.R b/inst/tinytest/test-get_locale.R index 6e7afcdf1..8fca84ec6 100644 --- a/inst/tinytest/test-get_locale.R +++ b/inst/tinytest/test-get_locale.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-ggplot_rsi.R b/inst/tinytest/test-ggplot_rsi.R index e54e3f38a..85ab1156e 100644 --- a/inst/tinytest/test-ggplot_rsi.R +++ b/inst/tinytest/test-ggplot_rsi.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-guess_ab_col.R b/inst/tinytest/test-guess_ab_col.R index 9f178a242..b14ca78a9 100644 --- a/inst/tinytest/test-guess_ab_col.R +++ b/inst/tinytest/test-guess_ab_col.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-italicise_taxonomy.R b/inst/tinytest/test-italicise_taxonomy.R index f9b5a8415..a88ef33f6 100644 --- a/inst/tinytest/test-italicise_taxonomy.R +++ b/inst/tinytest/test-italicise_taxonomy.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-join_microorganisms.R b/inst/tinytest/test-join_microorganisms.R index e1e43115f..4937ceca2 100755 --- a/inst/tinytest/test-join_microorganisms.R +++ b/inst/tinytest/test-join_microorganisms.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-key_antimicrobials.R b/inst/tinytest/test-key_antimicrobials.R index 457b042b8..3b5f216b9 100644 --- a/inst/tinytest/test-key_antimicrobials.R +++ b/inst/tinytest/test-key_antimicrobials.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-kurtosis.R b/inst/tinytest/test-kurtosis.R index f66061c03..1019d4890 100644 --- a/inst/tinytest/test-kurtosis.R +++ b/inst/tinytest/test-kurtosis.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-like.R b/inst/tinytest/test-like.R index d07c3dbdc..3deb63f08 100644 --- a/inst/tinytest/test-like.R +++ b/inst/tinytest/test-like.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-mdro.R b/inst/tinytest/test-mdro.R index ead48f021..c8ee9dcde 100755 --- a/inst/tinytest/test-mdro.R +++ b/inst/tinytest/test-mdro.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-mean_amr_distance.R b/inst/tinytest/test-mean_amr_distance.R index c9ad6fa6e..b7ad09ea2 100644 --- a/inst/tinytest/test-mean_amr_distance.R +++ b/inst/tinytest/test-mean_amr_distance.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-mic.R b/inst/tinytest/test-mic.R index 84fe99729..b034bf25e 100755 --- a/inst/tinytest/test-mic.R +++ b/inst/tinytest/test-mic.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-mo.R b/inst/tinytest/test-mo.R index f336e2937..d49d93700 100644 --- a/inst/tinytest/test-mo.R +++ b/inst/tinytest/test-mo.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-mo_property.R b/inst/tinytest/test-mo_property.R index 62b5a507b..595dc0a1d 100644 --- a/inst/tinytest/test-mo_property.R +++ b/inst/tinytest/test-mo_property.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-pca.R b/inst/tinytest/test-pca.R index f8ada6cde..38318395e 100644 --- a/inst/tinytest/test-pca.R +++ b/inst/tinytest/test-pca.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-proportion.R b/inst/tinytest/test-proportion.R index 79e6683fe..3d94e3929 100755 --- a/inst/tinytest/test-proportion.R +++ b/inst/tinytest/test-proportion.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-random.R b/inst/tinytest/test-random.R index 98e304e00..cd0b62c99 100644 --- a/inst/tinytest/test-random.R +++ b/inst/tinytest/test-random.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-resistance_predict.R b/inst/tinytest/test-resistance_predict.R index baf03e3f6..478581c90 100644 --- a/inst/tinytest/test-resistance_predict.R +++ b/inst/tinytest/test-resistance_predict.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-rsi.R b/inst/tinytest/test-rsi.R index bc07e28fd..1bd111314 100644 --- a/inst/tinytest/test-rsi.R +++ b/inst/tinytest/test-rsi.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-skewness.R b/inst/tinytest/test-skewness.R index 374f3ab65..0ae0ea0f2 100644 --- a/inst/tinytest/test-skewness.R +++ b/inst/tinytest/test-skewness.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/inst/tinytest/test-zzz.R b/inst/tinytest/test-zzz.R index 62414e3ae..5702c3329 100644 --- a/inst/tinytest/test-zzz.R +++ b/inst/tinytest/test-zzz.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/man/AMR.Rd b/man/AMR.Rd index f005e0fce..aa94bf7c8 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -1,14 +1,37 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/amr.R +\docType{package} \name{AMR} \alias{AMR} +\alias{AMR-package} \title{The \code{AMR} Package} +\source{ +To cite AMR in publications use: + +Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2022). "AMR: An R Package for Working with Antimicrobial Resistance Data." \emph{Journal of Statistical Software}, \emph{104}(3), 1-31. \doi{10.18637/jss.v104.i03}. + +A BibTeX entry for LaTeX users is: + +\preformatted{ +@Article{, + title = {{AMR}: An {R} Package for Working with Antimicrobial Resistance Data}, + author = {Matthijs S. Berends and Christian F. Luz and Alexander W. Friedrich and Bhanu N. M. Sinha and Casper J. Albers and Corinna Glasner}, + journal = {Journal of Statistical Software}, + year = {2022}, + volume = {104}, + number = {3}, + pages = {1--31}, + doi = {10.18637/jss.v104.i03}, +} +} +} \description{ Welcome to the \code{AMR} package. -} -\details{ + \code{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. +This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}). + After installing this package, \R knows ~49,000 distinct microbial species and all ~570 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. This package is fully independent of any other \R package and works on Windows, macOS and Linux with all versions of \R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice and University Medical Center Groningen. This \R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. @@ -38,21 +61,43 @@ This package can be used for: All data sets in this \code{AMR} package (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit \href{https://msberends.github.io/AMR/articles/datasets.html}{our website for the download links}. The actual files are of course available on \href{https://github.com/msberends/AMR/tree/main/data-raw}{our GitHub repository}. } -\section{Contact Us}{ - -For suggestions, comments or questions, please contact us via: - -Dr. Matthijs S. Berends \cr -m.s.berends [at] umcg [dot] nl \cr -University of Groningen -Department of Medical Microbiology and Infection Prevention \cr -University Medical Center Groningen \cr -Post Office Box 30001 \cr -9700 RB Groningen \cr -The Netherlands -\url{https://msberends.github.io/AMR/} - -If you have found a bug, please file a new issue at: \cr -\url{https://github.com/msberends/AMR/issues} +\seealso{ +Useful links: +\itemize{ + \item \url{https://msberends.github.io/AMR/} + \item \url{https://github.com/msberends/AMR} + \item Report bugs at \url{https://github.com/msberends/AMR/issues} } +} +\author{ +\strong{Maintainer}: Matthijs S. Berends \email{m.berends@certe.nl} (\href{https://orcid.org/0000-0001-7620-1800}{ORCID}) + +Authors: +\itemize{ + \item Christian F. Luz (\href{https://orcid.org/0000-0001-5809-5995}{ORCID}) [contributor] + \item Dennis Souverein (\href{https://orcid.org/0000-0003-0455-0336}{ORCID}) [contributor] + \item Erwin E. A. Hassing [contributor] +} + +Other contributors: +\itemize{ + \item Casper J. Albers (\href{https://orcid.org/0000-0002-9213-6743}{ORCID}) [thesis advisor] + \item Peter Dutey-Magni (\href{https://orcid.org/0000-0002-8942-9836}{ORCID}) [contributor] + \item Judith M. Fonville [contributor] + \item Alex W. Friedrich (\href{https://orcid.org/0000-0003-4881-038X}{ORCID}) [thesis advisor] + \item Corinna Glasner (\href{https://orcid.org/0000-0003-1241-1328}{ORCID}) [thesis advisor] + \item Eric H. L. C. M. Hazenberg [contributor] + \item Gwen Knight (\href{https://orcid.org/0000-0002-7263-9896}{ORCID}) [contributor] + \item Annick Lenglet (\href{https://orcid.org/0000-0003-2013-8405}{ORCID}) [contributor] + \item Bart C. Meijer [contributor] + \item Dmytro Mykhailenko [contributor] + \item Anton Mymrikov [contributor] + \item Sofia Ny (\href{https://orcid.org/0000-0002-2017-1363}{ORCID}) [contributor] + \item Rogier P. Schade [contributor] + \item Bhanu N. M. Sinha (\href{https://orcid.org/0000-0003-1634-0010}{ORCID}) [thesis advisor] + \item Anthony Underwood (\href{https://orcid.org/0000-0002-8547-4277}{ORCID}) [contributor] +} + +} +\keyword{internal} diff --git a/man/as.mo.Rd b/man/as.mo.Rd index 3110aafd9..e47f05600 100644 --- a/man/as.mo.Rd +++ b/man/as.mo.Rd @@ -4,7 +4,9 @@ \alias{as.mo} \alias{mo} \alias{is.mo} +\alias{mo_failures} \alias{mo_uncertainties} +\alias{mo_renamed} \alias{mo_reset_session} \title{Transform Input to a Microorganism Code} \usage{ @@ -24,8 +26,12 @@ as.mo( is.mo(x) +mo_failures() + mo_uncertainties() +mo_renamed() + mo_reset_session() } \arguments{ @@ -115,7 +121,12 @@ With the default setting (\code{allow_uncertain = TRUE}, level 2), below example \item \code{"Fluoroquinolone-resistant Neisseria gonorrhoeae"}. The first word will be stripped, after which the function will try to find a match. A warning will be thrown that the result \emph{Neisseria gonorrhoeae} (\code{B_NESSR_GNRR}) needs review. } -Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Matching Score for Microorganisms} below). +There are three helper functions that can be run after using the \code{\link[=as.mo]{as.mo()}} function: +\itemize{ +\item Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Matching Score for Microorganisms} below). +\item Use \code{\link[=mo_failures]{mo_failures()}} to get a \link{character} \link{vector} with all values that could not be coerced to a valid value. +\item Use \code{\link[=mo_renamed]{mo_renamed()}} to get a \link{data.frame} with all values that could be coerced based on old, previously accepted taxonomic names. +} } \subsection{Microbial Prevalence of Pathogens in Humans}{ diff --git a/man/translate.Rd b/man/translate.Rd index 795fd5f13..41fbb19b5 100644 --- a/man/translate.Rd +++ b/man/translate.Rd @@ -17,7 +17,7 @@ reset_AMR_locale() translate_AMR(x, language = get_AMR_locale()) } \arguments{ -\item{language}{language to choose. Use one of these supported language names or ISO-639-1 codes: "English" ("en"), "Chinese" ("zh"), "Danish" ("da"), "Dutch" ("nl"), "French" ("fr"), "German" ("de"), "Greek" ("el"), "Italian" ("it"), "Japanese" ("ja"), "Polish" ("pl"), "Portuguese" ("pt"), "Russian" ("ru"), "Spanish" ("es"), "Swedish" ("sv"), "Turkish" ("tr"), "Ukrainian" ("uk").} +\item{language}{language to choose. Use one of these supported language names or ISO-639-1 codes: English (en), Chinese (zh), Danish (da), Dutch (nl), French (fr), German (de), Greek (el), Italian (it), Japanese (ja), Polish (pl), Portuguese (pt), Russian (ru), Spanish (es), Swedish (sv), Turkish (tr) or Ukrainian (uk).} \item{x}{text to translate} } @@ -25,9 +25,9 @@ translate_AMR(x, language = get_AMR_locale()) For language-dependent output of AMR functions, like \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_gramstain]{mo_gramstain()}}, \code{\link[=mo_type]{mo_type()}} and \code{\link[=ab_name]{ab_name()}}. } \details{ -The currently 16 supported languages are English, Chinese, Danish, Dutch, French, German, Greek, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swedish, Turkish and Ukrainian. All these languages have translations available for all antimicrobial agents and colloquial microorganism names. +The currently 16 supported languages are English (en), Chinese (zh), Danish (da), Dutch (nl), French (fr), German (de), Greek (el), Italian (it), Japanese (ja), Polish (pl), Portuguese (pt), Russian (ru), Spanish (es), Swedish (sv), Turkish (tr) or Ukrainian (uk). All these languages have translations available for all antimicrobial agents and colloquial microorganism names. -\strong{To silence language notes when this package loads} on a non-English operating system, please set the option \code{AMR_locale} in your \code{.Rprofile} file like this: +\strong{To silence language notes when this package loads} on a non-English operating system, you can set the option \code{AMR_locale} in your \code{.Rprofile} file like this: \if{html}{\out{
}}\preformatted{# Open .Rprofile file utils::file.edit("~/.Rprofile") diff --git a/pkgdown/extra.css b/pkgdown/extra.css index 4eca8890f..0d53fc786 100644 --- a/pkgdown/extra.css +++ b/pkgdown/extra.css @@ -1,13 +1,17 @@ /* # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/pkgdown/extra.js b/pkgdown/extra.js index 2ed5ada42..d6f3b46a8 100644 --- a/pkgdown/extra.js +++ b/pkgdown/extra.js @@ -1,13 +1,17 @@ /* # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/tests/tinytest.R b/tests/tinytest.R index 8e5ae6d1e..eeca7ace0 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R @@ -1,12 +1,16 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Data Analysis for R # +# AMR: An R Package for Working with Antimicrobial Resistance Data # # # # SOURCE # # https://github.com/msberends/AMR # # # -# LICENCE # -# (c) 2018-2022 Berends MS, Luz CF et al. # +# CITE AS # +# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C # +# (2022). AMR: An R Package for Working with Antimicrobial Resistance # +# Data. Journal of Statistical Software, 104(3), 1-31. # +# doi:10.18637/jss.v104.i03 # +# # # Developed at the University of Groningen, the Netherlands, in # # collaboration with non-profit organisations Certe Medical # # Diagnostics & Advice, and University Medical Center Groningen. # diff --git a/vignettes/welcome_to_AMR.Rmd b/vignettes/welcome_to_AMR.Rmd index 6903c7d15..b33a1e1a5 100644 --- a/vignettes/welcome_to_AMR.Rmd +++ b/vignettes/welcome_to_AMR.Rmd @@ -28,6 +28,8 @@ Note: to keep the package size as small as possible, we only included this vigne The `AMR` package is a [free and open-source](https://msberends.github.io/AMR/#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) 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 AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. +This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). + After installing this package, R knows `r AMR:::format_included_data_number(AMR::microorganisms)` distinct microbial species and all `r AMR:::format_included_data_number(rbind(AMR::antibiotics[, "atc", drop = FALSE], AMR::antivirals[, "atc", drop = FALSE]))` antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data. The `AMR` package is available in English, Chinese, Danish, Dutch, French, German, Greek, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swedish, Turkish and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages. @@ -55,7 +57,7 @@ This package can be used for: All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this `AMR` package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find [all download links on our website](https://msberends.github.io/AMR/articles/datasets.html), which is automatically updated with every code change. -This R package was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). This R package formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://research.rug.nl/en/publications/a-new-instrument-for-microbial-epidemiology-empowering-antimicrob) and [DOI 10.33612/diss.192486375](https://research.rug.nl/en/publications/data-science-for-infection-management-amp-antimicrobial-stewardsh)) but is actively and durably maintained (see [changelog)](https://msberends.github.io/AMR/news/index.html)) by two public healthcare organisations in the Netherlands. +This R package was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl), and is being [actively and durably maintained](./news) by two public healthcare organisations in the Netherlands. ----