AMR package is a free and open-source R package with zero dependencies 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 - waiting for copy-editing to finish).
After installing this package, R knows ~71,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. 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, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen. This R package formed the basis of two PhD theses (DOI 10.33612/diss.177417131 and DOI 10.33612/diss.192486375) but is actively and durably maintained by two public healthcare organisations in the Netherlands.
Since its first public release in early 2018, this R package has been used in almost all countries in the world. Click the map to enlarge and to see the country names.
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.
# AMR works great with dplyr, but it's not required or neccesary library(AMR) library(dplyr) example_isolates %>% mutate(bacteria = mo_fullname()) %>% filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>% select(bacteria, aminoglycosides(), carbapenems())
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (
mo_is_intrinsic_resistant()) and a column selection on two antibiotic groups (
carbapenems()), the reference data about all microorganisms and all antibiotics in the
AMR package make sure you get what you meant:
A base R equivalent would be:
example_isolates$bacteria <- mo_fullname(example_isolates$mo) example_isolates[which(mo_is_gram_negative() & mo_is_intrinsic_resistant(ab = "cefotax")), c("bacteria", aminoglycosides(), carbapenems())]
This base R snippet will work in any version of R since April 2013 (R-3.0).
This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for:
- Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life and List of Prokaryotic names with Standing in Nomenclature (manual)
- Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines (manual)
- Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records (manual)
- Determining first isolates to be used for AMR data analysis (manual)
- Calculating antimicrobial resistance (tutorial)
- Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) (tutorial)
- Calculating (empirical) susceptibility of both mono therapy and combination therapies (tutorial)
- Predicting future antimicrobial resistance using regression models (tutorial)
- Getting properties for any microorganism (like Gram stain, species, genus or family) (manual)
- Getting properties for any antibiotic (like name, code of EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name) (manual)
- Plotting antimicrobial resistance (tutorial)
- Applying EUCAST expert rules (manual)
- Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code (manual)
- Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code (manual)
- Machine reading the EUCAST and CLSI guidelines from 2011-2021 to translate MIC values and disk diffusion diameters to R/SI (link)
- Principal component analysis for AMR (tutorial)
This package is available here on the official R network (CRAN). Install this package in R from CRAN by using the command:
It will be downloaded and installed automatically. For RStudio, click on the menu Tools > Install Packages… and then type in “AMR” and press Install.
Note: Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.
Please read our Developer Guideline here.
The latest and unpublished development version can be installed from GitHub in two ways:
install.packages("remotes") # if you haven't already remotes::install_github("msberends/AMR")
After this, you can install and update this
AMRpackage like any official release (e.g., using
install.packages("AMR")or in RStudio via Tools > Check for Package Updates…).
This R package is free, open-source software and licensed under the GNU General Public License v2.0 (GPL-2). In a nutshell, this means that this package:
May be used for commercial purposes
May be used for private purposes
May not be used for patent purposes
May be modified, although:
- Modifications must be released under the same license when distributing the package
- Changes made to the code must be documented
May be distributed, although:
- Source code must be made available when the package is distributed
- A copy of the license and copyright notice must be included with the package.
Comes with a LIMITATION of liability
Comes with NO warranty