A data set with 67,151 rows and 16 columns, containing the following column names:
‘mo’, ‘fullname’, ‘kingdom’, ‘phylum’, ‘class’, ‘order’, ‘family’, ‘genus’, ‘species’, ‘subspecies’, ‘rank’, ‘ref’, ‘species_id’, ‘source’, ‘prevalence’, ‘snomed’.
A data set with 67,151 rows and 16 columns, containing the following column names:
class, family, fullname, genus, kingdom, mo, order, phylum, prevalence, rank, ref, snomed, source, species, species_id and subspecies.
This data set is in R available as microorganisms
, after you load the AMR
package.
It was last updated on 3 September 2020 20:59:45 CEST. Find more info about the structure of this data set here.
Direct download links:
@@ -426,7 +426,7 @@ If you are reading this page from within R, pleaseA data set with 12,708 rows and 4 columns, containing the following column names:
‘fullname’, ‘fullname_new’, ‘ref’, ‘prevalence’.
A data set with 12,708 rows and 4 columns, containing the following column names:
fullname, fullname_new, prevalence and ref.
Note: remember that the ‘ref’ columns contains the scientific reference to the old taxonomic entries, i.e. of column ‘fullname’. For the scientific reference of the new names, i.e. of column ‘fullname_new’, see the microorganisms
data set.
This data set is in R available as microorganisms.old
, after you load the AMR
package.
It was last updated on 28 May 2020 11:17:56 CEST. Find more info about the structure of this data set here.
@@ -492,7 +492,7 @@ If you are reading this page from within R, pleaseA data set with 456 rows and 14 columns, containing the following column names:
‘ab’, ‘atc’, ‘cid’, ‘name’, ‘group’, ‘atc_group1’, ‘atc_group2’, ‘abbreviations’, ‘synonyms’, ‘oral_ddd’, ‘oral_units’, ‘iv_ddd’, ‘iv_units’, ‘loinc’.
A data set with 456 rows and 14 columns, containing the following column names:
ab, abbreviations, atc, atc_group1, atc_group2, cid, group, iv_ddd, iv_units, loinc, name, oral_ddd, oral_units and synonyms.
This data set is in R available as antibiotics
, after you load the AMR
package.
It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
Direct download links:
@@ -515,7 +515,7 @@ If you are reading this page from within R, please ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology (note: this may not be used for commercial purposes, but is frelly available from the WHO CC website for personal use) +ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)A data set with 102 rows and 9 columns, containing the following column names:
‘atc’, ‘cid’, ‘name’, ‘atc_group’, ‘synonyms’, ‘oral_ddd’, ‘oral_units’, ‘iv_ddd’, ‘iv_units’.
A data set with 102 rows and 9 columns, containing the following column names:
atc, atc_group, cid, iv_ddd, iv_units, name, oral_ddd, oral_units and synonyms.
This data set is in R available as antivirals
, after you load the AMR
package.
It was last updated on 29 August 2020 21:53:07 CEST. Find more info about the structure of this data set here.
Direct download links:
@@ -683,7 +683,7 @@ If you are reading this page from within R, please ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology (note: this may not be used for commercial purposes, but is frelly available from the WHO CC website for personal use) +ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)A data set with 93,892 rows and 2 columns, containing the following column names:
‘microorganism’, ‘antibiotic’.
A data set with 93,892 rows and 2 columns, containing the following column names:
antibiotic and microorganism.
This data set is in R available as intrinsic_resistant
, after you load the AMR
package.
It was last updated on 24 September 2020 00:50:35 CEST. Find more info about the structure of this data set here.
Direct download links:
@@ -807,7 +807,7 @@ If you are reading this page from within R, pleaseThis data set contains all defined intrinsic resistance by EUCAST of all bug-drug combinations, and is based on ‘’EUCAST Expert Rules’ and ‘EUCAST Intrinsic Resistance and Unusual Phenotypes’’, v3.2 from 2020.
+This data set contains all defined intrinsic resistance by EUCAST of all bug-drug combinations, and is based on ‘EUCAST Expert Rules’ and ‘EUCAST Intrinsic Resistance and Unusual Phenotypes’ v3.2 (2020).
A data set with 20,486 rows and 10 columns, containing the following column names:
‘guideline’, ‘method’, ‘site’, ‘mo’, ‘ab’, ‘ref_tbl’, ‘disk_dose’, ‘breakpoint_S’, ‘breakpoint_R’, ‘uti’.
A data set with 20,486 rows and 10 columns, containing the following column names:
ab, breakpoint_R, breakpoint_S, disk_dose, guideline, method, mo, ref_tbl, site and uti.
This data set is in R available as rsi_translation
, after you load the AMR
package.
It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
Direct download links:
@@ -1132,22 +1132,22 @@ If you are reading this page from within R, pleaseA data set with 135 rows and 9 columns, containing the following column names:
‘ab’, ‘name’, ‘type’, ‘dose’, ‘dose_times’, ‘administration’, ‘notes’, ‘original_txt’, ‘eucast_version’.
A data set with 169 rows and 9 columns, containing the following column names:
ab, administration, dose, dose_times, eucast_version, name, notes, original_txt and type.
This data set is in R available as dosage
, after you load the AMR
package.
It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
+It was last updated on 25 January 2021 21:58:20 CET. Find more info about the structure of this data set here.
Direct download links:
NEWS.md
- is.rsi()
now returns a vector of TRUE
/FALSE
when the input is a data set, in case it will iterate over all columnsis.rsi()
and is.rsi.eligible()
now return a vector of TRUE
/FALSE
when the input is a data set, by iterating over all columns
mo_is_gram_negative()
, mo_is_gram_positive()
, mo_is_intrinsic_resistant()
, first_isolate()
, mdro()
) now work with dplyr
s group_by()
againfirst_isolate()
can be used with group_by()
(also when using a dot .
as input for the data) and now returns the names of the groupsmicroorganisms.codes
(which contains popular LIS and WHONET codes for microorganisms) for some species of Mycobacterium that previously incorrectly returned M. africanum
antibiotics
data setMaking this package independent of especially the tidyverse (e.g. packages dplyr
and tidyr
) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.
Negative effects of this change are:
freq()
that was borrowed from the cleaner
package was removed. Use cleaner::freq()
, or run library("cleaner")
before you use freq()
.freq()
that was borrowed from the cleaner
package was removed. Use cleaner::freq()
, or run library("cleaner")
before you use freq()
.mo
or rsi
in a tibble will no longer be in colour and printing rsi
in a tibble will show the class <ord>
, not <rsi>
anymore. This is purely a visual effect.mo_*
family (like mo_name()
and mo_gramstain()
) are noticeably slower when running on hundreds of thousands of rows.mo
and ab
now both also inherit class character
, to support any data transformation. This change invalidates code that checks for class length == 1.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 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).
Renamed data set septic_patients
to example_isolates
age()
function gained a new argument exact
to determine ages with decimalsguess_mo()
, guess_atc()
, EUCAST_rules()
, interpretive_reading()
, rsi()
freq()
):
+freq()
):
speed improvement for microbial IDs
fixed factor level names for R Markdown
age_groups()
, to let groups of fives and tens end with 100+ instead of 120+freq()
for when all values are NA
+freq()
for when all values are NA
first_isolate()
for when dates are missingguess_ab_col()
@@ -1520,7 +1522,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
freq()
function):
+freq()
function):
Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:
@@ -1530,15 +1532,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/ # OLD WAY septic_patients %>% mutate(genus = mo_genus(mo)) %>% - freq(genus) + freq(genus) # NEW WAY septic_patients %>% - freq(mo_genus(mo)) + 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
Using portion_*
functions now throws a warning when total available isolate is below argument minimum
Functions as.mo
, as.rsi
, as.mic
, as.atc
and freq
will not set package name as attribute anymore
Frequency tables - freq()
:
Frequency tables - freq()
:
Support for (un)selecting columns:
Check for hms::is.hms
Removed diacritics from all authors (columns microorganisms$ref
and microorganisms.old$ref
) to comply with CRAN policy to only allow ASCII characters
Fix for mo_property
not working properly
Fix for eucast_rules
where some Streptococci would become ceftazidime R in EUCAST rule 4.5
Support for named vectors of class mo
, useful for top_freq()
Support for named vectors of class mo
, useful for top_freq()
ggplot_rsi
and scale_y_percent
have breaks
argument
AI improvements for as.mo
:
For lists, subsetting is possible:
my_list = list(age = septic_patients$age, gender = septic_patients$gender)
-my_list %>% freq(age)
-my_list %>% freq(gender)
rsi
(antimicrobial resistance) to use as inputtable
to use as input: freq(table(x, y))
+table
to use as input: freq(table(x, y))
hist
and plot
to use a frequency table as input: hist(freq(df$age))
as.vector
, as.data.frame
, as_tibble
and format
freq(mydata, mycolumn)
is the same as mydata %>% freq(mycolumn)
+freq(mydata, mycolumn)
is the same as mydata %>% freq(mycolumn)
top_freq
function to return the top/below n items as vectorcharacter to pass on to paste(..., collapse = ...)
to only return one character per element of text
, see Examples
character to pass on to paste(, collapse = ...)
to only return one character per element of text
, see Examples
For interpreting MIC values as well as disk diffusion diameters, supported guidelines to be used as input for the guideline
argument are: "CLSI 2010", "CLSI 2011", "CLSI 2012", "CLSI 2013", "CLSI 2014", "CLSI 2015", "CLSI 2016", "CLSI 2017", "CLSI 2018", "CLSI 2019", "EUCAST 2011", "EUCAST 2012", "EUCAST 2013", "EUCAST 2014", "EUCAST 2015", "EUCAST 2016", "EUCAST 2017", "EUCAST 2018", "EUCAST 2019", "EUCAST 2020", "EUCAST 2021".
For interpreting MIC values as well as disk diffusion diameters, supported guidelines to be used as input for the guideline
argument are: "EUCAST 2021", "EUCAST 2020", "EUCAST 2019", "EUCAST 2018", "EUCAST 2017", "EUCAST 2016", "EUCAST 2015", "EUCAST 2014", "EUCAST 2013", "EUCAST 2012", "EUCAST 2011", "CLSI 2019", "CLSI 2018", "CLSI 2017", "CLSI 2016", "CLSI 2015", "CLSI 2014", "CLSI 2013", "CLSI 2012", "CLSI 2011" and "CLSI 2010".
Simply using "CLSI"
or "EUCAST"
as input will automatically select the latest version of that guideline. You can set your own data set using the reference_data
argument. The guideline
argument will then be ignored.
The function is.rsi()
detects if the input contains class <rsi>
. If the input is a data.frame, it returns a vector in which all columns are checked for this class.
The function is.rsi.eligible()
returns TRUE
when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and FALSE
otherwise. The threshold of 5% can be set with the threshold
argument.
The function is.rsi()
detects if the input contains class <rsi>
. If the input is a data.frame, it iterates over all columns and returns a logical vector.
The function is.rsi.eligible()
returns TRUE
when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and FALSE
otherwise. The threshold of 5% can be set with the threshold
argument. If the input is a data.frame, it iterates over all columns and returns a logical vector.
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
", "snomed
", or must be "shortname"
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"
Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv. This file will be read by all functions where a translated output can be desired, like all mo_*
functions (such as mo_name()
, mo_gramstain()
, mo_type()
, etc.) and ab_*
functions (such as ab_name()
, ab_group()
, etc.).
Currently supported languages are: Dutch, English, French, German, Italian, Portuguese, Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names.
+Currently supported languages are: Dutch, English, French, German, Italian, Portuguese and Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names.
Please suggest your own translations by creating a new issue on our repository.