Epidemiology Codexery

AMR (R package)

Open-source R package for antimicrobial resistance data analysis.

Last updated

AMR is a free, open-source R package built to streamline the analysis of antimicrobial resistance (AMR) data. It was created to establish a reproducible standard for such work, supporting surveillance and treatment evaluation in both clinics and research.

Since its first CRAN release in early 2018, download logs show it has been used in over 175 countries. The package is now applied in clinical, veterinary, and environmental microbiology settings globally. Studies using it have covered national paediatric bloodstream infection surveillance, population-wide AMR burden analysis, companion animal MRSA tracking across veterinary practices, environmental resistance gene screening in fresh produce, and a review of clinical AMR surveillance tools.

Initial development

The package was initially developed at the University of Groningen and the University Medical Center Groningen (UMCG) in the Netherlands. A peer-reviewed paper describing the work appeared in the Journal of Statistical Software, and the project formed the basis of two PhD theses at the University of Groningen. According to CRAN, AMR depends on other R packages like dplyr, tidyr, ggplot2, and rlang, and recent versions require R >= 3.5 or higher.

Background

Antimicrobial resistance is recognized by the World Health Organization as a major global public health threat. Laboratories routinely test microorganisms for resistance, and the resulting data must be reported and analyzed from local hospitals to international surveillance networks.

Before AMR, no standardized open-source tools existed to process and analyze these data reproducibly. Data from laboratory information systems often require extensive cleaning and validation, and meaningful interpretation depends on up-to-date reference data like microbial taxonomy and clinical breakpoint guidelines. AMR was designed to fill this gap by integrating relevant international guidelines and reference data directly into the analysis workflow.

Functionality

The package provides tools for core AMR data analysis tasks. It includes a built-in taxonomic database of microbial species, drawing on sources such as the List of Prokaryotic names with Standing in Nomenclature (LPSN), the Global Biodiversity Information Facility (GBIF), and MycoBank, allowing users to standardize microorganism names and properties.

Core Functionality & Reference Data Integration

At its heart, AMR bundles several interlocking capabilities that cover the full arc of susceptibility data analysis. A built-in taxonomic database draws on the List of Prokaryotic names with Standing in Nomenclature, the Global Biodiversity Information Facility, and MycoBank, letting users standardise microorganism names and properties with a single lookup. A comprehensive catalogue of antimicrobial and antiviral agents is linked to multiple international coding systems, including ATC, EARS-Net, PubChem, LOINC, and SNOMED CT.

Perhaps most critically, the package integrates clinical breakpoint guidelines from both CLSI and EUCAST, spanning multiple years of published guidance and extending to veterinary breakpoints and epidemiological cut-off values. These resources let raw laboratory measurements—minimum inhibitory concentrations and disk diffusion diameters—be translated into standardised susceptibility categories. Beyond interpretation, the package supports identifying first isolates per patient, generating antibiograms including WISCA, flagging multi-drug resistant organisms, and computing resistance proportions.

It can ingest data in any format, including exports from the WHO's WHONET software, and all reference data sets are downloadable in Excel, Apache Parquet, SPSS, Stata, and plain text.

Custom Data Types & Technical Architecture

One of AMR's most distinctive technical contributions is the introduction of a family of new S3 data classes into the R ecosystem. These include mo for microorganism codes, ab for antimicrobial drug codes, sir for susceptibility interpretation results, mic for minimum inhibitory concentrations, and disk for disk diffusion diameters. Each class carries its own validation logic and intelligent coercion rules, so that a mis-typed species code, for example, is caught early rather than propagating silently through a pipeline.

The classes also integrate smoothly with common R workflows, meaning users can pipe AMR objects through tidyverse or base R operations without losing type information. Architecturally, the package is deliberately lightweight: according to CRAN, it carries no external dependencies and remains compatible with R versions dating back to R-3.0, released in April 2013.

This minimal footprint makes it easy to install in resource-constrained settings. For users who prefer Python, a wrapper package runs the AMR R package natively within Python, follows identical version numbering, and is built automatically alongside the R release. The entire project is distributed under the GNU General Public License version 2.0.

Global Adoption & Real-World Applications

Since its first public appearance on CRAN in early 2018, AMR has achieved a geographic reach that is remarkable for a specialised statistical tool. CRAN download logs record installations from more than 175 countries, and the package has been adopted across clinical, veterinary, and environmental microbiology settings worldwide. The breadth of published work using it illustrates this range: national paediatric bloodstream infection surveillance programmes have relied on it, as have population-wide analyses of AMR burden.

In veterinary medicine, companion animal MRSA surveillance spanning multiple practices has employed the package, while in environmental science it has been used for resistance gene screening in fresh produce. A perspective article on clinical AMR surveillance tools also featured AMR as a reference implementation. The package's design philosophy—free, open-source, reproducible, and standardised—has made it a practical choice for laboratories and public-health agencies that need to move from raw susceptibility data to actionable surveillance outputs without assembling a bespoke pipeline.

Its adoption across such diverse settings underscores how a well-constructed open-source tool can become infrastructure for a global public-health challenge.

Frequently Asked Questions

What is the AMR R package?

It is a free, open-source R package purpose-built to give researchers a standardized, reproducible workflow for analyzing antimicrobial resistance data. It first appeared on CRAN in early 2018 and has since become a go-to tool in bioinformatics circles.

How widely is the AMR R package used in practice?

CRAN download logs show the package has been pulled in from more than 175 countries. That global footprint reflects its adoption in hospital labs, research groups, and public-health surveillance programs worldwide.

Is the AMR R package free, and under what license?

Yes—it is fully open-source and distributed under the GNU General Public License v2.0 (GPL-2). Anyone can install it directly from R's CRAN repository at no cost.

More in Epidemiology

Sources

Compiled from Wikipedia and the sources listed below. Text from Wikipedia is available under CC BY-SA 4.0; this entry is adapted from it.

Spotted an error? Know more?

Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced

Comments

Loading…
Open in the interactive codex →