Browse Source

(v1.7.1.9051) updated taxonomy, updated git branch name

development
parent
commit
37e6e35ec4
  1. 10
      .github/workflows/check.yaml
  2. 157
      .github/workflows/check.yaml.old
  3. 2
      .github/workflows/lintr.yaml
  4. 4
      DESCRIPTION
  5. 13
      NEWS.md
  6. 6
      R/catalogue_of_life.R
  7. 25
      R/data.R
  8. 2
      R/eucast_rules.R
  9. 2
      R/globals.R
  10. 57
      R/mo.R
  11. 2
      R/rsi.R
  12. BIN
      R/sysdata.rda
  13. 2
      R/translate.R
  14. 10
      README.md
  15. BIN
      data-raw/AMR_latest.tar.gz
  16. 7
      data-raw/_internals.R
  17. BIN
      data-raw/intrinsic_resistant.dta
  18. 2
      data-raw/intrinsic_resistant.md5
  19. BIN
      data-raw/intrinsic_resistant.rds
  20. BIN
      data-raw/intrinsic_resistant.sas
  21. BIN
      data-raw/intrinsic_resistant.sav
  22. 1244
      data-raw/intrinsic_resistant.txt
  23. BIN
      data-raw/microorganisms.dta
  24. BIN
      data-raw/microorganisms.old.dta
  25. 2
      data-raw/microorganisms.old.md5
  26. BIN
      data-raw/microorganisms.old.rds
  27. BIN
      data-raw/microorganisms.old.sas
  28. BIN
      data-raw/microorganisms.old.sav
  29. 596
      data-raw/microorganisms.old.txt
  30. BIN
      data-raw/microorganisms.rds
  31. BIN
      data-raw/microorganisms.sas
  32. BIN
      data-raw/microorganisms.sav
  33. 1884
      data-raw/microorganisms.txt
  34. 2
      data-raw/mo.md5
  35. 77
      data-raw/reproduction_of_microorganisms_update.R
  36. BIN
      data-raw/rsi_translation.dta
  37. BIN
      data-raw/rsi_translation.sas
  38. BIN
      data-raw/rsi_translation.sav
  39. 7
      data-raw/snomed.R
  40. BIN
      data/example_isolates.rda
  41. BIN
      data/intrinsic_resistant.rda
  42. BIN
      data/microorganisms.codes.rda
  43. BIN
      data/microorganisms.old.rda
  44. BIN
      data/microorganisms.rda
  45. BIN
      data/rsi_translation.rda
  46. 4
      docs/404.html
  47. 2
      docs/LICENSE-text.html
  48. 2
      docs/articles/AMR.html
  49. 2
      docs/articles/EUCAST.html
  50. 2
      docs/articles/MDR.html
  51. 2
      docs/articles/PCA.html
  52. 6
      docs/articles/SPSS.html
  53. 2
      docs/articles/WHONET.html
  54. 2
      docs/articles/benchmarks.html
  55. 106
      docs/articles/datasets.html
  56. 2
      docs/articles/index.html
  57. 2
      docs/articles/resistance_predict.html
  58. 2
      docs/articles/welcome_to_AMR.html
  59. 2
      docs/authors.html
  60. 10
      docs/extra.js
  61. 8
      docs/index.html
  62. 23
      docs/news/index.html
  63. 2
      docs/pkgdown.yml
  64. 2
      docs/reference/AMR-deprecated.html
  65. 2
      docs/reference/AMR.html
  66. 2
      docs/reference/WHOCC.html
  67. 2
      docs/reference/WHONET.html
  68. 2
      docs/reference/ab_from_text.html
  69. 2
      docs/reference/ab_property.html
  70. 2
      docs/reference/age.html
  71. 2
      docs/reference/age_groups.html
  72. 2
      docs/reference/antibiotic_class_selectors.html
  73. 10
      docs/reference/antibiotics.html
  74. 2
      docs/reference/as.ab.html
  75. 2
      docs/reference/as.disk.html
  76. 2
      docs/reference/as.mic.html
  77. 2
      docs/reference/as.mo.html
  78. 4
      docs/reference/as.rsi.html
  79. 2
      docs/reference/atc_online.html
  80. 2
      docs/reference/availability.html
  81. 2
      docs/reference/bug_drug_combinations.html
  82. 12
      docs/reference/catalogue_of_life.html
  83. 2
      docs/reference/catalogue_of_life_version.html
  84. 2
      docs/reference/count.html
  85. 2
      docs/reference/custom_eucast_rules.html
  86. 2
      docs/reference/dosage.html
  87. 4
      docs/reference/eucast_rules.html
  88. 2
      docs/reference/example_isolates.html
  89. 2
      docs/reference/example_isolates_unclean.html
  90. 2
      docs/reference/first_isolate.html
  91. 2
      docs/reference/g.test.html
  92. 2
      docs/reference/get_episode.html
  93. 2
      docs/reference/ggplot_pca.html
  94. 2
      docs/reference/ggplot_rsi.html
  95. 2
      docs/reference/guess_ab_col.html
  96. 4
      docs/reference/index.html
  97. 6
      docs/reference/intrinsic_resistant.html
  98. 2
      docs/reference/italicise_taxonomy.html
  99. 2
      docs/reference/join.html
  100. 2
      docs/reference/key_antimicrobials.html

10
.github/workflows/check.yaml

@ -59,6 +59,8 @@ jobs:
- {os: macOS-latest, r: '3.4', allowfail: false}
- {os: macOS-latest, r: '3.3', allowfail: false}
- {os: macOS-latest, r: '3.2', allowfail: false}
- {os: macOS-latest, r: '3.1', allowfail: true}
- {os: macOS-latest, r: '3.0', allowfail: true}
- {os: ubuntu-20.04, r: 'devel', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
@ -76,7 +78,9 @@ jobs:
- {os: windows-latest, r: '3.5', allowfail: false}
- {os: windows-latest, r: '3.4', allowfail: false}
- {os: windows-latest, r: '3.3', allowfail: false}
- {os: windows-latest, r: '3.2', allowfail: false}
- {os: windows-latest, r: '3.2', allowfail: true}
- {os: windows-latest, r: '3.1', allowfail: true}
- {os: windows-latest, r: '3.0', allowfail: true}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
@ -98,10 +102,10 @@ jobs:
# as of May 2021: https://sysreqs.r-hub.io/pkg/AMR,R,cleaner,curl,dplyr,ggplot2,ggtext,knitr,microbenchmark,pillar,readxl,rmarkdown,rstudioapi,rvest,skimr,tidyr,tinytest,xml2,backports,crayon,rlang,vctrs,evaluate,highr,markdown,stringr,yaml,xfun,cli,ellipsis,fansi,lifecycle,utf8,glue,mime,magrittr,stringi,generics,R6,tibble,tidyselect,pkgconfig,purrr,digest,gtable,isoband,MASS,mgcv,scales,withr,nlme,Matrix,farver,labeling,munsell,RColorBrewer,viridisLite,lattice,colorspace,gridtext,Rcpp,RCurl,png,jpeg,bitops,cellranger,progress,rematch,hms,prettyunits,htmltools,jsonlite,tinytex,base64enc,httr,selectr,openssl,askpass,sys,repr,cpp11
run: |
sudo apt install -y libssl-dev libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev
- name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run
if: runner.os != 'Windows'
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-v4

157
.github/workflows/check.yaml.old

@ -1,157 +0,0 @@
# ==================================================================== #
# TITLE #
# Antimicrobial Resistance (AMR) Data Analysis for R #
# #
# SOURCE #
# https://github.com/msberends/AMR #
# #
# LICENCE #
# (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. #
# #
# This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. #
# We created this package for both routine data analysis and academic #
# research and it was publicly released in the hope that it will be #
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
# This GitHub Actions file runs without ANY dependency, so works on all versions of R since R-3.0.
on:
push:
branches:
- premaster
- master
pull_request:
branches:
- master
schedule:
# run a schedule everyday at 1 AM.
# this is to check that all dependencies are still available (see R/zzz.R)
- cron: '0 1 * * *'
name: R-code-check
jobs:
R-code-check:
runs-on: ${{ matrix.config.os }}
continue-on-error: ${{ matrix.config.allowfail }}
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
# test all systems against all released versions of R >= 3.0, we support them all!
- {os: macOS-latest, r: 'devel', allowfail: true}
- {os: macOS-latest, r: '4.1', allowfail: false}
- {os: macOS-latest, r: '4.0', allowfail: false}
- {os: macOS-latest, r: '3.6', allowfail: false}
- {os: macOS-latest, r: '3.5', allowfail: false}
- {os: macOS-latest, r: '3.4', allowfail: false}
- {os: macOS-latest, r: '3.3', allowfail: false}
- {os: macOS-latest, r: '3.2', allowfail: false}
- {os: ubuntu-20.04, r: 'devel', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.6', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.5', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.3', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.2', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: windows-latest, r: 'devel', allowfail: true}
- {os: windows-latest, r: '4.1', allowfail: false}
- {os: windows-latest, r: '4.0', allowfail: false}
- {os: windows-latest, r: '3.6', allowfail: false}
- {os: windows-latest, r: '3.5', allowfail: false}
- {os: windows-latest, r: '3.4', allowfail: false}
- {os: windows-latest, r: '3.3', allowfail: false}
- {os: windows-latest, r: '3.2', allowfail: false}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
R_REPOSITORIES: "https://cran.rstudio.com"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
# update the below with sysreqs::sysreqs("DESCRIPTION") and check the "DEB" entries (for Ubuntu).
# we don't want to depend on the sysreqs pkg here, as it requires quite a recent R version
# as of May 2021: https://sysreqs.r-hub.io/pkg/AMR,R,cleaner,curl,dplyr,ggplot2,ggtext,knitr,microbenchmark,pillar,readxl,rmarkdown,rstudioapi,rvest,skimr,tidyr,tinytest,xml2,backports,crayon,rlang,vctrs,evaluate,highr,markdown,stringr,yaml,xfun,cli,ellipsis,fansi,lifecycle,utf8,glue,mime,magrittr,stringi,generics,R6,tibble,tidyselect,pkgconfig,purrr,digest,gtable,isoband,MASS,mgcv,scales,withr,nlme,Matrix,farver,labeling,munsell,RColorBrewer,viridisLite,lattice,colorspace,gridtext,Rcpp,RCurl,png,jpeg,bitops,cellranger,progress,rematch,hms,prettyunits,htmltools,jsonlite,tinytex,base64enc,httr,selectr,openssl,askpass,sys,repr,cpp11
run: |
sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev libudunits2-dev
- name: Query dependencies
# this will change every day (i.e. at scheduled night run of GitHub Action), so it will cache dependency updates
run: |
writeLines(paste0(format(Sys.Date(), "%Y%m%d"), sprintf("-R-%i.%i", getRversion()$major, getRversion()$minor)), ".github/daily-R-bundle")
shell: Rscript {0}
- name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-${{ hashFiles('.github/daily-R-bundle') }}-v4
- name: Unpack AMR and install R dependencies
if: always()
run: |
tar -xf data-raw/AMR_latest.tar.gz
Rscript -e "source('data-raw/_install_deps.R')"
shell: bash
- name: Show session info
if: always()
run: |
options(width = 100)
utils::sessionInfo()
as.data.frame(utils::installed.packages())[, "Version", drop = FALSE]
shell: Rscript {0}
- name: Run R CMD check
if: always()
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_DEPENDS_ONLY_: true
_R_CHECK_LENGTH_1_CONDITION_: verbose
_R_CHECK_LENGTH_1_LOGIC2_: verbose
# during 'R CMD check', R_LIBS_USER will be overwritten, so:
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
R_RUN_TINYTEST: true
run: |
R CMD check --no-manual --run-donttest --run-dontrun AMR
shell: bash
- name: Show unit tests output
if: always()
run: |
find . -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-artifacts
path: AMR.Rcheck

2
.github/workflows/lintr.yaml

@ -42,7 +42,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v1
- name: Query dependencies
run: |

4
DESCRIPTION

@ -1,6 +1,6 @@
Package: AMR
Version: 1.7.1.9050
Date: 2021-10-05
Version: 1.7.1.9051
Date: 2021-10-06
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

13
NEWS.md

@ -1,5 +1,5 @@
# `AMR` 1.7.1.9050
## <small>Last updated: 5 October 2021</small>
# `AMR` 1.7.1.9051
## <small>Last updated: 6 October 2021</small>
### Breaking changes
* Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version
@ -11,6 +11,7 @@
* Support for Danish, and also added missing translations of all antimicrobial drugs in Italian, French and Portuguese
### Changed
* Updated the bacterial taxonomy to 5 October 2021 (according to [LPSN](https://lpsn.dsmz.de)), including all 11 new staphylococcal species named since 1 January last year
* The `antibiotics` data set now contains **all ATC codes** that are available through the [WHOCC website](https://www.whocc.no), regardless of drugs being present in more than one ATC group. This means that:
* Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)
* `antibiotics$atc` is now a `list` containing `character` vectors, and this `atc` column was moved to the 5th position of the `antibiotics` data set
@ -500,7 +501,7 @@ This software is now out of beta and considered stable. Nonetheless, this packag
### New
* Support for the newest [EUCAST Clinical Breakpoint Tables v.10.0](https://www.eucast.org/clinical_breakpoints/), valid from 1 January 2020. This affects translation of MIC and disk zones using `as.rsi()` and inferred resistance and susceptibility using `eucast_rules()`.
* The repository of this package now contains a clean version of the EUCAST and CLSI guidelines from 2011-2020 to translate MIC and disk diffusion values to R/SI: <https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt>. This **allows for machine reading these guidelines**, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file used to process the EUCAST Clinical Breakpoints Excel file [can be found here](https://github.com/msberends/AMR/blob/master/data-raw/read_EUCAST.R).
* The repository of this package now contains a clean version of the EUCAST and CLSI guidelines from 2011-2020 to translate MIC and disk diffusion values to R/SI: <https://github.com/msberends/AMR/blob/main/data-raw/rsi_translation.txt>. This **allows for machine reading these guidelines**, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file used to process the EUCAST Clinical Breakpoints Excel file [can be found here](https://github.com/msberends/AMR/blob/main/data-raw/read_EUCAST.R).
* Support for LOINC and SNOMED codes
* Support for LOINC codes in the `antibiotics` data set. Use `ab_loinc()` to retrieve LOINC codes, or use a LOINC code for input in any `ab_*` function:
```r
@ -817,7 +818,7 @@ This software is now out of beta and considered stable. Nonetheless, this packag
* All references to antibiotics in our package now use EARS-Net codes, like `AMX` for amoxicillin
* Functions `atc_certe`, `ab_umcg` and `atc_trivial_nl` have been removed
* All `atc_*` functions are superseded by `ab_*` functions
* All output will be translated by using an included translation file which [can be viewed here](https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv)
* All output will be translated by using an included translation file which [can be viewed here](https://github.com/msberends/AMR/blob/main/data-raw/translations.tsv)
* Improvements to plotting AMR results with `ggplot_rsi()`:
* New argument `colours` to set the bar colours
* New arguments `title`, `subtitle`, `caption`, `x.title` and `y.title` to set titles and axis descriptions
@ -841,7 +842,7 @@ This software is now out of beta and considered stable. Nonetheless, this packag
freq(age) %>%
boxplot()
```
* Removed all hardcoded EUCAST rules and replaced them with a new reference file which [can be viewed here](https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv)
* Removed all hardcoded EUCAST rules and replaced them with a new reference file which [can be viewed here](https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv)
* Added ceftazidim intrinsic resistance to *Streptococci*
* Changed default settings for `age_groups()`, to let groups of fives and tens end with 100+ instead of 120+
* Fix for `freq()` for when all values are `NA`
@ -1352,7 +1353,7 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
* Added [ORCID](https://orcid.org) of authors to DESCRIPTION file
* Added unit testing with the `testthat` package
* Added build tests for Linux and macOS using Travis CI (https://travis-ci.org/msberends/AMR)
* Added line coverage checking using CodeCov (https://codecov.io/gh/msberends/AMR/tree/master/R)
* Added line coverage checking using CodeCov (https://codecov.io/gh/msberends/AMR/tree/main/R)
# AMR 0.1.1

6
R/catalogue_of_life.R

@ -41,7 +41,7 @@ format_included_data_number <- function(data) {
#' The Catalogue of Life
#'
#' This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life.
#' This package contains the complete taxonomic tree (last updated: `r CATALOGUE_OF_LIFE$yearmonth_LPSN`) of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (CoL), supplemented with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN).
#' @section Catalogue of Life:
#' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
#' This package contains the complete taxonomic tree of almost all microorganisms (`r format_included_data_number(microorganisms)` species) from the authoritative and comprehensive Catalogue of Life (CoL, <http://www.catalogueoflife.org>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/CatalogueOfLife/general) is finished, which we await.
@ -58,7 +58,7 @@ format_included_data_number <- function(data) {
#'
#' The Catalogue of Life (<http://www.catalogueoflife.org>) is the most comprehensive and authoritative global index of species currently available. It holds essential information on the names, relationships and distributions of over 1.9 million species. The Catalogue of Life is used to support the major biodiversity and conservation information services such as the Global Biodiversity Information Facility (GBIF), Encyclopedia of Life (EoL) and the International Union for Conservation of Nature Red List. It is recognised by the Convention on Biological Diversity as a significant component of the Global Taxonomy Initiative and a contribution to Target 1 of the Global Strategy for Plant Conservation.
#'
#' The syntax used to transform the original data to a cleansed \R format, can be found here: <https://github.com/msberends/AMR/blob/master/data-raw/reproduction_of_microorganisms.R>.
#' The syntax used to transform the original data to a cleansed \R format, can be found here: <https://github.com/msberends/AMR/blob/main/data-raw/reproduction_of_microorganisms.R>.
#' @inheritSection AMR Read more on Our Website!
#' @name catalogue_of_life
#' @rdname catalogue_of_life
@ -141,5 +141,5 @@ print.catalogue_of_life_version <- function(x, ...) {
" Number of included bacterial species: ", format(x$LPSN$n, big.mark = ","), "\n\n",
"=> Total number of species included: ", format(x$total_included$n_total_species, big.mark = ","), "\n",
"=> Total number of synonyms included: ", format(x$total_included$n_total_synonyms, big.mark = ","), "\n\n",
"See for more info ?microorganisms and ?catalogue_of_life.\n"))
"See for more info ", font_grey_bg("`?microorganisms`"), " and ", font_grey_bg("`?catalogue_of_life`"), ".\n"))
}

25
R/data.R

@ -60,13 +60,13 @@
#' ## Direct download
#' These data sets are available as 'flat files' for use even without \R - you can find the files here:
#'
#' * <https://github.com/msberends/AMR/raw/master/data-raw/antibiotics.txt>
#' * <https://github.com/msberends/AMR/raw/master/data-raw/antivirals.txt>
#' * <https://github.com/msberends/AMR/raw/main/data-raw/antibiotics.txt>
#' * <https://github.com/msberends/AMR/raw/main/data-raw/antivirals.txt>
#'
#' Files in \R format (with preserved data structure) can be found here:
#'
#' * <https://github.com/msberends/AMR/raw/master/data/antibiotics.rda>
#' * <https://github.com/msberends/AMR/raw/master/data/antivirals.rda>
#' * <https://github.com/msberends/AMR/raw/main/data/antibiotics.rda>
#' * <https://github.com/msberends/AMR/raw/main/data/antivirals.rda>
#' @source World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): <https://www.whocc.no/atc_ddd_index/>
#'
#' WHONET 2019 software: <http://www.whonet.org/software.html>
@ -83,7 +83,7 @@
#' Data Set with `r format(nrow(microorganisms), big.mark = ",")` Microorganisms
#'
#' A data set containing the microbial taxonomy, last updated in `r CATALOGUE_OF_LIFE$yearmonth_LPSN`, of six kingdoms from the Catalogue of Life (CoL) and the List of Prokaryotic names with Standing in Nomenclature (LPSN). MO codes can be looked up using [as.mo()].
#' A data set containing the full microbial taxonomy (**last updated: `r CATALOGUE_OF_LIFE$yearmonth_LPSN`**) of `r nr2char(length(unique(microorganisms$kingdom[!microorganisms$kingdom %like% "unknown"])))` kingdoms from the Catalogue of Life (CoL) and the List of Prokaryotic names with Standing in Nomenclature (LPSN). MO codes can be looked up using [as.mo()].
#' @inheritSection catalogue_of_life Catalogue of Life
#' @format A [data.frame] with `r format(nrow(microorganisms), big.mark = ",")` observations and `r ncol(microorganisms)` variables:
#' - `mo`\cr ID of microorganism as used by this package
@ -105,20 +105,21 @@
#'
#' - 11 entries of *Streptococcus* (beta-haemolytic: groups A, B, C, D, F, G, H, K and unspecified; other: viridans, milleri)
#' - 2 entries of *Staphylococcus* (coagulase-negative (CoNS) and coagulase-positive (CoPS))
#' - 3 entries of *Trichomonas* (*Trichomonas vaginalis*, and its family and genus)
#' - 1 entry of *Candida* (*Candida krusei*), that is not (yet) in the Catalogue of Life
#' - 1 entry of *Blastocystis* (*Blastocystis hominis*), although it officially does not exist (Noel *et al.* 2005, PMID 15634993)
#' - 3 entries of *Trichomonas* (*T. vaginalis*, and its family and genus)
#' - 1 entry of *Candida* (*C. krusei*), that is not (yet) in the Catalogue of Life
#' - 1 entry of *Blastocystis* (*B. hominis*), although it officially does not exist (Noel *et al.* 2005, PMID 15634993)
#' - 1 entry of *Moraxella* (*M. catarrhalis*), which was formally named *Branhamella catarrhalis* (Catlin, 1970) though this change was never accepted within the field of clinical microbiology
#' - 5 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast and unknown fungus)
#' - 6 families under the Enterobacterales order, according to Adeolu *et al.* (2016, PMID 27620848), that are not (yet) in the Catalogue of Life
#'
#' ## Direct download
#' This data set is available as 'flat file' for use even without \R - you can find the file here:
#'
#' * <https://github.com/msberends/AMR/raw/master/data-raw/microorganisms.txt>
#' * <https://github.com/msberends/AMR/raw/main/data-raw/microorganisms.txt>
#'
#' The file in \R format (with preserved data structure) can be found here:
#'
#' * <https://github.com/msberends/AMR/raw/master/data/microorganisms.rda>
#' * <https://github.com/msberends/AMR/raw/main/data/microorganisms.rda>
#' @section About the Records from LPSN (see *Source*):
#' The List of Prokaryotic names with Standing in Nomenclature (LPSN) provides comprehensive information on the nomenclature of prokaryotes. LPSN is a free to use service founded by Jean P. Euzeby in 1997 and later on maintained by Aidan C. Parte.
#'
@ -251,7 +252,7 @@
#' - `breakpoint_S`\cr Lowest MIC value or highest number of millimetres that leads to "S"
#' - `breakpoint_R`\cr Highest MIC value or lowest number of millimetres that leads to "R"
#' - `uti`\cr A [logical] value (`TRUE`/`FALSE`) to indicate whether the rule applies to a urinary tract infection (UTI)
#' @details The repository of this `AMR` package contains a file comprising this exact data set: <https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt>. This file **allows for machine reading EUCAST and CLSI guidelines**, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically.
#' @details The repository of this `AMR` package contains a file comprising this exact data set: <https://github.com/msberends/AMR/blob/main/data-raw/rsi_translation.txt>. This file **allows for machine reading EUCAST and CLSI guidelines**, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically.
#' @inheritSection AMR Reference Data Publicly Available
#' @inheritSection AMR Read more on Our Website!
#' @seealso [intrinsic_resistant]
@ -263,7 +264,7 @@
#' @format A [data.frame] with `r format(nrow(intrinsic_resistant), big.mark = ",")` observations and `r ncol(intrinsic_resistant)` variables:
#' - `microorganism`\cr Name of the microorganism
#' - `antibiotic`\cr Name of the antibiotic drug
#' @details The repository of this `AMR` package contains a file comprising this exact data set: <https://github.com/msberends/AMR/blob/master/data-raw/intrinsic_resistant.txt>. This file **allows for machine reading EUCAST guidelines about intrinsic resistance**, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.
#' @details The repository of this `AMR` package contains a file comprising this exact data set: <https://github.com/msberends/AMR/blob/main/data-raw/intrinsic_resistant.txt>. This file **allows for machine reading EUCAST guidelines about intrinsic resistance**, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.
#'
#' This data set is based on `r format_eucast_version_nr(3.2)`.
#' @inheritSection AMR Reference Data Publicly Available

2
R/eucast_rules.R

@ -66,7 +66,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
#' **Note:** This function does not translate MIC values to RSI values. Use [as.rsi()] for that. \cr
#' **Note:** When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. \cr
#'
#' The file containing all EUCAST rules is located here: <https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv>. **Note:** Old taxonomic names are replaced with the current taxonomy where applicable. For example, *Ochrobactrum anthropi* was renamed to *Brucella anthropi* in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The file used as input for this `AMR` package contains the taxonomy updated until [`r CATALOGUE_OF_LIFE$yearmonth_LPSN`][catalogue_of_life()].
#' The file containing all EUCAST rules is located here: <https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv>. **Note:** Old taxonomic names are replaced with the current taxonomy where applicable. For example, *Ochrobactrum anthropi* was renamed to *Brucella anthropi* in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The file used as input for this `AMR` package contains the taxonomy updated until [`r CATALOGUE_OF_LIFE$yearmonth_LPSN`][catalogue_of_life()].
#'
#' ## Custom Rules
#'

2
R/globals.R

@ -54,7 +54,7 @@ CATALOGUE_OF_LIFE <- list(
version = "Catalogue of Life: {year} Annual Checklist",
url_CoL = "http://www.catalogueoflife.org/col/",
url_LPSN = "https://lpsn.dsmz.de",
yearmonth_LPSN = "March 2021"
yearmonth_LPSN = "5 October 2021"
)
globalVariables(c(".rowid",

57
R/mo.R

@ -201,7 +201,8 @@ as.mo <- function(x,
& isFALSE(Becker)
& isFALSE(Lancefield), error = function(e) FALSE)) {
# to improve speed, special case for taxonomically correct full names (case-insensitive)
return(MO_lookup[match(gsub(".*(unknown ).*", "unknown name", tolower(x), perl = TRUE), MO_lookup$fullname_lower), "mo", drop = TRUE])
return(set_clean_class(MO_lookup[match(gsub(".*(unknown ).*", "unknown name", tolower(x), perl = TRUE), MO_lookup$fullname_lower), "mo", drop = TRUE],
new_class = c("mo", "character")))
}
if (!is.null(reference_df)
@ -233,7 +234,7 @@ as.mo <- function(x,
info = info,
...)
}
set_clean_class(y,
new_class = c("mo", "character"))
}
@ -1499,20 +1500,23 @@ exec_as.mo <- function(x,
# - Becker et al. 2014, PMID 25278577
# - Becker et al. 2019, PMID 30872103
# - Becker et al. 2020, PMID 32056452
post_Becker <- character(0) # 2020-10-20 currently all are mentioned in above papers (otherwise uncomment the section below)
post_Becker <- c("caledonicus", "canis", "durrellii", "lloydii", "roterodami")
# nolint start
# if (any(x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property])) {
# warning_("Becker ", font_italic("et al."), " (2014, 2019) does not contain these species named after their publication: ",
# font_italic(paste("S.",
# sort(mo_species(unique(x[x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property]]))),
# collapse = ", ")),
# ".",
# call = FALSE,
# immediate = TRUE)
# }
# comment below code if all staphylococcal species are categorised as CoNS/CoPS
if (any(x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property])) {
if (message_not_thrown_before("as.mo_becker")) {
warning_("Becker ", font_italic("et al."), " (2014, 2019, 2020) does not contain these species named after their publication: ",
font_italic(paste("S.",
sort(mo_species(unique(x[x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property]]))),
collapse = ", ")),
". Categorisation to CoNS/CoPS was taken from the original scientific publication(s).",
call = FALSE,
immediate = TRUE)
}
}
# nolint end
# 'MO_CONS' and 'MO_COPS' are <mo> vectors created in R/zzz.R
CoNS <- MO_lookup[which(MO_lookup$mo %in% MO_CONS), property, drop = TRUE]
x[x %in% CoNS] <- lookup(mo == "B_STPHY_CONS", uncertainty = -1)
@ -1916,7 +1920,7 @@ print.mo_uncertainties <- function(x, ...) {
txt <- paste(txt,
paste0(
strwrap(
paste0(font_red('"', x[i, ]$input, '"', collapse = ""),
paste0('"', x[i, ]$input, '"',
" -> ",
paste0(font_bold(font_italic(x[i, ]$fullname)),
ifelse(!is.na(x[i, ]$renamed_to), paste(", renamed to", font_italic(x[i, ]$renamed_to)), ""),
@ -2047,6 +2051,8 @@ parse_and_convert <- function(x) {
}
replace_old_mo_codes <- function(x, property) {
# this function transform old MO codes to current codes, such as:
# B_ESCH_COL (AMR v0.5.0) -> B_ESCHR_COLI
ind <- x %like_case% "^[A-Z]_[A-Z_]+$" & !x %in% MO_lookup$mo
if (any(ind)) {
# get the ones that match
@ -2066,6 +2072,12 @@ replace_old_mo_codes <- function(x, property) {
MO_lookup$fullname_lower %like_case% name]
if (length(results) > 1) {
all_direct_matches <<- FALSE
} else if (length(results) == 0) {
# not found, so now search in old taxonomic names
results <- MO.old_lookup$fullname_new[MO.old_lookup$fullname_lower %like% name]
if (length(results) > 0) {
results <- MO_lookup$mo[match(results, MO_lookup$fullname)]
}
}
results[1L]
}), use.names = FALSE)
@ -2073,6 +2085,8 @@ replace_old_mo_codes <- function(x, property) {
# assign on places where a match was found
x[ind] <- solved
n_matched <- length(affected[!is.na(affected)])
n_solved <- length(affected[!is.na(solved)])
n_unsolved <- length(affected[is.na(solved)])
n_unique <- length(affected_unique[!is.na(affected_unique)])
if (n_unique < n_matched) {
n_unique <- paste0(n_unique, " unique, ")
@ -2086,12 +2100,17 @@ replace_old_mo_codes <- function(x, property) {
"Please update your MO codes with `as.mo()` to increase speed."),
call = FALSE)
} else {
warning_(paste0(n_matched, " old MO code", ifelse(n_matched == 1, "", "s"),
" (", n_unique, "from a previous AMR package version) ",
ifelse(n_matched == 1, "was", "were"),
warning_(paste0("The input contained ", n_matched,
" old MO code", ifelse(n_matched == 1, "", "s"),
" (", n_unique, "from a previous AMR package version). ",
n_solved, " old MO code", ifelse(n_solved == 1, "", "s"),
ifelse(n_solved == 1, " was", " were"),
ifelse(all_direct_matches, " updated ", font_bold(" guessed ")),
"to ", ifelse(n_matched == 1, "a ", ""),
"currently used MO code", ifelse(n_matched == 1, "", "s"), "."),
"to ", ifelse(n_solved == 1, "a ", ""),
"currently used MO code", ifelse(n_solved == 1, "", "s"),
ifelse(n_unsolved > 0,
paste0(" and ", n_unsolved, " old MO code", ifelse(n_unsolved == 1, "", "s"), " could not be updated."),
".")),
call = FALSE)
}
}

2
R/rsi.R

@ -75,7 +75,7 @@
#'
#' ## Machine-Readable Interpretation Guidelines
#'
#' The repository of this package [contains a machine-readable version](https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt) of all guidelines. This is a CSV file consisting of `r format(nrow(AMR::rsi_translation), big.mark = ",")` rows and `r ncol(AMR::rsi_translation)` columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. **This allows for easy implementation of these rules in laboratory information systems (LIS)**. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
#' The repository of this package [contains a machine-readable version](https://github.com/msberends/AMR/blob/main/data-raw/rsi_translation.txt) of all guidelines. This is a CSV file consisting of `r format(nrow(AMR::rsi_translation), big.mark = ",")` rows and `r ncol(AMR::rsi_translation)` columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. **This allows for easy implementation of these rules in laboratory information systems (LIS)**. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
#'
#' ## Other
#'

BIN
R/sysdata.rda

2
R/translate.R

@ -27,7 +27,7 @@
#'
#' For language-dependent output of AMR functions, like [mo_name()], [mo_gramstain()], [mo_type()] and [ab_name()].
#' @inheritSection lifecycle Stable Lifecycle
#' @details Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv>. This file will be read by all functions where a translated output can be desired, like all [`mo_*`][mo_property()] functions (such as [mo_name()], [mo_gramstain()], [mo_type()], etc.) and [`ab_*`][ab_property()] functions (such as [ab_name()], [ab_group()], etc.).
#' @details Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <https://github.com/msberends/AMR/blob/main/data-raw/translations.tsv>. This file will be read by all functions where a translated output can be desired, like all [`mo_*`][mo_property()] functions (such as [mo_name()], [mo_gramstain()], [mo_type()], etc.) and [`ab_*`][ab_property()] functions (such as [ab_name()], [ab_group()], etc.).
#'
#' Currently supported languages are: `r vector_and(gsub(";.*", "", ISOcodes::ISO_639_2[which(ISOcodes::ISO_639_2$Alpha_2 %in% LANGUAGES_SUPPORTED), "Name"]), quotes = FALSE)`. All these languages have translations available for all antimicrobial agents and colloquial microorganism names.
#'

10
README.md

@ -2,17 +2,17 @@
# `AMR` (for R)
![R-code-check](https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=master)
![R-code-check](https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/msberends/amr/badge)](https://www.codefactor.io/repository/github/msberends/amr)
[![Codecov](https://codecov.io/gh/msberends/AMR/branch/master/graph/badge.svg)](https://codecov.io/gh/msberends/AMR?branch=master)
[![Codecov](https://codecov.io/gh/msberends/AMR/branch/main/graph/badge.svg)](https://codecov.io/gh/msberends/AMR?branch=main)
<img src="https://msberends.github.io/AMR/works_great_on.png" align="center" height="150px" />
The latest built **source package** (`AMR_latest.tar.gz`) can be found in folder [/data-raw/](https://github.com/msberends/AMR/tree/master/data-raw).
The latest built **source package** (`AMR_latest.tar.gz`) can be found in folder [/data-raw/](https://github.com/msberends/AMR/tree/main/data-raw).
`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 150 countries.
After installing this package, R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic, and antiviral drugs by name and code (including ATC, 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.
After installing this package, R knows ~71,000 distinct microbial species and all ~560 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. Antimicrobial names and group names are available in Danish, Dutch, English, French, German, Italian, Portuguese and Spanish.
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 Foundation 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.
@ -33,7 +33,7 @@ It will be downloaded and installed automatically. For RStudio, click on the men
### Copyright
This R package is licensed under the [GNU General Public License (GPL) v2.0](https://github.com/msberends/AMR/blob/master/LICENSE). In a nutshell, this means that this package:
This R package is licensed under the [GNU General Public License (GPL) v2.0](https://github.com/msberends/AMR/blob/main/LICENSE). In a nutshell, this means that this package:
- May be used for commercial purposes

BIN
data-raw/AMR_latest.tar.gz

7
data-raw/_internals.R

@ -95,7 +95,9 @@ create_species_cons_cops <- function(type = c("CoNS", "CoPS")) {
"pulvereri", "rostri", "saccharolyticus", "saprophyticus",
"sciuri", "simulans", "stepanovicii", "succinus",
"ureilyticus",
"vitulinus", "vitulus", "warneri", "xylosus")
"vitulinus", "vitulus", "warneri", "xylosus",
"caledonicus", "canis",
"durrellii", "lloydii")
| (MO_staph$species == "schleiferi" & MO_staph$subspecies %in% c("schleiferi", ""))),
"mo", drop = TRUE]
} else if (type == "CoPS") {
@ -105,7 +107,8 @@ create_species_cons_cops <- function(type = c("CoNS", "CoPS")) {
"delphini", "lutrae",
"hyicus", "intermedius",
"pseudintermedius", "pseudointermedius",
"schweitzeri", "simiae")
"schweitzeri", "simiae",
"roterodami")
| (MO_staph$species == "schleiferi" & MO_staph$subspecies == "coagulans")),
"mo", drop = TRUE]
}

BIN
data-raw/intrinsic_resistant.dta

2
data-raw/intrinsic_resistant.md5

@ -1 +1 @@
9c58b2d894dbad7593cd44b78d04cd78
43d5b2e1df4e0d12d6ad0c7a4591199c

BIN
data-raw/intrinsic_resistant.rds

BIN
data-raw/intrinsic_resistant.sas

BIN
data-raw/intrinsic_resistant.sav

1244
data-raw/intrinsic_resistant.txt
File diff suppressed because it is too large
View File

BIN
data-raw/microorganisms.dta

BIN
data-raw/microorganisms.old.dta

2
data-raw/microorganisms.old.md5

@ -1 +1 @@
8338ff5f079f4519fa3c44f8c5bace64
ee4434541c7b6529b391d2684748e28b

BIN
data-raw/microorganisms.old.rds

BIN
data-raw/microorganisms.old.sas

BIN
data-raw/microorganisms.old.sav

596
data-raw/microorganisms.old.txt
File diff suppressed because it is too large
View File

BIN
data-raw/microorganisms.rds

BIN
data-raw/microorganisms.sas

BIN
data-raw/microorganisms.sav

1884
data-raw/microorganisms.txt
File diff suppressed because it is too large
View File

2
data-raw/mo.md5

@ -1 +1 @@
82bd6236cf159569f6f5c99f48f92d86
e8251824eec0b72d037b3dbfcdbe444a

77
data-raw/reproduction_of_microorganisms_update.R

@ -23,8 +23,7 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
# Register at List of Prokaryotic names with Standing in Nomenclature (LPSN)
# then got to https://lpsn.dsmz.de/downloads and download the latest CSV file.
# Go to https://lpsn.dsmz.de/downloads (register first) and download the latest CSV file.
library(tidyverse)
library(AMR)
@ -178,8 +177,7 @@ genera_without_mo_code <- updated_microorganisms %>%
pull(genus) %>%
unique()
genera_without_mo_code_abbr <- genera_without_mo_code %>%
abbreviate_mo(5, prefix = "B_")
genera_without_mo_code_abbr <- genera_without_mo_code %>% abbreviate_mo(5, prefix = "B_")
genera_without_mo_code_abbr[genera_without_mo_code_abbr %in% microorganisms$mo] <- abbreviate_mo(genera_without_mo_code[genera_without_mo_code_abbr %in% microorganisms$mo], 6, prefix = "B_")
genera_without_mo_code_abbr[genera_without_mo_code_abbr %in% microorganisms$mo] <- abbreviate_mo(genera_without_mo_code[genera_without_mo_code_abbr %in% microorganisms$mo], 7, prefix = "B_")
# all unique??
@ -377,41 +375,6 @@ MOs.old <- microorganisms.old %>%
# clean up
df_remove_nonASCII()
# Keep old codes for translation ------------------------------------------
# add removed microbial IDs to the internal translation table so old package versions keep working
# MOs.translation <- microorganisms %>%
# filter(!mo %in% MOs$mo) %>%
# select(mo, fullname) %>%
# left_join(new_synonyms) %>%
# left_join(MOs %>% transmute(fullname_new = fullname, mo2 = as.character(mo))) %>%
# select(mo_old = mo, mo_new = mo2) %>%
# distinct()
# MOs.translation <- AMR:::microorganisms.translation %>%
# left_join(MOs.translation %>% select(mo_new_update = mo_new, mo_new = mo_old)) %>%
# mutate(mo_new = as.character(ifelse(!is.na(mo_new_update), mo_new_update, mo_new))) %>%
# select(-mo_new_update) %>%
# bind_rows(
# # old IDs used in microorganisms.codes must put in here as well
# microorganisms.codes %>%
# filter(!mo %in% MOs$mo) %>%
# transmute(mo_old = mo, fullname = mo_name(mo)) %>%
# left_join(MOs.old %>%
# select(fullname, fullname_new)) %>%
# left_join(MOs %>%
# select(mo_new = mo, fullname_new = fullname)) %>%
# transmute(mo_old = as.character(mo_old), mo_new)) %>%
# arrange(mo_old) %>%
# filter(mo_old != mo_new,
# !mo_old %in% MOs$mo) %>%
# left_join(., .,
# by = c("mo_new" = "mo_old"),
# suffix = c("", ".2")) %>%
# mutate(mo_new = ifelse(!is.na(mo_new.2), mo_new.2, mo_new)) %>%
# distinct(mo_old, mo_new) %>%
# # clean up
# df_remove_nonASCII()
message("microorganisms new: ", sum(!MOs$fullname %in% c(microorganisms$fullname, MOs.old$fullname)))
message("microorganisms renamed: ", sum(!MOs.old$fullname %in% microorganisms.old$fullname))
@ -420,33 +383,49 @@ message("microorganisms renamed: ", sum(!MOs.old$fullname %in% microorganisms.ol
# class <mo>
class(MOs$mo) <- c("mo", "character")
class(MOs.translation$mo_new) <- c("mo", "character")
microorganisms <- MOs
microorganisms.old <- MOs.old
# microorganisms.translation <- MOs.translation
# --- Moraxella catarrhalis was named Branhamella catarrhalis (Catlin, 1970), but this is unaccepted in clinical microbiology
# we keep them both
microorganisms <- microorganisms %>%
bind_rows(microorganisms %>%
filter(fullname == "Branhamella catarrhalis") %>%
mutate(mo = "B_MRXLL_CTRR",
fullname = "Moraxella catarrhalis",
genus = "Moraxella",
ref = "Henriksen et al., 1968",
species_id = "a374f6f0868e05f9c0f5077b60ee0a6c",
snomed = as.list(24226003))) %>%
arrange(fullname) %>%
df_remove_nonASCII()
microorganisms.old <- microorganisms.old %>%
filter(fullname != "Moraxella catarrhalis")
# ---
# (this would be a great moment to run data-raw/snomed.R as well)
# on the server, do:
usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")
usethis::use_data(microorganisms.old, overwrite = TRUE, version = 2)
# saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2)
usethis::use_data(microorganisms.old, overwrite = TRUE, version = 2, compress = "xz")
rm(microorganisms)
rm(microorganisms.old)
rm(microorganisms.translation)
# to save microorganisms.translation internally to the package
devtools::load_all(".")
source("data-raw/_internals.R")
# DON'T FORGET TO UPDATE R/globals.R!
# load new data sets
devtools::load_all(".")
# reset previously changed mo codes
rsi_translation$mo <- as.mo(rsi_translation$mo, language = NULL)
usethis::use_data(rsi_translation, overwrite = TRUE, version = 2)
usethis::use_data(rsi_translation, overwrite = TRUE, version = 2, compress = "xz")
rm(rsi_translation)
microorganisms.codes$mo <- as.mo(microorganisms.codes$mo, language = NULL)
usethis::use_data(microorganisms.codes, overwrite = TRUE, version = 2)
# new NAs introduced?
any(is.na(microorganisms.codes$mo))
usethis::use_data(microorganisms.codes, overwrite = TRUE, version = 2, compress = "xz")
rm(microorganisms.codes)
example_isolates$mo <- as.mo(example_isolates$mo, language = NULL)

BIN
data-raw/rsi_translation.dta

BIN
data-raw/rsi_translation.sas

BIN
data-raw/rsi_translation.sav

7
data-raw/snomed.R

@ -40,6 +40,7 @@ vctr <- unique(unlist(strsplit(c(microorganisms$fullname, microorganisms.old$ful
vctr <- tolower(vctr[vctr %like% "^[a-z]+$"])
# remove all parts of the name that are no valid values in genera, species or subspecies
# this takes ~20 seconds
snomed <- snomed %>%
mutate(fullname = vapply(FUN.VALUE = character(1),
# split on space and/or comma
@ -53,6 +54,8 @@ snomed_keep <- snomed %>%
group_by(fullname_lower = fullname) %>%
summarise(snomed = list(snomed))
message(nrow(snomed_keep), " MO's will get a SNOMED code.")
# save to microorganisms data set
microorganisms <- microorganisms %>%
# remove old snomed
@ -64,6 +67,8 @@ microorganisms <- microorganisms %>%
# remove dummy var
select(-fullname_lower) %>%
AMR:::dataset_UTF8_to_ASCII()
usethis::use_data(microorganisms, overwrite = TRUE, compress = "xz")
# don't forget to update the version number in SNOMED_VERSION in ./R/globals.R!
# usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")

BIN
data/example_isolates.rda

BIN
data/intrinsic_resistant.rda

BIN
data/microorganisms.codes.rda

BIN
data/microorganisms.old.rda

BIN
data/microorganisms.rda

BIN
data/rsi_translation.rda

4
docs/404.html

@ -43,7 +43,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9030</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9051</span>
</span>
</div>
@ -205,7 +205,7 @@ Content not found. Please use links in the navbar.
<footer><div class="copyright">
<p></p>
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/" class="external-link">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/" class="external-link">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/" class="external-link">Alexander W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/" class="external-link">Bhanu N. M. Sinha</a>, <a href="https://www.rug.nl/staff/c.j.albers/" class="external-link">Casper J. Albers</a>, <a href="https://www.rug.nl/staff/c.glasner/" class="external-link">Corinna Glasner</a>.</p>
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/" class="external-link">Matthijs S. Berends</a>, Christian F. Luz.</p>
</div>
<div class="pkgdown">

2
docs/LICENSE-text.html

@ -92,7 +92,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9040</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9051</span>
</span>
</div>

2
docs/articles/AMR.html

@ -193,7 +193,7 @@
<h4 data-toc-skip class="date">04 October 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
</div>

2
docs/articles/EUCAST.html

@ -191,7 +191,7 @@
<h1 data-toc-skip>How to apply EUCAST rules</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/EUCAST.Rmd" class="external-link"><code>vignettes/EUCAST.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/EUCAST.Rmd" class="external-link"><code>vignettes/EUCAST.Rmd</code></a></small>
<div class="hidden name"><code>EUCAST.Rmd</code></div>
</div>

2
docs/articles/MDR.html

@ -191,7 +191,7 @@
<h1 data-toc-skip>How to determine multi-drug resistance (MDR)</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/MDR.Rmd" class="external-link"><code>vignettes/MDR.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/MDR.Rmd" class="external-link"><code>vignettes/MDR.Rmd</code></a></small>
<div class="hidden name"><code>MDR.Rmd</code></div>
</div>

2
docs/articles/PCA.html

@ -191,7 +191,7 @@
<h1 data-toc-skip>How to conduct principal component analysis (PCA) for AMR</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/PCA.Rmd" class="external-link"><code>vignettes/PCA.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/PCA.Rmd" class="external-link"><code>vignettes/PCA.Rmd</code></a></small>
<div class="hidden name"><code>PCA.Rmd</code></div>
</div>

6
docs/articles/SPSS.html

@ -193,7 +193,7 @@
<h4 data-toc-skip class="date">29 August 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="hidden name"><code>SPSS.Rmd</code></div>
</div>
@ -287,10 +287,10 @@
<a href="#rstudio" class="anchor" aria-hidden="true"></a>RStudio</h3>
<p>To work with R, probably the best option is to use <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio</a>. It is an open-source and free desktop environment which not only allows you to run R code, but also supports project management, version management, package management and convenient import menus to work with other data sources. You can also install <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio Server</a> on a private or corporate server, which brings nothing less than the complete RStudio software to you as a website (at home or at work).</p>
<p>To import a data file, just click <em>Import Dataset</em> in the Environment tab:</p>
<p><img src="https://github.com/msberends/AMR/raw/master/docs/import1.png"></p>
<p><img src="https://github.com/msberends/AMR/raw/main/docs/import1.png"></p>
<p>If additional packages are needed, RStudio will ask you if they should be installed on beforehand.</p>
<p>In the the window that opens, you can define all options (parameters) that should be used for import and you’re ready to go:</p>
<p><img src="https://github.com/msberends/AMR/raw/master/docs/import2.png"></p>
<p><img src="https://github.com/msberends/AMR/raw/main/docs/import2.png"></p>
<p>If you want named variables to be imported as factors so it resembles SPSS more, use <code><a href="https://haven.tidyverse.org/reference/as_factor.html" class="external-link">as_factor()</a></code>.</p>
<p>The difference is this:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">

2
docs/articles/WHONET.html

@ -191,7 +191,7 @@
<h1 data-toc-skip>How to work with WHONET data</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/WHONET.Rmd" class="external-link"><code>vignettes/WHONET.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/WHONET.Rmd" class="external-link"><code>vignettes/WHONET.Rmd</code></a></small>
<div class="hidden name"><code>WHONET.Rmd</code></div>
</div>

2
docs/articles/benchmarks.html

@ -191,7 +191,7 @@
<h1 data-toc-skip>Benchmarks</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/benchmarks.Rmd" class="external-link"><code>vignettes/benchmarks.Rmd</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/benchmarks.Rmd" class="external-link"><code>vignettes/benchmarks.Rmd</code></a></small>
<div class="hidden name"><code>benchmarks.Rmd</code></div>
</div>

106
docs/articles/datasets.html

@ -44,7 +44,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9050</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9051</span>
</span>
</div>
@ -190,7 +190,7 @@
<div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">05 October 2021</h4>
<h4 data-toc-skip class="date">06 October 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div>
@ -207,22 +207,22 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<div id="microorganisms-currently-accepted-names" class="section level2">
<h2 class="hasAnchor">
<a href="#microorganisms-currently-accepted-names" class="anchor" aria-hidden="true"></a>Microorganisms (currently accepted names)</h2>
<p>A data set with 70,026 rows and 16 columns, containing the following column names:<br><em>mo</em>, <em>fullname</em>, <em>kingdom</em>, <em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>, <em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>, <em>ref</em>, <em>species_id</em>, <em>source</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>A data set with 70,760 rows and 16 columns, containing the following column names:<br><em>mo</em>, <em>fullname</em>, <em>kingdom</em>, <em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>, <em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>, <em>ref</em>, <em>species_id</em>, <em>source</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 11 March 2021 20:59:32 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p>It was last updated on 6 October 2021 09:31:11 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.rds" class="external-link">R file</a> (2.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.rds" class="external-link">R file</a> (2.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.xlsx" class="external-link">Excel file</a> (6.4 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.xlsx" class="external-link">Excel file</a> (6.4 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.txt" class="external-link">plain text file</a> (14.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.txt" class="external-link">plain text file</a> (14.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sas" class="external-link">SAS file</a> (27.4 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sas" class="external-link">SAS file</a> (30.7 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sav" class="external-link">SPSS file</a> (27.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sav" class="external-link">SPSS file</a> (18 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.dta" class="external-link">Stata file</a> (25.1 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.dta" class="external-link">Stata file</a> (29.2 MB)</li>
</ul>
<p><strong>NOTE: The exported files for SAS, SPSS and Stata do not contain SNOMED codes, as their file size would exceed 100 MB; the file size limit of GitHub.</strong> Advice? Use R instead.</p>
<div id="source" class="section level3">
@ -233,7 +233,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<li>
<a href="http://www.catalogueoflife.org" class="external-link">Catalogue of Life</a> (included version: 2019)</li>
<li>
<a href="https://lpsn.dsmz.de" class="external-link">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, last updated: March 2021)</li>
<a href="https://lpsn.dsmz.de" class="external-link">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, last updated: 5 October 2021)</li>
<li>US Edition of SNOMED CT from 1 September 2020, retrieved from the <a href="https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.1009" class="external-link">Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS)</a>, OID 2.16.840.1.114222.4.11.1009, version 12</li>
</ul>
</div>
@ -261,7 +261,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
</tr>
<tr class="even">
<td align="center">Bacteria</td>
<td align="center">22,118</td>
<td align="center">22,852</td>
</tr>
<tr class="odd">
<td align="center">Chromista</td>
@ -427,23 +427,23 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<div id="microorganisms-previously-accepted-names" class="section level2">
<h2 class="hasAnchor">
<a href="#microorganisms-previously-accepted-names" class="anchor" aria-hidden="true"></a>Microorganisms (previously accepted names)</h2>
<p>A data set with 14,100 rows and 4 columns, containing the following column names:<br><em>fullname</em>, <em>fullname_new</em>, <em>ref</em> and <em>prevalence</em>.</p>
<p>A data set with 14,338 rows and 4 columns, containing the following column names:<br><em>fullname</em>, <em>fullname_new</em>, <em>ref</em> and <em>prevalence</em>.</p>
<p><strong>Note:</strong> remember that the ‘ref’ columns contains the scientific reference to the old taxonomic entries, i.e. of column <em>‘fullname’</em>. For the scientific reference of the new names, i.e. of column <em>‘fullname_new’</em>, see the <code>microorganisms</code> data set.</p>
<p>This data set is in R available as <code>microorganisms.old</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 5 March 2021 09:46:55 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p>It was last updated on 5 October 2021 13:12:28 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.rds" class="external-link">R file</a> (0.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.rds" class="external-link">R file</a> (0.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.xlsx" class="external-link">Excel file</a> (0.5 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.xlsx" class="external-link">Excel file</a> (0.5 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.txt" class="external-link">plain text file</a> (0.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.txt" class="external-link">plain text file</a> (1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sas" class="external-link">SAS file</a> (2.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.sas" class="external-link">SAS file</a> (2.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sav" class="external-link">SPSS file</a> (2.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.sav" class="external-link">SPSS file</a> (1.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.dta" class="external-link">Stata file</a> (2 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.dta" class="external-link">Stata file</a> (2 MB)</li>
</ul>
<div id="source-1" class="section level3">
<h3 class="hasAnchor">
@ -453,7 +453,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<li>
<a href="http://www.catalogueoflife.org" class="external-link">Catalogue of Life</a> (included version: 2019)</li>
<li>
<a href="https://lpsn.dsmz.de" class="external-link">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, last updated: March 2021)</li>
<a href="https://lpsn.dsmz.de" class="external-link">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, last updated: 5 October 2021)</li>
</ul>
</div>
<div id="example-content-1" class="section level3">
@ -498,17 +498,17 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<p>It was last updated on 2 September 2021 11:50:06 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.rds" class="external-link">R file</a> (32 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.rds" class="external-link">R file</a> (32 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.xlsx" class="external-link">Excel file</a> (65 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.xlsx" class="external-link">Excel file</a> (65 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.txt" class="external-link">plain text file</a> (0.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.txt" class="external-link">plain text file</a> (0.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.sas" class="external-link">SAS file</a> (1.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sas" class="external-link">SAS file</a> (1.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.sav" class="external-link">SPSS file</a> (0.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sav" class="external-link">SPSS file</a> (0.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antibiotics.dta" class="external-link">Stata file</a> (0.3 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.dta" class="external-link">Stata file</a> (0.3 MB)</li>
</ul>
<div id="source-2" class="section level3">
<h3 class="hasAnchor">
@ -666,17 +666,17 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<p>It was last updated on 29 August 2020 19:53:07 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.rds" class="external-link">R file</a> (5 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.rds" class="external-link">R file</a> (5 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.xlsx" class="external-link">Excel file</a> (14 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.xlsx" class="external-link">Excel file</a> (14 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.txt" class="external-link">plain text file</a> (16 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.txt" class="external-link">plain text file</a> (16 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.sas" class="external-link">SAS file</a> (80 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sas" class="external-link">SAS file</a> (80 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.sav" class="external-link">SPSS file</a> (68 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sav" class="external-link">SPSS file</a> (68 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/antivirals.dta" class="external-link">Stata file</a> (67 kB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.dta" class="external-link">Stata file</a> (67 kB)</li>
</ul>
<div id="source-3" class="section level3">
<h3 class="hasAnchor">
@ -790,20 +790,20 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<a href="#intrinsic-bacterial-resistance" class="anchor" aria-hidden="true"></a>Intrinsic bacterial resistance</h2>
<p>A data set with 93,892 rows and 2 columns, containing the following column names:<br><em>microorganism</em> and <em>antibiotic</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 5 March 2021 09:46:55 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p>It was last updated on 6 October 2021 08:29:50 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">R file</a> (69 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">R file</a> (69 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.xlsx" class="external-link">Excel file</a> (0.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.xlsx" class="external-link">Excel file</a> (0.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.txt" class="external-link">plain text file</a> (3.5 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.txt" class="external-link">plain text file</a> (3.5 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.sas" class="external-link">SAS file</a> (7.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sas" class="external-link">SAS file</a> (7.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.sav" class="external-link">SPSS file</a> (7.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sav" class="external-link">SPSS file</a> (5.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.dta" class="external-link">Stata file</a> (7 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.dta" class="external-link">Stata file</a> (7 MB)</li>
</ul>
<div id="source-4" class="section level3">
<h3 class="hasAnchor">
@ -1005,20 +1005,20 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<a href="#interpretation-from-mic-values-disk-diameters-to-rsi" class="anchor" aria-hidden="true"></a>Interpretation from MIC values / disk diameters to R/SI</h2>
<p>A data set with 22,000 rows and 10 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 12 July 2021 10:54:20 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>It was last updated on 5 October 2021 13:13:41 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds" class="external-link">R file</a> (37 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.rds" class="external-link">R file</a> (37 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Excel file</a> (0.7 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Excel file</a> (0.7 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.txt" class="external-link">plain text file</a> (1.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.txt" class="external-link">plain text file</a> (1.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sas" class="external-link">SAS file</a> (3.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sas" class="external-link">SAS file</a> (3.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sav" class="external-link">SPSS file</a> (2.4 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sav" class="external-link">SPSS file</a> (2.4 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.dta" class="external-link">Stata file</a> (3.5 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.dta" class="external-link">Stata file</a> (3.5 MB)</li>
</ul>
<div id="source-5" class="section level3">
<h3 class="hasAnchor">
@ -1138,17 +1138,17 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<p>It was last updated on 25 January 2021 20:58:20 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.rds" class="external-link">R file</a> (3 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.rds" class="external-link">R file</a> (3 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.xlsx" class="external-link">Excel file</a> (14 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.xlsx" class="external-link">Excel file</a> (14 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.txt" class="external-link">plain text file</a> (15 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.txt" class="external-link">plain text file</a> (15 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.sas" class="external-link">SAS file</a> (52 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sas" class="external-link">SAS file</a> (52 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.sav" class="external-link">SPSS file</a> (45 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sav" class="external-link">SPSS file</a> (45 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/dosage.dta" class="external-link">Stata file</a> (44 kB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.dta" class="external-link">Stata file</a> (44 kB)</li>
</ul>
<div id="source-6" class="section level3">
<h3 class="hasAnchor">

2
docs/articles/index.html

@ -92,7 +92,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9048</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9051</span>
</span>
</div&