diff --git a/DESCRIPTION b/DESCRIPTION index be64ce6f..09bbd02f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.8.1.9013 -Date: 2022-06-10 +Version: 1.8.1.9014 +Date: 2022-08-12 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 @@ -90,5 +90,5 @@ BugReports: https://github.com/msberends/AMR/issues License: GPL-2 | file LICENSE Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.0 +RoxygenNote: 7.2.1 Roxygen: list(markdown = TRUE) diff --git a/NEWS.md b/NEWS.md index a638fee8..aaff4727 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# `AMR` 1.8.1.9013 -## Last updated: 10 June 2022 +# `AMR` 1.8.1.9014 +## Last updated: 12 August 2022 ### New * EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations. diff --git a/R/sysdata.rda b/R/sysdata.rda index 7c70bf86..89a94bc9 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 298dca17..99e90ba0 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/data/microorganisms.rda b/data/microorganisms.rda index 86e741bf..6a9e2f1b 100644 Binary files a/data/microorganisms.rda and b/data/microorganisms.rda differ diff --git a/docs/404.html b/docs/404.html index abdbb5dd..0cd5bb7c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -43,7 +43,7 @@
@@ -210,7 +210,7 @@ Content not found. Please use links in the navbar. diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 3ada8c72..62cbd6ba 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ @@ -420,7 +420,7 @@ END OF TERMS AND CONDITIONS diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index cf6a09c1..e57c7b72 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -44,7 +44,7 @@ @@ -190,7 +190,7 @@vignettes/datasets.Rmd
datasets.Rmd
This data set is in R available as microorganisms
, after
you load the AMR
package.
It was last updated on 10 June 2022 11:09:45 UTC. Find more info +
It was last updated on 13 June 2022 13:55:27 UTC. Find more info about the structure of this data set here.
Direct download links:
AMR
(for R), there’s always a knowledgeable microbiologist by your side!
-# 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())
# 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_gram_negative()
and mo_is_intrinsic_resistant()
) and a column selection on two antibiotic groups (aminoglycosides()
and 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, giving the exact same results:
-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())]
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 package is available here on the official R network (CRAN). Install this package in R from CRAN by using the command:
-install.packages("AMR")
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 development version.
@@ -390,14 +390,14 @@Manually, using:
-install.packages("remotes") # if you haven't already
-remotes::install_github("msberends/AMR")
install.packages("remotes") # if you haven't already
+remotes::install_github("msberends/AMR")
Automatically, using the rOpenSci R-universe platform, by adding our R-universe address to your list of repositories (‘repos’):
+options(repos = c(getOption("repos"),
+ msberends = "https://msberends.r-universe.dev"))
After this, you can install and update this AMR
package like any official release (e.g., using install.packages("AMR")
or in RStudio via Tools > Check for Package Updates…).
AMR
1.8.1.9013AMR
1.8.1.9014as.rsi()
. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.as.rsi()
on certain EUCAST breakpoints for MIC valuesas.integer()
for MIC values, since MIC are not integer values and running table()
on MIC values consequently failed for not being able to retrieve the level position (as that’s how normally as.integer()
on factor
s work)Improved algorithm of as.mo()
, especially for ignoring non-taxonomic text, such as:
-
-mo_name("methicillin-resistant S. aureus (MRSA)")
-#> [1] "Staphylococcus aureus"
+mo_name("methicillin-resistant S. aureus (MRSA)")
+#> [1] "Staphylococcus aureus"
More informative warning messages
Added 192 as valid MIC
Function set_ab_names()
to rename data set columns that resemble antimicrobial drugs. This allows for quickly renaming columns to official names, ATC codes, etc. Its second argument can be a tidyverse way of selecting:
-
-example_isolates %>% set_ab_names(where(is.rsi))
-example_isolates %>% set_ab_names(AMC:GEN, property = "atc")
+example_isolates %>% set_ab_names(where(is.rsi))
+example_isolates %>% set_ab_names(AMC:GEN, property = "atc")
Function ab_ddd_units()
to get units of DDDs (daily defined doses), deprecating the use of ab_ddd(..., units = TRUE)
to be more consistent in data types of function output
Added specific selectors for certain types for treatment: administrable_per_os()
and administrable_iv()
, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):
-
-example_isolates[, penicillins() & administrable_per_os()] # base R
-example_isolates %>% select(penicillins() & administrable_per_os()) # dplyr
+example_isolates[, penicillins() & administrable_per_os()] # base R
+example_isolates %>% select(penicillins() & administrable_per_os()) # dplyr
Added the selector ab_selector()
, which accepts a filter to be used internally on the antibiotics
data set, yielding great flexibility on drug properties, such as selecting antibiotic columns with an oral DDD of at least 1 gram:
-
-example_isolates[, ab_selector(oral_ddd > 1 & oral_units == "g")] # base R
-example_isolates %>% select(ab_selector(oral_ddd > 1 & oral_units == "g")) # dplyr
+example_isolates[, ab_selector(oral_ddd > 1 & oral_units == "g")] # base R
+example_isolates %>% select(ab_selector(oral_ddd > 1 & oral_units == "g")) # dplyr
Added the selector not_intrinsic_resistant()
, which only keeps antibiotic columns that are not intrinsic resistant for all microorganisms in a data set, based on the latest EUCAST guideline on intrinsic resistance. For example, if a data set contains only microorganism codes or names of E. coli and K. pneumoniae and contains a column “vancomycin”, this column will be removed (or rather, unselected) using this function.
Added argument only_treatable
, which defaults to TRUE
and will exclude drugs that are only for laboratory tests and not for treating patients (such as imipenem/EDTA and gentamicin-high)
All antibiotic class selectors (such as carbapenems()
, aminoglycosides()
) can now be used for filtering as well, making all their accompanying filter_*()
functions redundant (such as filter_carbapenems()
, filter_aminoglycosides()
). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:
-
-# select columns with results for carbapenems
-example_isolates[, carbapenems()] # base R
-example_isolates %>% select(carbapenems()) # dplyr
-
-# filter rows for resistance in any carbapenem
-example_isolates[any(carbapenems() == "R"), ] # base R
-example_isolates %>% filter(any(carbapenems() == "R")) # dplyr
-example_isolates %>% filter(if_any(carbapenems(), ~.x == "R")) # dplyr (formal)
-
-# filter rows for resistance in all carbapenems
-example_isolates[all(carbapenems() == "R"), ] # base R
-example_isolates[carbapenems() == "R", ]
-example_isolates %>% filter(all(carbapenems() == "R")) # dplyr
-example_isolates %>% filter(carbapenems() == "R")
+# select columns with results for carbapenems
+example_isolates[, carbapenems()] # base R
+example_isolates %>% select(carbapenems()) # dplyr
+
+# filter rows for resistance in any carbapenem
+example_isolates[any(carbapenems() == "R"), ] # base R
+example_isolates %>% filter(any(carbapenems() == "R")) # dplyr
+example_isolates %>% filter(if_any(carbapenems(), ~.x == "R")) # dplyr (formal)
+
+# filter rows for resistance in all carbapenems
+example_isolates[all(carbapenems() == "R"), ] # base R
+example_isolates[carbapenems() == "R", ]
+example_isolates %>% filter(all(carbapenems() == "R")) # dplyr
+example_isolates %>% filter(carbapenems() == "R")
Added %unlike%
and %unlike_case%
(as negations of the existing %like%
and %like_case%
). This greatly improves readability:
+if (!grepl("EUCAST", guideline)) ...
+# same:
+if (guideline %unlike% "EUCAST") ...
Altered the RStudio addin, so it now iterates over %like%
-> %unlike%
-> %like_case%
-> %unlike_case%
if you keep pressing your keyboard shortcut
Functions oxazolidinones()
(an antibiotic selector function) and filter_oxazolidinones()
(an antibiotic filter function) to select/filter on e.g. linezolid and tedizolid
-
-library(dplyr)
-x <- example_isolates %>% select(date, hospital_id, oxazolidinones())
-#> Selecting oxazolidinones: column 'LNZ' (linezolid)
-
-x <- example_isolates %>% filter_oxazolidinones()
-#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"
+library(dplyr)
+x <- example_isolates %>% select(date, hospital_id, oxazolidinones())
+#> Selecting oxazolidinones: column 'LNZ' (linezolid)
+
+x <- example_isolates %>% filter_oxazolidinones()
+#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"
Support for custom MDRO guidelines, using the new custom_mdro_guideline()
function, please see mdro()
for additional info
ggplot()
generics for classes <mic>
and <disk>
Function mo_is_yeast()
, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:
-
-mo_kingdom(c("Aspergillus", "Candida"))
-#> [1] "Fungi" "Fungi"
-
-mo_is_yeast(c("Aspergillus", "Candida"))
-#> [1] FALSE TRUE
-
-# usage for filtering data:
-example_isolates[which(mo_is_yeast()), ] # base R
-example_isolates %>% filter(mo_is_yeast()) # dplyr
+mo_kingdom(c("Aspergillus", "Candida"))
+#> [1] "Fungi" "Fungi"
+
+mo_is_yeast(c("Aspergillus", "Candida"))
+#> [1] FALSE TRUE
+
+# usage for filtering data:
+example_isolates[which(mo_is_yeast()), ] # base R
+example_isolates %>% filter(mo_is_yeast()) # dplyr
The mo_type()
function has also been updated to reflect this change:
-
-mo_type(c("Aspergillus", "Candida"))
-# [1] "Fungi" "Yeasts"
-mo_type(c("Aspergillus", "Candida"), language = "es") # also supported: de, nl, fr, it, pt
-#> [1] "Hongos" "Levaduras"
+mo_type(c("Aspergillus", "Candida"))
+# [1] "Fungi" "Yeasts"
+mo_type(c("Aspergillus", "Candida"), language = "es") # also supported: de, nl, fr, it, pt
+#> [1] "Hongos" "Levaduras"
Added Pretomanid (PMD, J04AK08) to the antibiotics
data set
MIC values (see as.mic()
) can now be used in any mathematical processing, such as usage inside functions min()
, max()
, range()
, and with binary operators (+
, -
, etc.). This allows for easy distribution analysis and fast filtering on MIC values:
-
-x <- random_mic(10)
-x
-#> Class <mic>
-#> [1] 128 0.5 2 0.125 64 0.25 >=256 8 16 4
-x[x > 4]
-#> Class <mic>
-#> [1] 128 64 >=256 8 16
-range(x)
-#> [1] 0.125 256.000
-range(log2(x))
-#> [1] -3 8
+x <- random_mic(10)
+x
+#> Class <mic>
+#> [1] 128 0.5 2 0.125 64 0.25 >=256 8 16 4
+x[x > 4]
+#> Class <mic>
+#> [1] 128 64 >=256 8 16
+range(x)
+#> [1] 0.125 256.000
+range(log2(x))
+#> [1] -3 8
Functions get_episode()
and is_new_episode()
to determine (patient) episodes which are not necessarily based on microorganisms. The get_episode()
function returns the index number of the episode per group, while the is_new_episode()
function returns values TRUE
/FALSE
to indicate whether an item in a vector is the start of a new episode. They also support dplyr
s grouping (i.e. using group_by()
):
-
-library(dplyr)
-example_isolates %>%
- group_by(patient_id, hospital_id) %>%
- filter(is_new_episode(date, episode_days = 60))
+library(dplyr)
+example_isolates %>%
+ group_by(patient_id, hospital_id) %>%
+ filter(is_new_episode(date, episode_days = 60))
Functions mo_is_gram_negative()
and mo_is_gram_positive()
as wrappers around mo_gramstain()
. They always return TRUE
or FALSE
(except when the input is NA
or the MO code is UNKNOWN
), thus always return FALSE
for species outside the taxonomic kingdom of Bacteria.
Function mo_is_intrinsic_resistant()
to test for intrinsic resistance, based on EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2 from 2020.
mdr_cmi2012()
,
eucast_exceptional_phenotypes()
-
-# to select first isolates that are Gram-negative
-# and view results of cephalosporins and aminoglycosides:
-library(dplyr)
-example_isolates %>%
- filter(first_isolate(), mo_is_gram_negative()) %>%
- select(mo, cephalosporins(), aminoglycosides()) %>%
- as_tibble()
+# to select first isolates that are Gram-negative
+# and view results of cephalosporins and aminoglycosides:
+library(dplyr)
+example_isolates %>%
+ filter(first_isolate(), mo_is_gram_negative()) %>%
+ select(mo, cephalosporins(), aminoglycosides()) %>%
+ as_tibble()
For antibiotic selection functions (such as cephalosporins()
, aminoglycosides()
) to select columns based on a certain antibiotic group, the dependency on the tidyselect
package was removed, meaning that they can now also be used without the need to have this package installed and now also work in base R function calls (they rely on R 3.2 or later):
-
-# above example in base R:
-example_isolates[which(first_isolate() & mo_is_gram_negative()),
- c("mo", cephalosporins(), aminoglycosides())]
+# above example in base R:
+example_isolates[which(first_isolate() & mo_is_gram_negative()),
+ c("mo", cephalosporins(), aminoglycosides())]
For all function arguments in the code, it is now defined what the exact type of user input should be (inspired by the typed
package). If the user input for a certain function does not meet the requirements for a specific argument (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 420 arguments were defined.
Fix for set_mo_source()
, that previously would not remember the file location of the original file
Data set intrinsic_resistant
. This data set contains all bug-drug combinations where the ‘bug’ is intrinsic resistant to the ‘drug’ according to the latest EUCAST insights. It contains just two columns: microorganism
and antibiotic
.
Curious about which enterococci are actually intrinsic resistant to vancomycin?
-
-library(AMR)
-library(dplyr)
-intrinsic_resistant %>%
- filter(antibiotic == "Vancomycin", microorganism %like% "Enterococcus") %>%
- pull(microorganism)
-#> [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
+library(AMR)
+library(dplyr)
+intrinsic_resistant %>%
+ filter(antibiotic == "Vancomycin", microorganism %like% "Enterococcus") %>%
+ pull(microorganism)
+#> [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
Support for veterinary ATC codes
Support for skimming classes <rsi>
, <mic>
, <disk>
and <mo>
with the skimr
package
Support for using dplyr
’s across()
to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.
-
-# until dplyr 1.0.0
-your_data %>% mutate_if(is.mic, as.rsi)
-your_data %>% mutate_if(is.disk, as.rsi)
-
-# since dplyr 1.0.0
-your_data %>% mutate(across(where(is.mic), as.rsi))
-your_data %>% mutate(across(where(is.disk), as.rsi))
+# until dplyr 1.0.0
+your_data %>% mutate_if(is.mic, as.rsi)
+your_data %>% mutate_if(is.disk, as.rsi)
+
+# since dplyr 1.0.0
+your_data %>% mutate(across(where(is.mic), as.rsi))
+your_data %>% mutate(across(where(is.disk), as.rsi))
Cleaning columns in a data.frame now allows you to specify those columns with tidy selection, e.g. as.rsi(df, col1:col9)
Big speed improvement for interpreting MIC values and disk zone diameters. When interpreting 5,000 MIC values of two antibiotics (10,000 values in total), our benchmarks showed a total run time going from 80.7-85.1 seconds to 1.8-2.0 seconds.
Added intelligent data cleaning to as.disk()
, so numbers can also be extracted from text and decimal numbers will always be rounded up:
+as.disk(c("disk zone: 23.4 mm", 23.4))
+#> Class <disk>
+#> [1] 24 24
Improvements for as.mo()
:
Tidyverse selection helpers for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like dplyr::select()
and tidyr::pivot_longer()
:
-
-library(dplyr)
-
-# Columns 'IPM' and 'MEM' are in the example_isolates data set
-example_isolates %>%
- select(carbapenems())
-#> Selecting carbapenems: `IPM` (imipenem), `MEM` (meropenem)
+library(dplyr)
+
+# Columns 'IPM' and 'MEM' are in the example_isolates data set
+example_isolates %>%
+ select(carbapenems())
+#> Selecting carbapenems: `IPM` (imipenem), `MEM` (meropenem)
Added mo_domain()
as an alias to mo_kingdom()
Added function filter_penicillins()
to filter isolates on a specific result in any column with a name in the antimicrobial ‘penicillins’ class (more specific: ATC subgroup Beta-lactam antibacterials, penicillins)
Interpretation from MIC values (and disk zones) to R/SI can now be used with mutate_at()
of the dplyr
package:
-
-yourdata %>%
- mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = "E. coli")
-
-yourdata %>%
- mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = .$mybacteria)
+yourdata %>%
+ mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = "E. coli")
+
+yourdata %>%
+ mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = .$mybacteria)
Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole
Added uti
(as abbreviation of urinary tract infections) as argument to as.rsi()
, so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs
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:
-
-ab_loinc("ampicillin")
-#> [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"
-ab_name("21066-6")
-#> [1] "Ampicillin"
-ab_atc("21066-6")
-#> [1] "J01CA01"
+ab_loinc("ampicillin")
+#> [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"
+ab_name("21066-6")
+#> [1] "Ampicillin"
+ab_atc("21066-6")
+#> [1] "J01CA01"
Support for SNOMED CT codes in the microorganisms
data set. Use mo_snomed()
to retrieve SNOMED codes, or use a SNOMED code for input in any mo_*
function:
-
-mo_snomed("S. aureus")
-#> [1] 115329001 3092008 113961008
-mo_name(115329001)
-#> [1] "Staphylococcus aureus"
-mo_gramstain(115329001)
-#> [1] "Gram-positive"
+mo_snomed("S. aureus")
+#> [1] 115329001 3092008 113961008
+mo_name(115329001)
+#> [1] "Staphylococcus aureus"
+mo_gramstain(115329001)
+#> [1] "Gram-positive"
If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:
-
-if (mo_family(somebugs) == "Enterobacteriaceae") ...
+if (mo_family(somebugs) == "Enterobacteriaceae") ...
then please adjust this to:
-
-if (mo_order(somebugs) == "Enterobacterales") ...
+if (mo_order(somebugs) == "Enterobacterales") ...
Functions susceptibility()
and resistance()
as aliases of proportion_SI()
and proportion_R()
, respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.
-
-library(dplyr)
-example_isolates %>%
- group_by(bug = mo_name(mo)) %>%
- summarise(amoxicillin = resistance(AMX),
- amox_clav = resistance(AMC)) %>%
- filter(!is.na(amoxicillin) | !is.na(amox_clav))
+library(dplyr)
+example_isolates %>%
+ group_by(bug = mo_name(mo)) %>%
+ summarise(amoxicillin = resistance(AMX),
+ amox_clav = resistance(AMC)) %>%
+ filter(!is.na(amoxicillin) | !is.na(amox_clav))
Support for a new MDRO guideline: Magiorakos AP, Srinivasan A et al. “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).
@@ -974,17 +974,17 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/Added a score (a certainty percentage) to mo_uncertainties()
, that is calculated using the Levenshtein distance:
-
-as.mo(c("Stafylococcus aureus",
- "staphylokok aureuz"))
-#> Warning:
-#> Results of two values were guessed with uncertainty. Use mo_uncertainties() to review them.
-#> Class 'mo'
-#> [1] B_STPHY_AURS B_STPHY_AURS
-
-mo_uncertainties()
-#> "Stafylococcus aureus" -> Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)
-#> "staphylokok aureuz" -> Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)
+as.mo(c("Stafylococcus aureus",
+ "staphylokok aureuz"))
+#> Warning:
+#> Results of two values were guessed with uncertainty. Use mo_uncertainties() to review them.
+#> Class 'mo'
+#> [1] B_STPHY_AURS B_STPHY_AURS
+
+mo_uncertainties()
+#> "Stafylococcus aureus" -> Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)
+#> "staphylokok aureuz" -> Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)
as.atc()
- this function was replaced by ab_atc()
@@ -1022,25 +1022,25 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
Determination of first isolates now excludes all ‘unknown’ microorganisms at default, i.e. microbial code "UNKNOWN"
. They can be included with the new argument include_unknown
:
-
-first_isolate(..., include_unknown = TRUE)
+first_isolate(..., include_unknown = TRUE)
For WHONET users, this means that all records/isolates with organism code "con"
(contamination) will be excluded at default, since as.mo("con") = "UNKNOWN"
. The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.
For code consistency, classes ab
and mo
will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in NA
:
-
-# how it works in base R:
-x <- factor("A")
-x[1] <- "B"
-#> Warning message:
-#> invalid factor level, NA generated
-
-# how it now works similarly for classes 'mo' and 'ab':
-x <- as.mo("E. coli")
-x[1] <- "testvalue"
-#> Warning message:
-#> invalid microorganism code, NA generated
+# how it works in base R:
+x <- factor("A")
+x[1] <- "B"
+#> Warning message:
+#> invalid factor level, NA generated
+
+# how it now works similarly for classes 'mo' and 'ab':
+x <- as.mo("E. coli")
+x[1] <- "testvalue"
+#> Warning message:
+#> invalid microorganism code, NA generated
This is important, because a value like "testvalue"
could never be understood by e.g. mo_name()
, although the class would suggest a valid microbial code.
Function freq()
has moved to a new package, clean
(CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq()
function still works, since it is re-exported from the clean
package (which will be installed automatically upon updating this AMR
package).
Function bug_drug_combinations()
to quickly get a data.frame
with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with mo_shortname()
at default:
-
-x <- bug_drug_combinations(example_isolates)
-#> NOTE: Using column `mo` as input for `col_mo`.
-x[1:4, ]
-#> mo ab S I R total
-#> 1 A. baumannii AMC 0 0 3 3
-#> 2 A. baumannii AMK 0 0 0 0
-#> 3 A. baumannii AMP 0 0 3 3
-#> 4 A. baumannii AMX 0 0 3 3
-#> NOTE: Use 'format()' on this result to get a publicable/printable format.
-
-# change the transformation with the FUN argument to anything you like:
-x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain)
-#> NOTE: Using column `mo` as input for `col_mo`.
-x[1:4, ]
-#> mo ab S I R total
-#> 1 Gram-negative AMC 469 89 174 732
-#> 2 Gram-negative AMK 251 0 2 253
-#> 3 Gram-negative AMP 227 0 405 632
-#> 4 Gram-negative AMX 227 0 405 632
-#> NOTE: Use 'format()' on this result to get a publicable/printable format.
+x <- bug_drug_combinations(example_isolates)
+#> NOTE: Using column `mo` as input for `col_mo`.
+x[1:4, ]
+#> mo ab S I R total
+#> 1 A. baumannii AMC 0 0 3 3
+#> 2 A. baumannii AMK 0 0 0 0
+#> 3 A. baumannii AMP 0 0 3 3
+#> 4 A. baumannii AMX 0 0 3 3
+#> NOTE: Use 'format()' on this result to get a publicable/printable format.
+
+# change the transformation with the FUN argument to anything you like:
+x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain)
+#> NOTE: Using column `mo` as input for `col_mo`.
+x[1:4, ]
+#> mo ab S I R total
+#> 1 Gram-negative AMC 469 89 174 732
+#> 2 Gram-negative AMK 251 0 2 253
+#> 3 Gram-negative AMP 227 0 405 632
+#> 4 Gram-negative AMX 227 0 405 632
+#> NOTE: Use 'format()' on this result to get a publicable/printable format.
You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R format()
function:
-
-format(x, combine_IR = FALSE)
+format(x, combine_IR = FALSE)
Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for portion_*
functions or count_*
functions. This can be used to determine the empiric susceptibility of a combination therapy. A new argument only_all_tested
(which defaults to FALSE
) replaces the old also_single_tested
and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the portion
and count
help pages), where the %SI is being determined:
-
-# --------------------------------------------------------------------
-# only_all_tested = FALSE only_all_tested = TRUE
-# ----------------------- -----------------------
-# Drug A Drug B include as include as include as include as
-# numerator denominator numerator denominator
-# -------- -------- ---------- ----------- ---------- -----------
-# S or I S or I X X X X
-# R S or I X X X X
-# <NA> S or I X X - -
-# S or I R X X X X
-# R R - X - X
-# <NA> R - - - -
-# S or I <NA> X X - -
-# R <NA> - - - -
-# <NA> <NA> - - - -
-# --------------------------------------------------------------------
+# --------------------------------------------------------------------
+# only_all_tested = FALSE only_all_tested = TRUE
+# ----------------------- -----------------------
+# Drug A Drug B include as include as include as include as
+# numerator denominator numerator denominator
+# -------- -------- ---------- ----------- ---------- -----------
+# S or I S or I X X X X
+# R S or I X X X X
+# <NA> S or I X X - -
+# S or I R X X X X
+# R R - X - X
+# <NA> R - - - -
+# S or I <NA> X X - -
+# R <NA> - - - -
+# <NA> <NA> - - - -
+# --------------------------------------------------------------------
Since this is a major change, usage of the old also_single_tested
will throw an informative error that it has been replaced by only_all_tested
.
tibble
printing support for classes rsi
, mic
, disk
, ab
mo
. When using tibble
s containing antimicrobial columns, values S
will print in green, values I
will print in yellow and values R
will print in red. Microbial IDs (class mo
) will emphasise on the genus and species, not on the kingdom.
-
-# (run this on your own console, as this page does not support colour printing)
-library(dplyr)
-example_isolates %>%
- select(mo:AMC) %>%
- as_tibble()
+# (run this on your own console, as this page does not support colour printing)
+library(dplyr)
+example_isolates %>%
+ select(mo:AMC) %>%
+ as_tibble()
Function rsi_df()
to transform a data.frame
to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions count_df()
and portion_df()
to immediately show resistance percentages and number of available isolates:
-
-septic_patients %>%
- select(AMX, CIP) %>%
- rsi_df()
-# antibiotic interpretation value isolates
-# 1 Amoxicillin SI 0.4442636 546
-# 2 Amoxicillin R 0.5557364 683
-# 3 Ciprofloxacin SI 0.8381831 1181
-# 4 Ciprofloxacin R 0.1618169 228
+septic_patients %>%
+ select(AMX, CIP) %>%
+ rsi_df()
+# antibiotic interpretation value isolates
+# 1 Amoxicillin SI 0.4442636 546
+# 2 Amoxicillin R 0.5557364 683
+# 3 Ciprofloxacin SI 0.8381831 1181
+# 4 Ciprofloxacin R 0.1618169 228
Support for all scientifically published pathotypes of E. coli to date (that we could find). Supported are:
@@ -1195,13 +1195,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/All these lead to the microbial ID of E. coli:
-
-as.mo("UPEC")
-# B_ESCHR_COL
-mo_name("UPEC")
-# "Escherichia coli"
-mo_gramstain("EHEC")
-# "Gram-negative"
+as.mo("UPEC")
+# B_ESCHR_COL
+mo_name("UPEC")
+# "Escherichia coli"
+mo_gramstain("EHEC")
+# "Gram-negative"
Function mo_info()
as an analogy to ab_info()
. The mo_info()
prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism
Function mo_synonyms()
to get all previously accepted taxonomic names of a microorganism
support for boxplots:
-
-septic_patients %>%
- freq(age) %>%
- boxplot()
-# grouped boxplots:
-septic_patients %>%
- group_by(hospital_id) %>%
- freq(age) %>%
- boxplot()
+septic_patients %>%
+ freq(age) %>%
+ boxplot()
+# grouped boxplots:
+septic_patients %>%
+ group_by(hospital_id) %>%
+ freq(age) %>%
+ boxplot()
New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:
-
-filter_aminoglycosides()
-filter_carbapenems()
-filter_cephalosporins()
-filter_1st_cephalosporins()
-filter_2nd_cephalosporins()
-filter_3rd_cephalosporins()
-filter_4th_cephalosporins()
-filter_fluoroquinolones()
-filter_glycopeptides()
-filter_macrolides()
-filter_tetracyclines()
+filter_aminoglycosides()
+filter_carbapenems()
+filter_cephalosporins()
+filter_1st_cephalosporins()
+filter_2nd_cephalosporins()
+filter_3rd_cephalosporins()
+filter_4th_cephalosporins()
+filter_fluoroquinolones()
+filter_glycopeptides()
+filter_macrolides()
+filter_tetracyclines()
The antibiotics
data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the antibiotics
data set. For example:
-
-septic_patients %>% filter_glycopeptides(result = "R")
-# Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R
-septic_patients %>% filter_glycopeptides(result = "R", scope = "all")
-# Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R
+septic_patients %>% filter_glycopeptides(result = "R")
+# Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R
+septic_patients %>% filter_glycopeptides(result = "R", scope = "all")
+# Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R
All ab_*
functions are deprecated and replaced by atc_*
functions:
-
-ab_property -> atc_property()
-ab_name -> atc_name()
-ab_official -> atc_official()
-ab_trivial_nl -> atc_trivial_nl()
-ab_certe -> atc_certe()
-ab_umcg -> atc_umcg()
-ab_tradenames -> atc_tradenames()
+ab_property -> atc_property()
+ab_name -> atc_name()
+ab_official -> atc_official()
+ab_trivial_nl -> atc_trivial_nl()
+ab_certe -> atc_certe()
+ab_umcg -> atc_umcg()
+ab_tradenames -> atc_tradenames()
These functions use as.atc()
internally. The old atc_property
has been renamed atc_online_property()
. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc
or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo()
and e.g. mo_genus
.
New functions set_mo_source()
and get_mo_source()
to use your own predefined MO codes as input for as.mo()
and consequently all mo_*
functions
New function ggplot_rsi_predict()
as well as the base R plot()
function can now be used for resistance prediction calculated with resistance_predict()
:
-
-x <- resistance_predict(septic_patients, col_ab = "amox")
-plot(x)
-ggplot_rsi_predict(x)
+x <- resistance_predict(septic_patients, col_ab = "amox")
+plot(x)
+ggplot_rsi_predict(x)
Functions filter_first_isolate()
and filter_first_weighted_isolate()
to shorten and fasten filtering on data sets with antimicrobial results, e.g.:
-
-septic_patients %>% filter_first_isolate(...)
-# or
-filter_first_isolate(septic_patients, ...)
+septic_patients %>% filter_first_isolate(...)
+# or
+filter_first_isolate(septic_patients, ...)
is equal to:
-
-septic_patients %>%
- mutate(only_firsts = first_isolate(septic_patients, ...)) %>%
- filter(only_firsts == TRUE) %>%
- select(-only_firsts)
+septic_patients %>%
+ mutate(only_firsts = first_isolate(septic_patients, ...)) %>%
+ filter(only_firsts == TRUE) %>%
+ select(-only_firsts)
New function availability()
to check the number of available (non-empty) results in a data.frame
New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.
Now handles incorrect spelling, like i
instead of y
and f
instead of ph
:
-
-# mo_fullname() uses as.mo() internally
-
-mo_fullname("Sthafilokockus aaureuz")
-#> [1] "Staphylococcus aureus"
-
-mo_fullname("S. klossi")
-#> [1] "Staphylococcus kloosii"
+# mo_fullname() uses as.mo() internally
+
+mo_fullname("Sthafilokockus aaureuz")
+#> [1] "Staphylococcus aureus"
+
+mo_fullname("S. klossi")
+#> [1] "Staphylococcus kloosii"
Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default allow_uncertain = TRUE
is equal to uncertainty level 2. Run ?as.mo
for more info about these levels.
-
-# equal:
-as.mo(..., allow_uncertain = TRUE)
-as.mo(..., allow_uncertain = 2)
-
-# also equal:
-as.mo(..., allow_uncertain = FALSE)
-as.mo(..., allow_uncertain = 0)
+# equal:
+as.mo(..., allow_uncertain = TRUE)
+as.mo(..., allow_uncertain = 2)
+
+# also equal:
+as.mo(..., allow_uncertain = FALSE)
+as.mo(..., allow_uncertain = 0)
Using as.mo(..., allow_uncertain = 3)
could lead to very unreliable results.
Implemented the latest publication of Becker et al. (2019), for categorising coagulase-negative Staphylococci
Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:
-
-# Determine genus of microorganisms (mo) in `septic_patients` data set:
-# OLD WAY
-septic_patients %>%
- mutate(genus = mo_genus(mo)) %>%
- freq(genus)
-# NEW WAY
-septic_patients %>%
- freq(mo_genus(mo))
-
-# Even supports grouping variables:
-septic_patients %>%
- group_by(gender) %>%
- freq(mo_genus(mo))
+# Determine genus of microorganisms (mo) in `septic_patients` data set:
+# OLD WAY
+septic_patients %>%
+ mutate(genus = mo_genus(mo)) %>%
+ freq(genus)
+# NEW WAY
+septic_patients %>%
+ freq(mo_genus(mo))
+
+# Even supports grouping variables:
+septic_patients %>%
+ group_by(gender) %>%
+ freq(mo_genus(mo))
Header info is now available as a list, with the header
function
The argument header
is now set to TRUE
at default, even for markdown
Function as.mo
(and all mo_*
wrappers) now supports genus abbreviations with “species” attached
-
-as.mo("E. species") # B_ESCHR
-mo_fullname("E. spp.") # "Escherichia species"
-as.mo("S. spp") # B_STPHY
-mo_fullname("S. species") # "Staphylococcus species"
+as.mo("E. species") # B_ESCHR
+mo_fullname("E. spp.") # "Escherichia species"
+as.mo("S. spp") # B_STPHY
+mo_fullname("S. species") # "Staphylococcus species"
Added argument combine_IR
(TRUE/FALSE) to functions portion_df
and count_df
, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)
Fix for portion_*(..., as_percent = TRUE)
when minimal number of isolates would not be met
Support for grouping variables, test with:
+
+septic_patients %>%
+ group_by(hospital_id) %>%
+ freq(gender)
Support for (un)selecting columns:
-
-septic_patients %>%
- freq(hospital_id) %>%
- select(-count, -cum_count) # only get item, percent, cum_percent
+septic_patients %>%
+ freq(hospital_id) %>%
+ select(-count, -cum_count) # only get item, percent, cum_percent
Check for hms::is.hms
Now prints in markdown at default in non-interactive sessions
They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:
-
-mo_gramstain("E. coli")
-# [1] "Gram negative"
-mo_gramstain("E. coli", language = "de") # German
-# [1] "Gramnegativ"
-mo_gramstain("E. coli", language = "es") # Spanish
-# [1] "Gram negativo"
-mo_fullname("S. group A", language = "pt") # Portuguese
-# [1] "Streptococcus grupo A"
+mo_gramstain("E. coli")
+# [1] "Gram negative"
+mo_gramstain("E. coli", language = "de") # German
+# [1] "Gramnegativ"
+mo_gramstain("E. coli", language = "es") # Spanish
+# [1] "Gram negativo"
+mo_fullname("S. group A", language = "pt") # Portuguese
+# [1] "Streptococcus grupo A"
Furthermore, former taxonomic names will give a note about the current taxonomic name:
-
-mo_gramstain("Esc blattae")
-# Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)
-# [1] "Gram negative"
+mo_gramstain("Esc blattae")
+# Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)
+# [1] "Gram negative"
Functions count_R
, count_IR
, count_I
, count_SI
and count_S
to selectively count resistant or susceptible isolates
Functions as.mo
and is.mo
as replacements for as.bactid
and is.bactid
(since the microoganisms
data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The as.mo
function determines microbial IDs using intelligent rules:
-
-as.mo("E. coli")
-# [1] B_ESCHR_COL
-as.mo("MRSA")
-# [1] B_STPHY_AUR
-as.mo("S group A")
-# [1] B_STRPTC_GRA
+as.mo("E. coli")
+# [1] B_ESCHR_COL
+as.mo("MRSA")
+# [1] B_STPHY_AUR
+as.mo("S group A")
+# [1] B_STRPTC_GRA
And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:
-
-thousands_of_E_colis <- rep("E. coli", 25000)
-microbenchmark::microbenchmark(as.mo(thousands_of_E_colis), unit = "s")
-# Unit: seconds
-# min median max neval
-# 0.01817717 0.01843957 0.03878077 100
+thousands_of_E_colis <- rep("E. coli", 25000)
+microbenchmark::microbenchmark(as.mo(thousands_of_E_colis), unit = "s")
+# Unit: seconds
+# min median max neval
+# 0.01817717 0.01843957 0.03878077 100
Added argument reference_df
for as.mo
, so users can supply their own microbial IDs, name or codes as a reference table
Added 163 trade names to the antibiotics
data set, it now contains 298 different trade names in total, e.g.:
-
-ab_official("Bactroban")
-# [1] "Mupirocin"
-ab_name(c("Bactroban", "Amoxil", "Zithromax", "Floxapen"))
-# [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"
-ab_atc(c("Bactroban", "Amoxil", "Zithromax", "Floxapen"))
-# [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"
+ab_official("Bactroban")
+# [1] "Mupirocin"
+ab_name(c("Bactroban", "Amoxil", "Zithromax", "Floxapen"))
+# [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"
+ab_atc(c("Bactroban", "Amoxil", "Zithromax", "Floxapen"))
+# [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"
For first_isolate
, rows will be ignored when there’s no species available
Function ratio
is now deprecated and will be removed in a future release, as it is not really the scope of this package
Support for quasiquotation in the functions series count_*
and portions_*
, and n_rsi
. This allows to check for more than 2 vectors or columns.
-
-septic_patients %>% select(amox, cipr) %>% count_IR()
-# which is the same as:
-septic_patients %>% count_IR(amox, cipr)
-
-septic_patients %>% portion_S(amcl)
-septic_patients %>% portion_S(amcl, gent)
-septic_patients %>% portion_S(amcl, gent, pita)
+septic_patients %>% select(amox, cipr) %>% count_IR()
+# which is the same as:
+septic_patients %>% count_IR(amox, cipr)
+
+septic_patients %>% portion_S(amcl)
+septic_patients %>% portion_S(amcl, gent)
+septic_patients %>% portion_S(amcl, gent, pita)
Edited ggplot_rsi
and geom_rsi
so they can cope with count_df
. The new fun
argument has value portion_df
at default, but can be set to count_df
.
Fix for ggplot_rsi
when the ggplot2
package was not loaded
Support for types (classes) list and matrix for freq
+my_matrix = with(septic_patients, matrix(c(age, gender), ncol = 2))
+freq(my_matrix)
For lists, subsetting is possible:
-
-my_list = list(age = septic_patients$age, gender = septic_patients$gender)
-my_list %>% freq(age)
-my_list %>% freq(gender)
+my_list = list(age = septic_patients$age, gender = septic_patients$gender)
+my_list %>% freq(age)
+my_list %>% freq(gender)
as.mo(
- x,
- Becker = FALSE,
- Lancefield = FALSE,
- allow_uncertain = TRUE,
- reference_df = get_mo_source(),
- ignore_pattern = getOption("AMR_ignore_pattern"),
- language = get_AMR_locale(),
- info = interactive(),
- ...
-)
-
-is.mo(x)
-
-mo_failures()
-
-mo_uncertainties()
-
-mo_renamed()
as.mo(
+ x,
+ Becker = FALSE,
+ Lancefield = FALSE,
+ allow_uncertain = TRUE,
+ reference_df = get_mo_source(),
+ ignore_pattern = getOption("AMR_ignore_pattern"),
+ language = get_AMR_locale(),
+ info = interactive(),
+ ...
+)
+
+is.mo(x)
+
+mo_failures()
+
+mo_uncertainties()
+
+mo_renamed()
a character vector or a data.frame with one or two columns
a logical to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker et al. (1,2,3).
This excludes Staphylococcus aureus at default, use Becker = "all"
to also categorise S. aureus as "CoPS".
a logical to indicate whether a beta-haemolytic Streptococcus should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These streptococci will be categorised in their first group, e.g. Streptococcus dysgalactiae will be group C, although officially it was also categorised into groups G and L.
This excludes enterococci at default (who are in group D), use Lancefield = "all"
to also categorise all enterococci as group D.
a number between 0
(or "none"
) and 3
(or "all"
), or TRUE
(= 2
) or FALSE
(= 0
) to indicate whether the input should be checked for less probable results, see Details
a data.frame to be used for extra reference when translating x
to a valid mo
. See set_mo_source()
and get_mo_source()
to automate the usage of your own codes (e.g. used in your analysis or organisation).
a regular expression (case-insensitive) of which all matches in x
must return NA
. This can be convenient to exclude known non-relevant input and can also be set with the option AMR_ignore_pattern
, e.g. options(AMR_ignore_pattern = "(not reported|contaminated flora)")
.
language to translate text like "no growth", which defaults to the system language (see get_AMR_locale()
)
a logical to indicate if a progress bar should be printed if more than 25 items are to be coerced, defaults to TRUE
only in interactive mode
other arguments passed on to functions
A microorganism (MO) code from this package (class: mo
) is human readable and typically looks like these examples:
+ Code Full name--------------- --------------------------------------
+
+ B_KLBSL Klebsiella
+ B_KLBSL_PNMN Klebsiella pneumoniae
+ B_KLBSL_PNMN_RHNS Klebsiella pneumoniae rhinoscleromatis| | | |
+ | | | |
+ | | | \---> subspecies, a 4-5 letter acronym
+ | | \----> species, a 4-5 letter acronym
+ | \----> genus, a 5-7 letter acronym
+ ----> taxonomic kingdom: A (Archaea), AN (Animalia), B (Bacteria),
+ \C (Chromista), F (Fungi), P (Protozoa)
Values that cannot be coerced will be considered 'unknown' and will get the MO code UNKNOWN
.
Use the mo_*
functions to get properties based on the returned code, see Examples.
The algorithm uses data from the Catalogue of Life (see below) and from one other source (see microorganisms).
@@ -318,44 +352,43 @@ This package contains the complete taxonomic tree of almost all microorganisms (# \donttest{
-# These examples all return "B_STPHY_AURS", the ID of S. aureus:
-as.mo("sau") # WHONET code
-as.mo("stau")
-as.mo("STAU")
-as.mo("staaur")
-as.mo("S. aureus")
-as.mo("S aureus")
-as.mo("Staphylococcus aureus")
-as.mo("Staphylococcus aureus (MRSA)")
-as.mo("Zthafilokkoockus oureuz") # handles incorrect spelling
-as.mo("MRSA") # Methicillin Resistant S. aureus
-as.mo("VISA") # Vancomycin Intermediate S. aureus
-as.mo("VRSA") # Vancomycin Resistant S. aureus
-as.mo(115329001) # SNOMED CT code
-
-# Dyslexia is no problem - these all work:
-as.mo("Ureaplasma urealyticum")
-as.mo("Ureaplasma urealyticus")
-as.mo("Ureaplasmium urealytica")
-as.mo("Ureaplazma urealitycium")
-
-as.mo("Streptococcus group A")
-as.mo("GAS") # Group A Streptococci
-as.mo("GBS") # Group B Streptococci
-
-as.mo("S. epidermidis") # will remain species: B_STPHY_EPDR
-as.mo("S. epidermidis", Becker = TRUE) # will not remain species: B_STPHY_CONS
-
-as.mo("S. pyogenes") # will remain species: B_STRPT_PYGN
-as.mo("S. pyogenes", Lancefield = TRUE) # will not remain species: B_STRPT_GRPA
-
-# All mo_* functions use as.mo() internally too (see ?mo_property):
-mo_genus("E. coli") # returns "Escherichia"
-mo_gramstain("E. coli") # returns "Gram negative"
-mo_is_intrinsic_resistant("E. coli", "vanco") # returns TRUE
-# }
-
# \donttest{
+# These examples all return "B_STPHY_AURS", the ID of S. aureus:
+as.mo("sau") # WHONET code
+as.mo("stau")
+as.mo("STAU")
+as.mo("staaur")
+as.mo("S. aureus")
+as.mo("S aureus")
+as.mo("Staphylococcus aureus")
+as.mo("Staphylococcus aureus (MRSA)")
+as.mo("Zthafilokkoockus oureuz") # handles incorrect spelling
+as.mo("MRSA") # Methicillin Resistant S. aureus
+as.mo("VISA") # Vancomycin Intermediate S. aureus
+as.mo("VRSA") # Vancomycin Resistant S. aureus
+as.mo(115329001) # SNOMED CT code
+
+# Dyslexia is no problem - these all work:
+as.mo("Ureaplasma urealyticum")
+as.mo("Ureaplasma urealyticus")
+as.mo("Ureaplasmium urealytica")
+as.mo("Ureaplazma urealitycium")
+
+as.mo("Streptococcus group A")
+as.mo("GAS") # Group A Streptococci
+as.mo("GBS") # Group B Streptococci
+
+as.mo("S. epidermidis") # will remain species: B_STPHY_EPDR
+as.mo("S. epidermidis", Becker = TRUE) # will not remain species: B_STPHY_CONS
+
+as.mo("S. pyogenes") # will remain species: B_STRPT_PYGN
+as.mo("S. pyogenes", Lancefield = TRUE) # will not remain species: B_STRPT_GRPA
+
+# All mo_* functions use as.mo() internally too (see ?mo_property):
+mo_genus("E. coli") # returns "Escherichia"
+mo_gramstain("E. coli") # returns "Gram negative"
+mo_is_intrinsic_resistant("E. coli", "vanco") # returns TRUE
+# }
key_antimicrobials(
- x = NULL,
- col_mo = NULL,
- universal = c("ampicillin", "amoxicillin/clavulanic acid", "cefuroxime",
- "piperacillin/tazobactam", "ciprofloxacin", "trimethoprim/sulfamethoxazole"),
- gram_negative = c("gentamicin", "tobramycin", "colistin", "cefotaxime",
- "ceftazidime", "meropenem"),
- gram_positive = c("vancomycin", "teicoplanin", "tetracycline", "erythromycin",
- "oxacillin", "rifampin"),
- antifungal = c("anidulafungin", "caspofungin", "fluconazole", "miconazole",
- "nystatin", "voriconazole"),
- only_rsi_columns = FALSE,
- ...
-)
-
-all_antimicrobials(x = NULL, only_rsi_columns = FALSE, ...)
-
-antimicrobials_equal(
- y,
- z,
- type = c("points", "keyantimicrobials"),
- ignore_I = TRUE,
- points_threshold = 2,
- ...
-)
key_antimicrobials(
+ x = NULL,
+ col_mo = NULL,
+ universal = c("ampicillin", "amoxicillin/clavulanic acid", "cefuroxime",
+ "piperacillin/tazobactam", "ciprofloxacin", "trimethoprim/sulfamethoxazole"),
+ gram_negative = c("gentamicin", "tobramycin", "colistin", "cefotaxime", "ceftazidime",
+ "meropenem"),
+ gram_positive = c("vancomycin", "teicoplanin", "tetracycline", "erythromycin",
+ "oxacillin", "rifampin"),
+ antifungal = c("anidulafungin", "caspofungin", "fluconazole", "miconazole", "nystatin",
+ "voriconazole"),
+ only_rsi_columns = FALSE,
+ ...
+)
+
+all_antimicrobials(x = NULL, only_rsi_columns = FALSE, ...)
+
+antimicrobials_equal(
+ y,
+ z,
+ type = c("points", "keyantimicrobials"),
+ ignore_I = TRUE,
+ points_threshold = 2,
+ ...
+)
a data.frame with antibiotics columns, like AMX
or amox
. Can be left blank to determine automatically
column name of the IDs of the microorganisms (see as.mo()
), defaults to the first column of class mo
. Values will be coerced using as.mo()
.
names of broad-spectrum antimicrobial agents, case-insensitive. Set to NULL
to ignore. See Details for the default agents.
names of antibiotic agents for Gram-positives, case-insensitive. Set to NULL
to ignore. See Details for the default agents.
names of antibiotic agents for Gram-negatives, case-insensitive. Set to NULL
to ignore. See Details for the default agents.
names of antifungal agents for fungi, case-insensitive. Set to NULL
to ignore. See Details for the default agents.
a logical to indicate whether only columns must be included that were transformed to class <rsi>
(see as.rsi()
) on beforehand (defaults to FALSE
)
ignored, only in place to allow future extensions
character vectors to compare
type to determine weighed isolates; can be "keyantimicrobials"
or "points"
, see Details
logical to indicate whether antibiotic interpretations with "I"
will be ignored when type = "keyantimicrobials"
, see Details
minimum number of points to require before differences in the antibiogram will lead to inclusion of an isolate when type = "points"
, see Details
# `example_isolates` is a data set available in the AMR package.
-# See ?example_isolates.
-
-# output of the `key_antimicrobials()` function could be like this:
-strainA <- "SSSRR.S.R..S"
-strainB <- "SSSIRSSSRSSS"
-
-# those strings can be compared with:
-antimicrobials_equal(strainA, strainB, type = "keyantimicrobials")
-# TRUE, because I is ignored (as well as missing values)
-
-antimicrobials_equal(strainA, strainB, type = "keyantimicrobials", ignore_I = FALSE)
-# FALSE, because I is not ignored and so the 4th [character] differs
-
-# \donttest{
-if (require("dplyr")) {
- # set key antibiotics to a new variable
- my_patients <- example_isolates %>%
- mutate(keyab = key_antimicrobials(antifungal = NULL)) %>% # no need to define `x`
- mutate(
- # now calculate first isolates
- first_regular = first_isolate(col_keyantimicrobials = FALSE),
- # and first WEIGHTED isolates
- first_weighted = first_isolate(col_keyantimicrobials = "keyab")
- )
-
- # Check the difference, in this data set it results in more isolates:
- sum(my_patients$first_regular, na.rm = TRUE)
- sum(my_patients$first_weighted, na.rm = TRUE)
-}
-# }
-
# `example_isolates` is a data set available in the AMR package.
+# See ?example_isolates.
+
+# output of the `key_antimicrobials()` function could be like this:
+strainA <- "SSSRR.S.R..S"
+strainB <- "SSSIRSSSRSSS"
+
+# those strings can be compared with:
+antimicrobials_equal(strainA, strainB, type = "keyantimicrobials")
+# TRUE, because I is ignored (as well as missing values)
+
+antimicrobials_equal(strainA, strainB, type = "keyantimicrobials", ignore_I = FALSE)
+# FALSE, because I is not ignored and so the 4th [character] differs
+
+# \donttest{
+if (require("dplyr")) {
+ # set key antibiotics to a new variable
+ my_patients <- example_isolates %>%
+ mutate(keyab = key_antimicrobials(antifungal = NULL)) %>% # no need to define `x`
+ mutate(
+ # now calculate first isolates
+ first_regular = first_isolate(col_keyantimicrobials = FALSE),
+ # and first WEIGHTED isolates
+ first_weighted = first_isolate(col_keyantimicrobials = "keyab")
+ )
+
+ # Check the difference, in this data set it results in more isolates:
+ sum(my_patients$first_regular, na.rm = TRUE)
+ sum(my_patients$first_weighted, na.rm = TRUE)
+}
+# }
mo_matching_score(x, n)
mo_matching_score(x, n)
Any user input value(s)
A full taxonomic name, that exists in microorganisms$fullname
as.mo("E. coli")
-mo_uncertainties()
-
-mo_matching_score(x = "E. coli",
- n = c("Escherichia coli", "Entamoeba coli"))
-
as.mo("E. coli")
+mo_uncertainties()
+
+mo_matching_score(x = "E. coli",
+ n = c("Escherichia coli", "Entamoeba coli"))
mo_name(x, language = get_AMR_locale(), ...)
-
-mo_fullname(x, language = get_AMR_locale(), ...)
-
-mo_shortname(x, language = get_AMR_locale(), ...)
-
-mo_subspecies(x, language = get_AMR_locale(), ...)
-
-mo_species(x, language = get_AMR_locale(), ...)
-
-mo_genus(x, language = get_AMR_locale(), ...)
-
-mo_family(x, language = get_AMR_locale(), ...)
-
-mo_order(x, language = get_AMR_locale(), ...)
-
-mo_class(x, language = get_AMR_locale(), ...)
-
-mo_phylum(x, language = get_AMR_locale(), ...)
-
-mo_kingdom(x, language = get_AMR_locale(), ...)
-
-mo_domain(x, language = get_AMR_locale(), ...)
-
-mo_type(x, language = get_AMR_locale(), ...)
-
-mo_gramstain(x, language = get_AMR_locale(), ...)
-
-mo_is_gram_negative(x, language = get_AMR_locale(), ...)
-
-mo_is_gram_positive(x, language = get_AMR_locale(), ...)
-
-mo_is_yeast(x, language = get_AMR_locale(), ...)
-
-mo_is_intrinsic_resistant(x, ab, language = get_AMR_locale(), ...)
-
-mo_snomed(x, language = get_AMR_locale(), ...)
-
-mo_ref(x, language = get_AMR_locale(), ...)
-
-mo_authors(x, language = get_AMR_locale(), ...)
-
-mo_year(x, language = get_AMR_locale(), ...)
-
-mo_lpsn(x, language = get_AMR_locale(), ...)
-
-mo_rank(x, language = get_AMR_locale(), ...)
-
-mo_taxonomy(x, language = get_AMR_locale(), ...)
-
-mo_synonyms(x, language = get_AMR_locale(), ...)
-
-mo_info(x, language = get_AMR_locale(), ...)
-
-mo_url(x, open = FALSE, language = get_AMR_locale(), ...)
-
-mo_property(x, property = "fullname", language = get_AMR_locale(), ...)
mo_name(x, language = get_AMR_locale(), ...)
+
+mo_fullname(x, language = get_AMR_locale(), ...)
+
+mo_shortname(x, language = get_AMR_locale(), ...)
+
+mo_subspecies(x, language = get_AMR_locale(), ...)
+
+mo_species(x, language = get_AMR_locale(), ...)
+
+mo_genus(x, language = get_AMR_locale(), ...)
+
+mo_family(x, language = get_AMR_locale(), ...)
+
+mo_order(x, language = get_AMR_locale(), ...)
+
+mo_class(x, language = get_AMR_locale(), ...)
+
+mo_phylum(x, language = get_AMR_locale(), ...)
+
+mo_kingdom(x, language = get_AMR_locale(), ...)
+
+mo_domain(x, language = get_AMR_locale(), ...)
+
+mo_type(x, language = get_AMR_locale(), ...)
+
+mo_gramstain(x, language = get_AMR_locale(), ...)
+
+mo_is_gram_negative(x, language = get_AMR_locale(), ...)
+
+mo_is_gram_positive(x, language = get_AMR_locale(), ...)
+
+mo_is_yeast(x, language = get_AMR_locale(), ...)
+
+mo_is_intrinsic_resistant(x, ab, language = get_AMR_locale(), ...)
+
+mo_snomed(x, language = get_AMR_locale(), ...)
+
+mo_ref(x, language = get_AMR_locale(), ...)
+
+mo_authors(x, language = get_AMR_locale(), ...)
+
+mo_year(x, language = get_AMR_locale(), ...)
+
+mo_lpsn(x, language = get_AMR_locale(), ...)
+
+mo_rank(x, language = get_AMR_locale(), ...)
+
+mo_taxonomy(x, language = get_AMR_locale(), ...)
+
+mo_synonyms(x, language = get_AMR_locale(), ...)
+
+mo_info(x, language = get_AMR_locale(), ...)
+
+mo_url(x, open = FALSE, language = get_AMR_locale(), ...)
+
+mo_property(x, property = "fullname", language = get_AMR_locale(), ...)
any character (vector) that can be coerced to a valid microorganism code with as.mo()
. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, see Examples.
language of the returned text, defaults to system language (see get_AMR_locale()
) and can be overwritten by setting the option AMR_locale
, e.g. options(AMR_locale = "de")
, see translate. Also used to translate text like "no growth". Use language = NULL
or language = ""
to prevent translation.
other arguments passed on to as.mo()
, such as 'allow_uncertain' and 'ignore_pattern'
any (vector of) text that can be coerced to a valid antibiotic code with as.ab()
browse the URL using browseURL()
one of the column names of the microorganisms data set: "mo", "fullname", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "species_id", "source", "prevalence" or "snomed", or must be "shortname"
An integer in case of mo_year()
An integer in case of mo_year()
A list in case of mo_taxonomy()
and mo_info()
A named character in case of mo_url()
A numeric in case of mo_snomed()
# taxonomic tree -----------------------------------------------------------
-mo_kingdom("E. coli") # "Bacteria"
-mo_phylum("E. coli") # "Proteobacteria"
-mo_class("E. coli") # "Gammaproteobacteria"
-mo_order("E. coli") # "Enterobacterales"
-mo_family("E. coli") # "Enterobacteriaceae"
-mo_genus("E. coli") # "Escherichia"
-mo_species("E. coli") # "coli"
-mo_subspecies("E. coli") # ""
-
-# colloquial properties ----------------------------------------------------
-mo_name("E. coli") # "Escherichia coli"
-mo_fullname("E. coli") # "Escherichia coli" - same as mo_name()
-mo_shortname("E. coli") # "E. coli"
-
-# other properties ---------------------------------------------------------
-mo_gramstain("E. coli") # "Gram-negative"
-mo_snomed("E. coli") # 112283007, 116395006, ... (SNOMED codes)
-mo_type("E. coli") # "Bacteria" (equal to kingdom, but may be translated)
-mo_rank("E. coli") # "species"
-mo_url("E. coli") # get the direct url to the online database entry
-mo_synonyms("E. coli") # get previously accepted taxonomic names
-
-# scientific reference -----------------------------------------------------
-mo_ref("E. coli") # "Castellani et al., 1919"
-mo_authors("E. coli") # "Castellani et al."
-mo_year("E. coli") # 1919
-mo_lpsn("E. coli") # 776057 (LPSN record ID)
-
-# abbreviations known in the field -----------------------------------------
-mo_genus("MRSA") # "Staphylococcus"
-mo_species("MRSA") # "aureus"
-mo_shortname("VISA") # "S. aureus"
-mo_gramstain("VISA") # "Gram-positive"
-
-mo_genus("EHEC") # "Escherichia"
-mo_species("EHEC") # "coli"
-
-# known subspecies ---------------------------------------------------------
-mo_name("doylei") # "Campylobacter jejuni doylei"
-mo_genus("doylei") # "Campylobacter"
-mo_species("doylei") # "jejuni"
-mo_subspecies("doylei") # "doylei"
-
-mo_fullname("K. pneu rh") # "Klebsiella pneumoniae rhinoscleromatis"
-mo_shortname("K. pneu rh") # "K. pneumoniae"
-
-# \donttest{
-# Becker classification, see ?as.mo ----------------------------------------
-mo_fullname("S. epi") # "Staphylococcus epidermidis"
-mo_fullname("S. epi", Becker = TRUE) # "Coagulase-negative Staphylococcus (CoNS)"
-mo_shortname("S. epi") # "S. epidermidis"
-mo_shortname("S. epi", Becker = TRUE) # "CoNS"
-
-# Lancefield classification, see ?as.mo ------------------------------------
-mo_fullname("S. pyo") # "Streptococcus pyogenes"
-mo_fullname("S. pyo", Lancefield = TRUE) # "Streptococcus group A"
-mo_shortname("S. pyo") # "S. pyogenes"
-mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" (='Group A Streptococci')
-
-
-# language support --------------------------------------------------------
-mo_gramstain("E. coli", language = "de") # "Gramnegativ"
-mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
-mo_gramstain("E. coli", language = "es") # "Gram negativo"
-
-# mo_type is equal to mo_kingdom, but mo_kingdom will remain official
-mo_kingdom("E. coli") # "Bacteria" on a German system
-mo_type("E. coli") # "Bakterien" on a German system
-mo_type("E. coli") # "Bacteria" on an English system
-
-mo_fullname("S. pyogenes",
- Lancefield = TRUE,
- language = "de") # "Streptococcus Gruppe A"
-mo_fullname("S. pyogenes",
- Lancefield = TRUE,
- language = "nl") # "Streptococcus groep A"
-
-
-# other --------------------------------------------------------------------
-
-mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE
-
-# gram stains and intrinsic resistance can also be used as a filter in dplyr verbs
-# \donttest{
-if (require("dplyr")) {
- example_isolates %>%
- filter(mo_is_gram_positive())
-
- example_isolates %>%
- filter(mo_is_intrinsic_resistant(ab = "vanco"))
-}
-
-
-# get a list with the complete taxonomy (from kingdom to subspecies)
-mo_taxonomy("E. coli")
-# get a list with the taxonomy, the authors, Gram-stain,
-# SNOMED codes, and URL to the online database
-mo_info("E. coli")
-# }
-# }
-
# taxonomic tree -----------------------------------------------------------
+mo_kingdom("E. coli") # "Bacteria"
+mo_phylum("E. coli") # "Proteobacteria"
+mo_class("E. coli") # "Gammaproteobacteria"
+mo_order("E. coli") # "Enterobacterales"
+mo_family("E. coli") # "Enterobacteriaceae"
+mo_genus("E. coli") # "Escherichia"
+mo_species("E. coli") # "coli"
+mo_subspecies("E. coli") # ""
+
+# colloquial properties ----------------------------------------------------
+mo_name("E. coli") # "Escherichia coli"
+mo_fullname("E. coli") # "Escherichia coli" - same as mo_name()
+mo_shortname("E. coli") # "E. coli"
+
+# other properties ---------------------------------------------------------
+mo_gramstain("E. coli") # "Gram-negative"
+mo_snomed("E. coli") # 112283007, 116395006, ... (SNOMED codes)
+mo_type("E. coli") # "Bacteria" (equal to kingdom, but may be translated)
+mo_rank("E. coli") # "species"
+mo_url("E. coli") # get the direct url to the online database entry
+mo_synonyms("E. coli") # get previously accepted taxonomic names
+
+# scientific reference -----------------------------------------------------
+mo_ref("E. coli") # "Castellani et al., 1919"
+mo_authors("E. coli") # "Castellani et al."
+mo_year("E. coli") # 1919
+mo_lpsn("E. coli") # 776057 (LPSN record ID)
+
+# abbreviations known in the field -----------------------------------------
+mo_genus("MRSA") # "Staphylococcus"
+mo_species("MRSA") # "aureus"
+mo_shortname("VISA") # "S. aureus"
+mo_gramstain("VISA") # "Gram-positive"
+
+mo_genus("EHEC") # "Escherichia"
+mo_species("EHEC") # "coli"
+
+# known subspecies ---------------------------------------------------------
+mo_name("doylei") # "Campylobacter jejuni doylei"
+mo_genus("doylei") # "Campylobacter"
+mo_species("doylei") # "jejuni"
+mo_subspecies("doylei") # "doylei"
+
+mo_fullname("K. pneu rh") # "Klebsiella pneumoniae rhinoscleromatis"
+mo_shortname("K. pneu rh") # "K. pneumoniae"
+
+# \donttest{
+# Becker classification, see ?as.mo ----------------------------------------
+mo_fullname("S. epi") # "Staphylococcus epidermidis"
+mo_fullname("S. epi", Becker = TRUE) # "Coagulase-negative Staphylococcus (CoNS)"
+mo_shortname("S. epi") # "S. epidermidis"
+mo_shortname("S. epi", Becker = TRUE) # "CoNS"
+
+# Lancefield classification, see ?as.mo ------------------------------------
+mo_fullname("S. pyo") # "Streptococcus pyogenes"
+mo_fullname("S. pyo", Lancefield = TRUE) # "Streptococcus group A"
+mo_shortname("S. pyo") # "S. pyogenes"
+mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" (='Group A Streptococci')
+
+
+# language support --------------------------------------------------------
+mo_gramstain("E. coli", language = "de") # "Gramnegativ"
+mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
+mo_gramstain("E. coli", language = "es") # "Gram negativo"
+
+# mo_type is equal to mo_kingdom, but mo_kingdom will remain official
+mo_kingdom("E. coli") # "Bacteria" on a German system
+mo_type("E. coli") # "Bakterien" on a German system
+mo_type("E. coli") # "Bacteria" on an English system
+
+mo_fullname("S. pyogenes",
+ Lancefield = TRUE,
+ language = "de") # "Streptococcus Gruppe A"
+mo_fullname("S. pyogenes",
+ Lancefield = TRUE,
+ language = "nl") # "Streptococcus groep A"
+
+
+# other --------------------------------------------------------------------
+
+mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE
+
+# gram stains and intrinsic resistance can also be used as a filter in dplyr verbs
+# \donttest{
+if (require("dplyr")) {
+ example_isolates %>%
+ filter(mo_is_gram_positive())
+
+ example_isolates %>%
+ filter(mo_is_intrinsic_resistant(ab = "vanco"))
+}
+
+
+# get a list with the complete taxonomy (from kingdom to subspecies)
+mo_taxonomy("E. coli")
+# get a list with the taxonomy, the authors, Gram-stain,
+# SNOMED codes, and URL to the online database
+mo_info("E. coli")
+# }
+# }
rsi_translation
rsi_translation
Overview of the data set:
-head(rsi_translation)
head(rsi_translation)
+#> guideline method site mo rank_index ab ref_tbl disk_dose
+#> 1 EUCAST 2022 MIC <NA> F_ASPRG_MGTS 2 AMB Aspergillus <NA>
+#> 2 EUCAST 2022 MIC <NA> F_ASPRG_NIGR 2 AMB Aspergillus <NA>
+#> 3 EUCAST 2022 MIC <NA> F_CANDD 3 AMB Candida <NA>
+#> 4 EUCAST 2022 MIC <NA> F_CANDD_ALBC 2 AMB Candida <NA>
+#> 5 EUCAST 2022 MIC <NA> F_CANDD_DBLN 2 AMB Candida <NA>
+#> 6 EUCAST 2022 MIC <NA> F_CANDD_KRUS 2 AMB Candida <NA>
+#> breakpoint_S breakpoint_R uti
+#> 1 1 1 FALSE
+#> 2 1 1 FALSE
+#> 3 1 1 FALSE
+#> 4 1 1 FALSE
+#> 5 1 1 FALSE
+#> 6 1 1 FALSE
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 and the mo
and ab
columns have been transformed to contain the full official names instead of codes.