Background information

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.

AMR

The AMR Package

catalogue_of_life

The Catalogue of Life

catalogue_of_life_version()

Version info of included Catalogue of Life

WHOCC

WHOCC: WHO Collaborating Centre for Drug Statistics Methodology

Cleaning your data

Functions for cleaning and optimising your data, to be able to add variables later on (like taxonomic properties) or to fix and extend antibiotic interpretations by applying EUCAST rules.

as.atc() is.atc()

Transform to ATC code

as.mic() is.mic()

Class 'mic'

as.mo() is.mo() mo_failures() mo_uncertainties() mo_renamed()

Transform to microorganism ID

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

Class 'rsi'

set_mo_source() get_mo_source()

Use predefined reference data set

eucast_rules() EUCAST_rules() interpretive_reading()

EUCAST rules

guess_ab_col()

Guess antibiotic column

read.4D()

Read data from 4D database

Adding variables to your data

Functions to add new data to existing data, like the determination of first isolates, multi-drug resistant microorganisms (MDRO), getting properties of microorganisms or antibiotics and determining the age of patients or divide ages into age groups.

first_isolate() filter_first_isolate() filter_first_weighted_isolate()

Determine first (weighted) isolates

mdro() brmo() mrgn() eucast_exceptional_phenotypes()

Determine multidrug-resistant organisms (MDRO)

key_antibiotics() key_antibiotics_equal()

Key antibiotics for first weighted isolates

mo_fullname() mo_shortname() mo_subspecies() mo_species() mo_genus() mo_family() mo_order() mo_class() mo_phylum() mo_kingdom() mo_type() mo_gramstain() mo_ref() mo_authors() mo_year() mo_taxonomy() mo_url() mo_property()

Property of a microorganism

atc_property() atc_official() atc_name() atc_trivial_nl() atc_certe() atc_umcg() atc_tradenames()

Property of an antibiotic

atc_online_property() atc_online_groups() atc_online_ddd()

Get ATC properties from WHOCC website

abname()

Name of an antibiotic

age()

Age in years of individuals

age_groups()

Split ages into age groups

p.symbol()

Symbol of a p value

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

Join a table with microorganisms

Analysing your data

Functions for conducting AMR analysis, like counting isolates, calculating resistance or susceptibility, creating frequency tables or make plots.

availability()

Check availability of columns

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

Count isolates

portion_R() portion_IR() portion_I() portion_SI() portion_S() portion_df()

Calculate resistance of isolates

frequency_tbl() freq() top_freq() header() print(<frequency_tbl>)

Frequency table

g.test()

G-test for Count Data

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

AMR plots with ggplot2

kurtosis()

Kurtosis of the sample

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

Predict antimicrobial resistance

rsi()

Calculate resistance of isolates

skewness()

Skewness of the sample

Included data sets

References for microorganisms and antibiotics, and even a genuine data set with isolates from septic patients.

antibiotics

Data set with ~500 antibiotics

microorganisms

Data set with ~60,000 microorganisms

septic_patients

Data set with 2,000 blood culture isolates from septic patients

WHONET

Data set with 500 isolates - WHONET example

microorganisms.codes

Translation table for microorganism codes

microorganisms.old

Data set with previously accepted taxonomic names

Other

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

get_locale()

Get language for AMR

like() `%like%`

Pattern Matching

ratio() guess_mo() guess_atc() ab_property() ab_atc() ab_official() ab_name() ab_trivial_nl() ab_certe() ab_umcg() ab_tradenames() atc_ddd() atc_groups()

Deprecated functions