mirror of
https://github.com/msberends/AMR.git
synced 2025-12-15 23:10:28 +01:00
Built site for AMR@3.0.1.9003: ba30b08
This commit is contained in:
960
llms.txt
Normal file
960
llms.txt
Normal file
@@ -0,0 +1,960 @@
|
||||
# The `AMR` Package for R
|
||||
|
||||
- Provides an **all-in-one solution** for antimicrobial resistance (AMR)
|
||||
data analysis in a One Health approach
|
||||
- Peer-reviewed, used in over 175 countries, available in 28 languages
|
||||
- Generates **antibiograms** - traditional, combined, syndromic, and
|
||||
even WISCA
|
||||
- Provides the **full microbiological taxonomy** of ~79 000 distinct
|
||||
species and extensive info of ~620 antimicrobial drugs
|
||||
- Applies **CLSI 2011-2025** and **EUCAST 2011-2025** clinical and
|
||||
veterinary breakpoints, and ECOFFs, for MIC and disk zone
|
||||
interpretation
|
||||
- Corrects for duplicate isolates, **calculates** and **predicts** AMR
|
||||
per antimicrobial class
|
||||
- Integrates with **WHONET**, ATC, **EARS-Net**, PubChem, **LOINC**,
|
||||
**SNOMED CT**, and **NCBI**
|
||||
- 100% free of costs and dependencies, highly suitable for places with
|
||||
**limited resources**
|
||||
|
||||
> Now available for Python too! [Click
|
||||
> here](https://amr-for-r.org/articles/AMR_for_Python.md) to read more.
|
||||
|
||||
[amr-for-r.org](https://amr-for-r.org/)
|
||||
|
||||
[doi.org/10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)
|
||||
|
||||
[](https://amr-for-r.org/reference/clinical_breakpoints.html#response-from-clsi-and-eucast)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
## Introduction
|
||||
|
||||
The `AMR` package is a peer-reviewed, [free and open-source](#copyright)
|
||||
R package with [zero
|
||||
dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify
|
||||
the analysis and prediction of Antimicrobial Resistance (AMR) and to
|
||||
work with microbial and antimicrobial data and properties, by using
|
||||
evidence-based methods. **Our aim is to provide a standard** for clean
|
||||
and reproducible AMR data analysis, that can therefore empower
|
||||
epidemiological analyses to continuously enable surveillance and
|
||||
treatment evaluation in any setting. We are a team of [many different
|
||||
researchers](https://amr-for-r.org/authors.md) from around the globe to
|
||||
make this a successful and durable project!
|
||||
|
||||
This work was published in the Journal of Statistical Software (Volume
|
||||
104(3); [DOI
|
||||
10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and
|
||||
formed the basis of two PhD theses ([DOI
|
||||
10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and
|
||||
[DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)).
|
||||
|
||||
After installing this package, R knows [**~79 000 distinct microbial
|
||||
species**](https://amr-for-r.org/reference/microorganisms.md) (updated
|
||||
June 2024) and all [**~620 antimicrobial and antiviral
|
||||
drugs**](https://amr-for-r.org/reference/antimicrobials.md) by name and
|
||||
code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED
|
||||
CT), and knows all about valid SIR and MIC values. The integral clinical
|
||||
breakpoint guidelines from CLSI 2011-2025 and EUCAST 2011-2025 are
|
||||
included, even with epidemiological cut-off (ECOFF) values. It supports
|
||||
and can read any data format, including WHONET data. This package works
|
||||
on Windows, macOS and Linux with all versions of R since R-3.0 (April
|
||||
2013). **It was designed to work in any setting, including those with
|
||||
very limited resources**. It was created for both routine data analysis
|
||||
and academic research at the Faculty of Medical Sciences of the
|
||||
[University of Groningen](https://www.rug.nl) and the [University
|
||||
Medical Center Groningen](https://www.umcg.nl).
|
||||
|
||||
### Used in over 175 countries, available in 28 languages
|
||||
|
||||
[](https://amr-for-r.org/countries_large.png)
|
||||
|
||||
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.
|
||||
|
||||
With the help of contributors from all corners of the world, the `AMR`
|
||||
package is available in  English, 
|
||||
Arabic,  Bengali,  Chinese,
|
||||
 Czech,  Danish,  Dutch,
|
||||
 Finnish,  French, 
|
||||
German,  Greek,  Hindi, 
|
||||
Indonesian,  Italian,  Japanese,
|
||||
 Korean,  Norwegian, 
|
||||
Polish,  Portuguese,  Romanian,
|
||||
 Russian,  Spanish, 
|
||||
Swahili,  Swedish,  Turkish,
|
||||
 Ukrainian,  Urdu, and 
|
||||
Vietnamese. Antimicrobial drug (group) names and colloquial
|
||||
microorganism names are provided in these languages.
|
||||
|
||||
## Practical examples
|
||||
|
||||
### Filtering and selecting data
|
||||
|
||||
One of the most powerful functions of this package, aside from
|
||||
calculating and plotting AMR, is selecting and filtering based on
|
||||
antimicrobial columns. This can be done using the so-called
|
||||
[antimicrobial
|
||||
selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html),
|
||||
which work in base R, `dplyr` and `data.table`.
|
||||
|
||||
``` r
|
||||
# AMR works great with dplyr, but it's not required or neccesary
|
||||
library(AMR)
|
||||
library(dplyr, warn.conflicts = FALSE)
|
||||
|
||||
example_isolates %>%
|
||||
mutate(bacteria = mo_fullname()) %>%
|
||||
# filtering functions for microorganisms:
|
||||
filter(mo_is_gram_negative(),
|
||||
mo_is_intrinsic_resistant(ab = "cefotax")) %>%
|
||||
# antimicrobial selectors:
|
||||
select(bacteria,
|
||||
aminoglycosides(),
|
||||
carbapenems())
|
||||
#> ℹ Using column 'mo' as input for `mo_fullname()`
|
||||
#> ℹ Using column 'mo' as input for `mo_is_gram_negative()`
|
||||
#> ℹ Using column 'mo' as input for `mo_is_intrinsic_resistant()`
|
||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
||||
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
#> # A tibble: 35 × 7
|
||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||
#> 1 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 2 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 3 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 4 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 5 Pseudomonas aeruginosa S S S R S S
|
||||
#> 6 Pseudomonas aeruginosa S S S R S S
|
||||
#> 7 Stenotrophomonas maltophilia R R R R R R
|
||||
#> 8 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 9 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 10 Pseudomonas aeruginosa S S S R S S
|
||||
#> # ℹ 25 more rows
|
||||
```
|
||||
|
||||
With only having defined a row filter on Gram-negative bacteria with
|
||||
intrinsic resistance to cefotaxime
|
||||
([`mo_is_gram_negative()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
and
|
||||
[`mo_is_intrinsic_resistant()`](https://amr-for-r.org/reference/mo_property.md))
|
||||
and a column selection on two antibiotic groups
|
||||
([`aminoglycosides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
and
|
||||
[`carbapenems()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)),
|
||||
the reference data about [all
|
||||
microorganisms](https://amr-for-r.org/reference/microorganisms.md) and
|
||||
[all antimicrobials](https://amr-for-r.org/reference/antimicrobials.md)
|
||||
in the `AMR` package make sure you get what you meant.
|
||||
|
||||
### Generating antibiograms
|
||||
|
||||
The `AMR` package supports generating traditional, combined, syndromic,
|
||||
and even weighted-incidence syndromic combination antibiograms (WISCA).
|
||||
|
||||
If used inside [R Markdown](https://rmarkdown.rstudio.com) or
|
||||
[Quarto](https://quarto.org), the table will be printed in the right
|
||||
output format automatically (such as markdown, LaTeX, HTML, etc.).
|
||||
|
||||
``` r
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
```
|
||||
|
||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
|
||||
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
|
||||
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
|
||||
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
|
||||
| *K. pneumoniae* | NA | 90% (79-96%,N=58) | 100% (93-100%,N=51) | NA | 100% (93-100%,N=53) | 90% (79-96%,N=58) |
|
||||
| *P. aeruginosa* | NA | 100% (88-100%,N=30) | NA | 0% (0-12%,N=30) | NA | 100% (88-100%,N=30) |
|
||||
| *P. mirabilis* | NA | 94% (80-99%,N=34) | 94% (79-99%,N=32) | NA | NA | 94% (80-99%,N=34) |
|
||||
| *S. aureus* | NA | 99% (97-100%,N=233) | NA | NA | NA | 98% (92-100%,N=86) |
|
||||
| *S. epidermidis* | 0% (0-8%,N=44) | 79% (71-85%,N=163) | NA | 0% (0-8%,N=44) | NA | 51% (40-61%,N=89) |
|
||||
| *S. hominis* | NA | 92% (84-97%,N=80) | NA | NA | NA | 85% (74-93%,N=62) |
|
||||
| *S. pneumoniae* | 0% (0-3%,N=117) | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) |
|
||||
|
||||
In combination antibiograms, it is clear that combined antimicrobials
|
||||
yield higher empiric coverage:
|
||||
|
||||
``` r
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
mo_transform = "gramstain")
|
||||
```
|
||||
|
||||
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||
|:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
|
||||
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
|
||||
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
|
||||
|
||||
Like many other functions in this package,
|
||||
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) comes
|
||||
with support for 28 languages that are often detected automatically
|
||||
based on system language:
|
||||
|
||||
``` r
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("cipro", "tobra", "genta"), # any arbitrary name or code will work
|
||||
mo_transform = "gramstain",
|
||||
ab_transform = "name",
|
||||
language = "uk") # Ukrainian
|
||||
```
|
||||
|
||||
| Збудник | Гентаміцин | Тобраміцин | Ципрофлоксацин |
|
||||
|:--------------|:--------------------|:-------------------|:-------------------|
|
||||
| Грамнегативні | 96% (95-98%,N=684) | 96% (94-97%,N=686) | 91% (88-93%,N=684) |
|
||||
| Грампозитивні | 63% (60-66%,N=1170) | 34% (31-38%,N=665) | 77% (74-80%,N=724) |
|
||||
|
||||
### Interpreting and plotting MIC and SIR values
|
||||
|
||||
The `AMR` package allows interpretation of MIC and disk diffusion values
|
||||
based on CLSI and EUCAST. Moreover, the `ggplot2` package is extended
|
||||
with new scale functions, to allow plotting of log2-distributed MIC
|
||||
values and SIR values.
|
||||
|
||||
``` r
|
||||
library(ggplot2)
|
||||
library(AMR)
|
||||
|
||||
# generate some random values
|
||||
some_mic_values <- random_mic(size = 100)
|
||||
some_groups <- sample(LETTERS[1:5], 20, replace = TRUE)
|
||||
interpretation <- as.sir(some_mic_values,
|
||||
guideline = "EUCAST 2024",
|
||||
mo = "E. coli", # or any code or name resembling a known species
|
||||
ab = "Cipro") # or any code or name resembling an antibiotic
|
||||
|
||||
# create the plot
|
||||
ggplot(data.frame(mic = some_mic_values,
|
||||
group = some_groups,
|
||||
sir = interpretation),
|
||||
aes(x = group, y = mic, colour = sir)) +
|
||||
theme_minimal() +
|
||||
geom_boxplot(fill = NA, colour = "grey30") +
|
||||
geom_jitter(width = 0.25) +
|
||||
|
||||
# NEW scale function: plot MIC values to x, y, colour or fill
|
||||
scale_y_mic() +
|
||||
|
||||
# NEW scale function: write out S/I/R in any of the 20 supported languages
|
||||
# and set colourblind-friendly colours
|
||||
scale_colour_sir()
|
||||
```
|
||||
|
||||
[](https://amr-for-r.org/reference/plotting.md "Plotting Helpers for AMR Data Analysis")
|
||||
|
||||
### Calculating resistance per group
|
||||
|
||||
For a manual approach, you can use the `resistance` or
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
|
||||
function:
|
||||
|
||||
``` r
|
||||
example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
# calculate AMR using resistance() for gentamicin and tobramycin
|
||||
# and get their 95% confidence intervals using sir_confidence_interval():
|
||||
summarise(across(c(GEN, TOB),
|
||||
list(total_R = resistance,
|
||||
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
||||
#> # A tibble: 3 × 5
|
||||
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
|
||||
#> <chr> <dbl> <chr> <dbl> <chr>
|
||||
#> 1 Clinical 0.229 0.205-0.254 0.315 0.284-0.347
|
||||
#> 2 ICU 0.290 0.253-0.33 0.400 0.353-0.449
|
||||
#> 3 Outpatient 0.2 0.131-0.285 0.368 0.254-0.493
|
||||
```
|
||||
|
||||
Or use [antimicrobial
|
||||
selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html)
|
||||
to select a series of antibiotic columns:
|
||||
|
||||
``` r
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
|
||||
out <- example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||
resistance))
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `polymyxins()` using column 'COL' (colistin)
|
||||
#> Warning: There was 1 warning in `summarise()`.
|
||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||
#> Caused by warning:
|
||||
#> ! Introducing NA: only 23 results available for KAN in group: ward =
|
||||
#> "Outpatient" (`minimum` = 30).
|
||||
out
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward GEN TOB AMK KAN COL
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1 0.780
|
||||
#> 2 ICU 0.290 0.400 0.662 1 0.857
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889
|
||||
```
|
||||
|
||||
``` r
|
||||
# transform the antibiotic columns to names:
|
||||
out %>% set_ab_names()
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward gentamicin tobramycin amikacin kanamycin colistin
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1 0.780
|
||||
#> 2 ICU 0.290 0.400 0.662 1 0.857
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889
|
||||
```
|
||||
|
||||
``` r
|
||||
# transform the antibiotic column to ATC codes:
|
||||
out %>% set_ab_names(property = "atc")
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward J01GB03 J01GB01 J01GB06 J01GB04 J01XB01
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1 0.780
|
||||
#> 2 ICU 0.290 0.400 0.662 1 0.857
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889
|
||||
```
|
||||
|
||||
## What else can you do with this package?
|
||||
|
||||
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 List of Prokaryotic names
|
||||
with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the
|
||||
Global Biodiversity Information Facility
|
||||
([GBIF](https://www.gbif.org))
|
||||
([manual](https://amr-for-r.org/reference/mo_property.md))
|
||||
- Interpreting raw MIC and disk diffusion values, based on any CLSI or
|
||||
EUCAST guideline ([manual](https://amr-for-r.org/reference/as.sir.md))
|
||||
- Retrieving antimicrobial drug names, doses and forms of administration
|
||||
from clinical health care records
|
||||
([manual](https://amr-for-r.org/reference/ab_from_text.md))
|
||||
- Determining first isolates to be used for AMR data analysis
|
||||
([manual](https://amr-for-r.org/reference/first_isolate.md))
|
||||
- Calculating antimicrobial resistance
|
||||
([tutorial](https://amr-for-r.org/articles/AMR.md))
|
||||
- Determining multi-drug resistance (MDR) / multi-drug resistant
|
||||
organisms (MDRO) ([tutorial](https://amr-for-r.org/reference/mdro.md))
|
||||
- Calculating (empirical) susceptibility of both mono therapy and
|
||||
combination therapies
|
||||
([tutorial](https://amr-for-r.org/articles/AMR.md))
|
||||
- Apply AMR functions in predictive modelling
|
||||
([tutorial](https://amr-for-r.org/articles/AMR_with_tidymodels.md))
|
||||
- Getting properties for any microorganism (like Gram stain, species,
|
||||
genus or family)
|
||||
([manual](https://amr-for-r.org/reference/mo_property.md))
|
||||
- Getting properties for any antimicrobial (like name, code of
|
||||
EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name)
|
||||
([manual](https://amr-for-r.org/reference/ab_property.md))
|
||||
- Plotting antimicrobial resistance
|
||||
([tutorial](https://amr-for-r.org/articles/AMR.md))
|
||||
- Applying EUCAST expert rules
|
||||
([manual](https://amr-for-r.org/reference/eucast_rules.md))
|
||||
- Getting SNOMED codes of a microorganism, or getting properties of a
|
||||
microorganism based on a SNOMED code
|
||||
([manual](https://amr-for-r.org/reference/mo_property.md))
|
||||
- Getting LOINC codes of an antibiotic, or getting properties of an
|
||||
antibiotic based on a LOINC code
|
||||
([manual](https://amr-for-r.org/reference/ab_property.md))
|
||||
- Machine reading the EUCAST and CLSI guidelines from 2011-2021 to
|
||||
translate MIC values and disk diffusion diameters to SIR
|
||||
([link](https://amr-for-r.org/articles/datasets.md))
|
||||
- Principal component analysis for AMR
|
||||
([tutorial](https://amr-for-r.org/articles/PCA.md))
|
||||
|
||||
## Get this package
|
||||
|
||||
### Latest official version
|
||||
|
||||
[](https://cran.r-project.org/package=AMR)
|
||||
[](https://cran.r-project.org/package=AMR)
|
||||
|
||||
This package is available [here on the official R network
|
||||
(CRAN)](https://cran.r-project.org/package=AMR). Install this package in
|
||||
R from CRAN by using the command:
|
||||
|
||||
``` r
|
||||
install.packages("AMR")
|
||||
```
|
||||
|
||||
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 beta version.
|
||||
|
||||
### Latest beta version
|
||||
|
||||
[](https://github.com/msberends/AMR/actions/workflows/check-old-tinytest.yaml)
|
||||
[](https://github.com/msberends/AMR/actions/workflows/check-current-testthat.yaml)
|
||||
[](https://www.codefactor.io/repository/github/msberends/amr)
|
||||
[](https://codecov.io/gh/msberends/AMR?branch=main)
|
||||
|
||||
Please read our [Developer Guideline
|
||||
here](https://github.com/msberends/AMR/wiki/Developer-Guideline).
|
||||
|
||||
To install the latest and unpublished beta version:
|
||||
|
||||
``` r
|
||||
install.packages("AMR", repos = "beta.amr-for-r.org")
|
||||
|
||||
# if this does not work, try to install directly from GitHub using the 'remotes' package:
|
||||
remotes::install_github("msberends/AMR")
|
||||
```
|
||||
|
||||
## Get started
|
||||
|
||||
To find out how to conduct AMR data analysis, please [continue reading
|
||||
here to get started](https://amr-for-r.org/articles/AMR.md) or click a
|
||||
link in the [‘How to’ menu](https://amr-for-r.org/articles/).
|
||||
|
||||
## Partners
|
||||
|
||||
The initial development of this package was part of, related to, or made
|
||||
possible by the following non-profit organisations and initiatives:
|
||||
|
||||
[](https://www.rug.nl "University of Groningen")
|
||||
[](https://www.umcg.nl "University Medical Center Groningen")
|
||||
[](https://www.certe.nl "Certe Medical Diagnostics and Advice Foundation")
|
||||
[](https://www.deutschland-nederland.eu "EurHealth-1-Health")
|
||||
[](https://www.deutschland-nederland.eu "INTERREG")
|
||||
|
||||
## Copyright
|
||||
|
||||
This R package is free, open-source software and licensed under the [GNU
|
||||
General Public License v2.0
|
||||
(GPL-2)](https://amr-for-r.org/LICENSE-text.md). 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
|
||||
|
||||
# Package index
|
||||
|
||||
## Introduction to the package
|
||||
|
||||
Please find the introduction to (and some general information about) our
|
||||
package here.
|
||||
|
||||
- [`AMR-package`](https://amr-for-r.org/reference/AMR.md)
|
||||
[`AMR`](https://amr-for-r.org/reference/AMR.md) :
|
||||
|
||||
The `AMR` Package
|
||||
|
||||
## Preparing data: microorganisms
|
||||
|
||||
These functions are meant to get taxonomically valid properties of
|
||||
microorganisms from any input, but also properties derived from
|
||||
taxonomy, such as the Gram stain
|
||||
([`mo_gramstain()`](https://amr-for-r.org/reference/mo_property.md)) ,
|
||||
or [`mo_is_yeast()`](https://amr-for-r.org/reference/mo_property.md).
|
||||
Use [`mo_source()`](https://amr-for-r.org/reference/mo_source.md) to
|
||||
teach this package how to translate your own codes to valid
|
||||
microorganisms, and use
|
||||
[`add_custom_microorganisms()`](https://amr-for-r.org/reference/add_custom_microorganisms.md)
|
||||
to add your own custom microorganisms to this package.
|
||||
|
||||
- [`as.mo()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`is.mo()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`mo_uncertainties()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`mo_renamed()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`mo_failures()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`mo_reset_session()`](https://amr-for-r.org/reference/as.mo.md)
|
||||
[`mo_cleaning_regex()`](https://amr-for-r.org/reference/as.mo.md) :
|
||||
Transform Arbitrary Input to Valid Microbial Taxonomy
|
||||
- [`mo_name()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_fullname()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_shortname()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_subspecies()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_species()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_genus()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_family()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_order()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_class()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_phylum()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_kingdom()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_domain()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_type()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_status()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_pathogenicity()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_gramstain()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_is_gram_negative()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_is_gram_positive()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_is_yeast()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_is_intrinsic_resistant()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_oxygen_tolerance()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_is_anaerobic()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_snomed()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_ref()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_authors()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_year()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_lpsn()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_mycobank()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_gbif()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_rank()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_taxonomy()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_synonyms()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_current()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_group_members()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_info()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_url()`](https://amr-for-r.org/reference/mo_property.md)
|
||||
[`mo_property()`](https://amr-for-r.org/reference/mo_property.md) :
|
||||
Get Properties of a Microorganism
|
||||
- [`add_custom_microorganisms()`](https://amr-for-r.org/reference/add_custom_microorganisms.md)
|
||||
[`clear_custom_microorganisms()`](https://amr-for-r.org/reference/add_custom_microorganisms.md)
|
||||
: Add Custom Microorganisms
|
||||
- [`set_mo_source()`](https://amr-for-r.org/reference/mo_source.md)
|
||||
[`get_mo_source()`](https://amr-for-r.org/reference/mo_source.md) :
|
||||
User-Defined Reference Data Set for Microorganisms
|
||||
|
||||
## Preparing data: antimicrobials
|
||||
|
||||
Use these functions to get valid properties of antimicrobials from any
|
||||
input or to clean your input. You can even retrieve drug names and doses
|
||||
from clinical text records, using
|
||||
[`ab_from_text()`](https://amr-for-r.org/reference/ab_from_text.md).
|
||||
|
||||
- [`as.ab()`](https://amr-for-r.org/reference/as.ab.md)
|
||||
[`is.ab()`](https://amr-for-r.org/reference/as.ab.md)
|
||||
[`ab_reset_session()`](https://amr-for-r.org/reference/as.ab.md) :
|
||||
Transform Input to an Antibiotic ID
|
||||
- [`ab_name()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_cid()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_synonyms()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_tradenames()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_group()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_atc()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_atc_group1()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_atc_group2()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_loinc()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_ddd()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_ddd_units()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_info()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_url()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`ab_property()`](https://amr-for-r.org/reference/ab_property.md)
|
||||
[`set_ab_names()`](https://amr-for-r.org/reference/ab_property.md) :
|
||||
Get Properties of an Antibiotic
|
||||
- [`ab_from_text()`](https://amr-for-r.org/reference/ab_from_text.md) :
|
||||
Retrieve Antimicrobial Drug Names and Doses from Clinical Text
|
||||
- [`atc_online_property()`](https://amr-for-r.org/reference/atc_online.md)
|
||||
[`atc_online_groups()`](https://amr-for-r.org/reference/atc_online.md)
|
||||
[`atc_online_ddd()`](https://amr-for-r.org/reference/atc_online.md)
|
||||
[`atc_online_ddd_units()`](https://amr-for-r.org/reference/atc_online.md)
|
||||
: Get ATC Properties from WHOCC Website
|
||||
- [`add_custom_antimicrobials()`](https://amr-for-r.org/reference/add_custom_antimicrobials.md)
|
||||
[`clear_custom_antimicrobials()`](https://amr-for-r.org/reference/add_custom_antimicrobials.md)
|
||||
: Add Custom Antimicrobials
|
||||
|
||||
## Preparing data: antimicrobial results
|
||||
|
||||
With [`as.mic()`](https://amr-for-r.org/reference/as.mic.md) and
|
||||
[`as.disk()`](https://amr-for-r.org/reference/as.disk.md) you can
|
||||
transform your raw input to valid MIC or disk diffusion values. Use
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) for cleaning raw
|
||||
data to let it only contain “R”, “I” and “S”, or to interpret MIC or
|
||||
disk diffusion values as SIR based on the lastest EUCAST and CLSI
|
||||
guidelines. Afterwards, you can extend antibiotic interpretations by
|
||||
applying [EUCAST
|
||||
rules](https://www.eucast.org/expert_rules_and_intrinsic_resistance/)
|
||||
with
|
||||
[`eucast_rules()`](https://amr-for-r.org/reference/eucast_rules.md).
|
||||
|
||||
- [`as.sir()`](https://amr-for-r.org/reference/as.sir.md)
|
||||
[`NA_sir_`](https://amr-for-r.org/reference/as.sir.md)
|
||||
[`is.sir()`](https://amr-for-r.org/reference/as.sir.md)
|
||||
[`is_sir_eligible()`](https://amr-for-r.org/reference/as.sir.md)
|
||||
[`sir_interpretation_history()`](https://amr-for-r.org/reference/as.sir.md)
|
||||
: Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data
|
||||
- [`as.mic()`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`is.mic()`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`NA_mic_`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`rescale_mic()`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`mic_p50()`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`mic_p90()`](https://amr-for-r.org/reference/as.mic.md)
|
||||
[`droplevels(`*`<mic>`*`)`](https://amr-for-r.org/reference/as.mic.md)
|
||||
: Transform Input to Minimum Inhibitory Concentrations (MIC)
|
||||
- [`as.disk()`](https://amr-for-r.org/reference/as.disk.md)
|
||||
[`NA_disk_`](https://amr-for-r.org/reference/as.disk.md)
|
||||
[`is.disk()`](https://amr-for-r.org/reference/as.disk.md) : Transform
|
||||
Input to Disk Diffusion Diameters
|
||||
- [`eucast_rules()`](https://amr-for-r.org/reference/eucast_rules.md)
|
||||
[`eucast_dosage()`](https://amr-for-r.org/reference/eucast_rules.md) :
|
||||
Apply EUCAST Rules
|
||||
- [`custom_eucast_rules()`](https://amr-for-r.org/reference/custom_eucast_rules.md)
|
||||
: Define Custom EUCAST Rules
|
||||
|
||||
## Analysing data
|
||||
|
||||
Use these function for the analysis part. You can use
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) or
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md) on any
|
||||
antibiotic column. With
|
||||
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md), you
|
||||
can generate a traditional, combined, syndromic, or weighted-incidence
|
||||
syndromic combination antibiogram (WISCA). This function also comes with
|
||||
support for R Markdown and Quarto. Be sure to first select the isolates
|
||||
that are appropiate for analysis, by using
|
||||
[`first_isolate()`](https://amr-for-r.org/reference/first_isolate.md) or
|
||||
[`is_new_episode()`](https://amr-for-r.org/reference/get_episode.md).
|
||||
You can also filter your data on certain resistance in certain
|
||||
antibiotic classes
|
||||
([`carbapenems()`](https://amr-for-r.org/reference/antimicrobial_selectors.md),
|
||||
[`aminoglycosides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)),
|
||||
or determine multi-drug resistant microorganisms (MDRO,
|
||||
[`mdro()`](https://amr-for-r.org/reference/mdro.md)).
|
||||
|
||||
- [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
[`retrieve_wisca_parameters()`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
[`plot(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
[`autoplot(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
[`knit_print(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
: Generate Traditional, Combination, Syndromic, or WISCA Antibiograms
|
||||
|
||||
- [`resistance()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`sir_confidence_interval()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_R()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_IR()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_I()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_SI()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_S()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`proportion_df()`](https://amr-for-r.org/reference/proportion.md)
|
||||
[`sir_df()`](https://amr-for-r.org/reference/proportion.md) :
|
||||
Calculate Antimicrobial Resistance
|
||||
|
||||
- [`count_resistant()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_susceptible()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_S()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_SI()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_I()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_IR()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_R()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_all()`](https://amr-for-r.org/reference/count.md)
|
||||
[`n_sir()`](https://amr-for-r.org/reference/count.md)
|
||||
[`count_df()`](https://amr-for-r.org/reference/count.md) : Count
|
||||
Available Isolates
|
||||
|
||||
- [`get_episode()`](https://amr-for-r.org/reference/get_episode.md)
|
||||
[`is_new_episode()`](https://amr-for-r.org/reference/get_episode.md) :
|
||||
Determine Clinical or Epidemic Episodes
|
||||
|
||||
- [`first_isolate()`](https://amr-for-r.org/reference/first_isolate.md)
|
||||
[`filter_first_isolate()`](https://amr-for-r.org/reference/first_isolate.md)
|
||||
: Determine First Isolates
|
||||
|
||||
- [`key_antimicrobials()`](https://amr-for-r.org/reference/key_antimicrobials.md)
|
||||
[`all_antimicrobials()`](https://amr-for-r.org/reference/key_antimicrobials.md)
|
||||
[`antimicrobials_equal()`](https://amr-for-r.org/reference/key_antimicrobials.md)
|
||||
: (Key) Antimicrobials for First Weighted Isolates
|
||||
|
||||
- [`mdro()`](https://amr-for-r.org/reference/mdro.md)
|
||||
[`brmo()`](https://amr-for-r.org/reference/mdro.md)
|
||||
[`mrgn()`](https://amr-for-r.org/reference/mdro.md)
|
||||
[`mdr_tb()`](https://amr-for-r.org/reference/mdro.md)
|
||||
[`mdr_cmi2012()`](https://amr-for-r.org/reference/mdro.md)
|
||||
[`eucast_exceptional_phenotypes()`](https://amr-for-r.org/reference/mdro.md)
|
||||
: Determine Multidrug-Resistant Organisms (MDRO)
|
||||
|
||||
- [`custom_mdro_guideline()`](https://amr-for-r.org/reference/custom_mdro_guideline.md)
|
||||
[`c(`*`<custom_mdro_guideline>`*`)`](https://amr-for-r.org/reference/custom_mdro_guideline.md)
|
||||
: Define Custom MDRO Guideline
|
||||
|
||||
- [`bug_drug_combinations()`](https://amr-for-r.org/reference/bug_drug_combinations.md)
|
||||
[`format(`*`<bug_drug_combinations>`*`)`](https://amr-for-r.org/reference/bug_drug_combinations.md)
|
||||
: Determine Bug-Drug Combinations
|
||||
|
||||
- [`aminoglycosides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`aminopenicillins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`antifungals()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`antimycobacterials()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`betalactams()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`betalactams_with_inhibitor()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`carbapenems()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins_1st()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins_2nd()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins_3rd()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins_4th()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`cephalosporins_5th()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`fluoroquinolones()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`glycopeptides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`isoxazolylpenicillins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`lincosamides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`lipoglycopeptides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`macrolides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`monobactams()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`nitrofurans()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`oxazolidinones()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`penicillins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`phenicols()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`polymyxins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`quinolones()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`rifamycins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`streptogramins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`sulfonamides()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`tetracyclines()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`trimethoprims()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`ureidopenicillins()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`amr_class()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`amr_selector()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`administrable_per_os()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`administrable_iv()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
[`not_intrinsic_resistant()`](https://amr-for-r.org/reference/antimicrobial_selectors.md)
|
||||
: Antimicrobial Selectors
|
||||
|
||||
- [`top_n_microorganisms()`](https://amr-for-r.org/reference/top_n_microorganisms.md)
|
||||
:
|
||||
|
||||
Filter Top *n* Microorganisms
|
||||
|
||||
- [`mean_amr_distance()`](https://amr-for-r.org/reference/mean_amr_distance.md)
|
||||
[`amr_distance_from_row()`](https://amr-for-r.org/reference/mean_amr_distance.md)
|
||||
: Calculate the Mean AMR Distance
|
||||
|
||||
- [`resistance_predict()`](https://amr-for-r.org/reference/resistance_predict.md)
|
||||
[`sir_predict()`](https://amr-for-r.org/reference/resistance_predict.md)
|
||||
[`plot(`*`<resistance_predict>`*`)`](https://amr-for-r.org/reference/resistance_predict.md)
|
||||
[`ggplot_sir_predict()`](https://amr-for-r.org/reference/resistance_predict.md)
|
||||
[`autoplot(`*`<resistance_predict>`*`)`](https://amr-for-r.org/reference/resistance_predict.md)
|
||||
: Predict Antimicrobial Resistance
|
||||
|
||||
- [`guess_ab_col()`](https://amr-for-r.org/reference/guess_ab_col.md) :
|
||||
Guess Antibiotic Column
|
||||
|
||||
## Plotting data
|
||||
|
||||
Use these functions for the plotting part. The `scale_*_mic()` functions
|
||||
extend the ggplot2 package to allow plotting of MIC values, even within
|
||||
a manually set range. If using
|
||||
[`plot()`](https://amr-for-r.org/reference/plot.md) (base R) or
|
||||
[`autoplot()`](https://ggplot2.tidyverse.org/reference/autoplot.html)
|
||||
(ggplot2) on MIC values or disk diffusion values, the user can set the
|
||||
interpretation guideline to give the bars the right SIR colours. The
|
||||
[`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md) function
|
||||
is a short wrapper for users not much accustomed to ggplot2 yet. The
|
||||
[`ggplot_pca()`](https://amr-for-r.org/reference/ggplot_pca.md) function
|
||||
is a specific function to plot so-called biplots for PCA (principal
|
||||
component analysis).
|
||||
|
||||
- [`scale_x_mic()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_y_mic()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_colour_mic()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_fill_mic()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_x_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_colour_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_fill_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`plot(`*`<mic>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`autoplot(`*`<mic>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`plot(`*`<disk>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`autoplot(`*`<disk>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`plot(`*`<sir>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`autoplot(`*`<sir>`*`)`](https://amr-for-r.org/reference/plot.md)
|
||||
[`facet_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_y_percent()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_sir_colours()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`theme_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`labels_sir_count()`](https://amr-for-r.org/reference/plot.md) :
|
||||
Plotting Helpers for AMR Data Analysis
|
||||
|
||||
- [`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md)
|
||||
[`geom_sir()`](https://amr-for-r.org/reference/ggplot_sir.md) :
|
||||
|
||||
AMR Plots with `ggplot2`
|
||||
|
||||
- [`ggplot_pca()`](https://amr-for-r.org/reference/ggplot_pca.md) :
|
||||
|
||||
PCA Biplot with `ggplot2`
|
||||
|
||||
## AMR-specific options
|
||||
|
||||
The AMR package is customisable, by providing settings that can be set
|
||||
per user or per team. For example, the default interpretation guideline
|
||||
can be changed from EUCAST to CLSI, or a supported language can be set
|
||||
for the whole team (system-language independent) for antibiotic names in
|
||||
a foreign language.
|
||||
|
||||
- [`AMR-options`](https://amr-for-r.org/reference/AMR-options.md) :
|
||||
Options for the AMR package
|
||||
|
||||
## Other: antiviral drugs
|
||||
|
||||
This package also provides extensive support for antiviral agents, even
|
||||
though it is not the primary scope of this package. Working with data
|
||||
containing information about antiviral drugs was never easier. Use these
|
||||
functions to get valid properties of antiviral drugs from any input or
|
||||
to clean your input. You can even retrieve drug names and doses from
|
||||
clinical text records, using
|
||||
[`av_from_text()`](https://amr-for-r.org/reference/av_from_text.md).
|
||||
|
||||
- [`as.av()`](https://amr-for-r.org/reference/as.av.md)
|
||||
[`is.av()`](https://amr-for-r.org/reference/as.av.md) : Transform
|
||||
Input to an Antiviral Drug ID
|
||||
- [`av_name()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_cid()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_synonyms()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_tradenames()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_group()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_atc()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_loinc()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_ddd()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_ddd_units()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_info()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_url()`](https://amr-for-r.org/reference/av_property.md)
|
||||
[`av_property()`](https://amr-for-r.org/reference/av_property.md) :
|
||||
Get Properties of an Antiviral Drug
|
||||
- [`av_from_text()`](https://amr-for-r.org/reference/av_from_text.md) :
|
||||
Retrieve Antiviral Drug Names and Doses from Clinical Text
|
||||
|
||||
## Other: background information on included data
|
||||
|
||||
Some pages about our package and its external sources. Be sure to read
|
||||
our [How To’s](https://amr-for-r.org/articles/index.md) for more
|
||||
information about how to work with functions in this package.
|
||||
|
||||
- [`microorganisms`](https://amr-for-r.org/reference/microorganisms.md)
|
||||
: Data Set with 78 679 Taxonomic Records of Microorganisms
|
||||
- [`antimicrobials`](https://amr-for-r.org/reference/antimicrobials.md)
|
||||
[`antibiotics`](https://amr-for-r.org/reference/antimicrobials.md)
|
||||
[`antivirals`](https://amr-for-r.org/reference/antimicrobials.md) :
|
||||
Data Sets with 618 Antimicrobial Drugs
|
||||
- [`clinical_breakpoints`](https://amr-for-r.org/reference/clinical_breakpoints.md)
|
||||
: Data Set with Clinical Breakpoints for SIR Interpretation
|
||||
- [`example_isolates`](https://amr-for-r.org/reference/example_isolates.md)
|
||||
: Data Set with 2 000 Example Isolates
|
||||
- [`microorganisms.codes`](https://amr-for-r.org/reference/microorganisms.codes.md)
|
||||
: Data Set with 6 036 Common Microorganism Codes
|
||||
- [`microorganisms.groups`](https://amr-for-r.org/reference/microorganisms.groups.md)
|
||||
: Data Set with 534 Microorganisms In Species Groups
|
||||
- [`intrinsic_resistant`](https://amr-for-r.org/reference/intrinsic_resistant.md)
|
||||
: Data Set Denoting Bacterial Intrinsic Resistance
|
||||
- [`dosage`](https://amr-for-r.org/reference/dosage.md) : Data Set with
|
||||
Treatment Dosages as Defined by EUCAST
|
||||
- [`WHOCC`](https://amr-for-r.org/reference/WHOCC.md) : WHOCC: WHO
|
||||
Collaborating Centre for Drug Statistics Methodology
|
||||
- [`example_isolates_unclean`](https://amr-for-r.org/reference/example_isolates_unclean.md)
|
||||
: Data Set with Unclean Data
|
||||
- [`WHONET`](https://amr-for-r.org/reference/WHONET.md) : Data Set with
|
||||
500 Isolates - WHONET Example
|
||||
|
||||
## Other: miscellaneous functions
|
||||
|
||||
These functions are mostly for internal use, but some of them may also
|
||||
be suitable for your analysis. Especially the ‘like’ function can be
|
||||
useful: `if (x %like% y) {...}`.
|
||||
|
||||
- [`age_groups()`](https://amr-for-r.org/reference/age_groups.md) :
|
||||
Split Ages into Age Groups
|
||||
- [`age()`](https://amr-for-r.org/reference/age.md) : Age in Years of
|
||||
Individuals
|
||||
- [`export_ncbi_biosample()`](https://amr-for-r.org/reference/export_ncbi_biosample.md)
|
||||
: Export Data Set as NCBI BioSample Antibiogram
|
||||
- [`availability()`](https://amr-for-r.org/reference/availability.md) :
|
||||
Check Availability of Columns
|
||||
- [`get_AMR_locale()`](https://amr-for-r.org/reference/translate.md)
|
||||
[`set_AMR_locale()`](https://amr-for-r.org/reference/translate.md)
|
||||
[`reset_AMR_locale()`](https://amr-for-r.org/reference/translate.md)
|
||||
[`translate_AMR()`](https://amr-for-r.org/reference/translate.md) :
|
||||
Translate Strings from the AMR Package
|
||||
- [`italicise_taxonomy()`](https://amr-for-r.org/reference/italicise_taxonomy.md)
|
||||
[`italicize_taxonomy()`](https://amr-for-r.org/reference/italicise_taxonomy.md)
|
||||
: Italicise Taxonomic Families, Genera, Species, Subspecies
|
||||
- [`inner_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
[`left_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
[`right_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
[`full_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
[`semi_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
[`anti_join_microorganisms()`](https://amr-for-r.org/reference/join.md)
|
||||
: Join microorganisms to a Data Set
|
||||
- [`like()`](https://amr-for-r.org/reference/like.md)
|
||||
[`` `%like%` ``](https://amr-for-r.org/reference/like.md)
|
||||
[`` `%unlike%` ``](https://amr-for-r.org/reference/like.md)
|
||||
[`` `%like_case%` ``](https://amr-for-r.org/reference/like.md)
|
||||
[`` `%unlike_case%` ``](https://amr-for-r.org/reference/like.md) :
|
||||
Vectorised Pattern Matching with Keyboard Shortcut
|
||||
- [`mo_matching_score()`](https://amr-for-r.org/reference/mo_matching_score.md)
|
||||
: Calculate the Matching Score for Microorganisms
|
||||
- [`pca()`](https://amr-for-r.org/reference/pca.md) : Principal
|
||||
Component Analysis (for AMR)
|
||||
- [`random_mic()`](https://amr-for-r.org/reference/random.md)
|
||||
[`random_disk()`](https://amr-for-r.org/reference/random.md)
|
||||
[`random_sir()`](https://amr-for-r.org/reference/random.md) : Random
|
||||
MIC Values/Disk Zones/SIR Generation
|
||||
|
||||
## Other: statistical tests
|
||||
|
||||
Some statistical tests or methods are not part of base R and were added
|
||||
to this package for convenience.
|
||||
|
||||
- [`g.test()`](https://amr-for-r.org/reference/g.test.md) :
|
||||
|
||||
*G*-test for Count Data
|
||||
|
||||
- [`kurtosis()`](https://amr-for-r.org/reference/kurtosis.md) : Kurtosis
|
||||
of the Sample
|
||||
|
||||
- [`skewness()`](https://amr-for-r.org/reference/skewness.md) : Skewness
|
||||
of the Sample
|
||||
|
||||
## Other: deprecated functions/arguments/datasets
|
||||
|
||||
These objects are deprecated, meaning that they will still work but show
|
||||
a warning that they will be removed in a future version.
|
||||
|
||||
- [`ab_class()`](https://amr-for-r.org/reference/AMR-deprecated.md)
|
||||
[`ab_selector()`](https://amr-for-r.org/reference/AMR-deprecated.md) :
|
||||
Deprecated Functions, Arguments, or Datasets
|
||||
|
||||
# Articles
|
||||
|
||||
### All vignettes
|
||||
|
||||
- [AMR for Python](https://amr-for-r.org/articles/AMR_for_Python.md):
|
||||
- [AMR with
|
||||
tidymodels](https://amr-for-r.org/articles/AMR_with_tidymodels.md):
|
||||
- [Conduct AMR data analysis](https://amr-for-r.org/articles/AMR.md):
|
||||
- [Download data sets for download / own
|
||||
use](https://amr-for-r.org/articles/datasets.md):
|
||||
- [Apply EUCAST rules](https://amr-for-r.org/articles/EUCAST.md):
|
||||
- [Conduct principal component analysis (PCA) for
|
||||
AMR](https://amr-for-r.org/articles/PCA.md):
|
||||
- [Work with WHONET data](https://amr-for-r.org/articles/WHONET.md):
|
||||
- [Estimating Empirical Coverage with
|
||||
WISCA](https://amr-for-r.org/articles/WISCA.md):
|
||||
Reference in New Issue
Block a user