Background information on included data

Some pages about our package and its external sources. Be sure to read our How To’s for more information about how to work with functions in this package.


The AMR Package


Data Set with 2,000 Example Isolates


Data Set with 70,026 Microorganisms

Data Set with 5,605 Common Microorganism Codes


Data Set with Previously Accepted Taxonomic Names

antibiotics antivirals

Data Sets with 558 Antimicrobials


Data Set with Bacterial Intrinsic Resistance


Data Set with Treatment Dosages as Defined by EUCAST


The Catalogue of Life


Version info of included Catalogue of Life


WHOCC: WHO Collaborating Centre for Drug Statistics Methodology


Lifecycles of Functions in the AMR Package


Data Set with Unclean Data


Data Set for R/SI Interpretation


Data Set with 500 Isolates - WHONET Example

Preparing data: microorganisms

These functions are meant to get taxonomically valid properties of microorganisms from any input. Use mo_source() to teach this package how to translate your own codes to valid microorganism codes. mo_failures() mo_uncertainties() mo_renamed()

Transform Input to a Microorganism ID

mo_name() mo_fullname() mo_shortname() mo_subspecies() mo_species() mo_genus() mo_family() mo_order() mo_class() mo_phylum() mo_kingdom() mo_domain() mo_type() mo_gramstain() mo_is_gram_negative() mo_is_gram_positive() mo_is_yeast() mo_is_intrinsic_resistant() mo_snomed() mo_ref() mo_authors() mo_year() mo_rank() mo_taxonomy() mo_synonyms() mo_info() mo_url() mo_property()

Get Properties of a Microorganism

set_mo_source() get_mo_source()

User-Defined Reference Data Set for Microorganisms

Preparing data: antibiotics

Use these functions to get valid properties of antibiotics from any input or to clean your input. You can even retrieve drug names and doses from clinical text records, using ab_from_text().

as.ab() is.ab()

Transform Input to an Antibiotic ID

ab_name() ab_atc() ab_cid() ab_synonyms() ab_tradenames() ab_group() ab_atc_group1() ab_atc_group2() ab_loinc() ab_ddd() ab_info() ab_url() ab_property()

Get Properties of an Antibiotic


Retrieve Antimicrobial Drug Names and Doses from Clinical Text

atc_online_property() atc_online_groups() atc_online_ddd()

Get ATC Properties from WHOCC Website

Preparing data: antimicrobial resistance

With as.mic() and as.disk() you can transform your raw input to valid MIC or disk diffusion values. Use as.rsi() for cleaning raw data to let it only contain “R”, “I” and “S”, or to interpret MIC or disk diffusion values as R/SI based on the lastest EUCAST and CLSI guidelines. Afterwards, you can extend antibiotic interpretations by applying EUCAST rules with eucast_rules().

as.rsi() is.rsi() is.rsi.eligible()

Interpret MIC and Disk Values, or Clean Raw R/SI Data

as.mic() is.mic()

Transform Input to Minimum Inhibitory Concentrations (MIC)

as.disk() is.disk()

Transform Input to Disk Diffusion Diameters

eucast_rules() eucast_dosage()

Apply EUCAST Rules


Define Custom EUCAST Rules

Analysing data: antimicrobial resistance

Use these function for the analysis part. You can use susceptibility() or resistance() on any antibiotic column. Be sure to first select the isolates that are appropiate for analysis, by using first_isolate() or is_new_episode(). You can also filter your data on certain resistance in certain antibiotic classes (filter_ab_class()), or determine multi-drug resistant microorganisms (MDRO, mdro()).

resistance() susceptibility() proportion_R() proportion_IR() proportion_I() proportion_SI() proportion_S() proportion_df() rsi_df()

Calculate Microbial Resistance

count_resistant() count_susceptible() count_R() count_IR() count_I() count_SI() count_S() count_all() n_rsi() count_df()

Count Available Isolates

get_episode() is_new_episode()

Determine (New) Episodes for Patients

first_isolate() filter_first_isolate()

Determine First (Weighted) Isolates

key_antimicrobials() all_antimicrobials() antimicrobials_equal()

(Key) Antimicrobials for First Weighted Isolates

mdro() custom_mdro_guideline() brmo() mrgn() mdr_tb() mdr_cmi2012() eucast_exceptional_phenotypes()

Determine Multidrug-Resistant Organisms (MDRO)

plot(<mic>) ggplot(<mic>) plot(<disk>) ggplot(<disk>) plot(<rsi>) ggplot(<rsi>)

Plotting for Classes rsi, mic and disk

ggplot_rsi() geom_rsi() facet_rsi() scale_y_percent() scale_rsi_colours() theme_rsi() labels_rsi_count()

AMR Plots with ggplot2

bug_drug_combinations() format(<bug_drug_combinations>)

Determine Bug-Drug Combinations

ab_class() aminoglycosides() carbapenems() cephalosporins() cephalosporins_1st() cephalosporins_2nd() cephalosporins_3rd() cephalosporins_4th() cephalosporins_5th() fluoroquinolones() glycopeptides() macrolides() oxazolidinones() penicillins() tetracyclines()

Antibiotic Class Selectors

filter_ab_class() filter_aminoglycosides() filter_carbapenems() filter_cephalosporins() filter_1st_cephalosporins() filter_2nd_cephalosporins() filter_3rd_cephalosporins() filter_4th_cephalosporins() filter_5th_cephalosporins() filter_fluoroquinolones() filter_glycopeptides() filter_macrolides() filter_oxazolidinones() filter_penicillins() filter_tetracyclines()

Filter Isolates on Result in Antimicrobial Class

resistance_predict() rsi_predict() plot(<resistance_predict>) ggplot(<resistance_predict>) ggplot_rsi_predict()

Predict antimicrobial resistance


Guess Antibiotic Column

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) {...}.


Split Ages into Age Groups


Age in Years of Individuals


Check Availability of Columns


Translate Strings from AMR Package


PCA Biplot with ggplot2

italicise_taxonomy() italicize_taxonomy()

Italicise Taxonomic Families, Genera, Species, Subspecies

inner_join_microorganisms() left_join_microorganisms() right_join_microorganisms() full_join_microorganisms() semi_join_microorganisms() anti_join_microorganisms()

Join microorganisms to a Data Set

like() `%like%` `%unlike%` `%like_case%` `%unlike_case%`

Vectorised Pattern Matching with Keyboard Shortcut


Calculate the Matching Score for Microorganisms


Principal Component Analysis (for AMR)

random_mic() random_disk() random_rsi()

Random MIC Values/Disk Zones/RSI 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 for Count Data


Kurtosis of the Sample


Skewness of the Sample

Other: deprecated functions

These functions are deprecated, meaning that they will still work but show a warning with every use and will be removed in a future version.

p_symbol() filter_first_weighted_isolate() key_antibiotics() key_antibiotics_equal()

Deprecated Functions