Note: values on this page will change with every
-website update since they are based on randomly created values and the
-page was written in R
-Markdown. However, the methodology remains unchanged. This page was
-generated on 10 March 2022.
+
Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 12 March 2022.
Introduction
-
Conducting AMR data analysis unfortunately requires in-depth
-knowledge from different scientific fields, which makes it hard to do
-right. At least, it requires:
+
Conducting AMR data analysis unfortunately requires in-depth knowledge from different scientific fields, which makes it hard to do right. At least, it requires:
Good questions (always start with those!)
-
A thorough understanding of (clinical) epidemiology, to understand
-the clinical and epidemiological relevance and possible bias of
-results
-
A thorough understanding of (clinical) microbiology/infectious
-diseases, to understand which microorganisms are causal to which
-infections and the implications of pharmaceutical treatment, as well as
-understanding intrinsic and acquired microbial resistance
-
Experience with data analysis with microbiological tests and their
-results, to understand the determination and limitations of MIC values
-and their interpretations to RSI values
-
Availability of the biological taxonomy of microorganisms and
-probably normalisation factors for pharmaceuticals, such as defined
-daily doses (DDD)
-
Available (inter-)national guidelines, and profound methods to apply
-them
+
A thorough understanding of (clinical) epidemiology, to understand the clinical and epidemiological relevance and possible bias of results
+
A thorough understanding of (clinical) microbiology/infectious diseases, to understand which microorganisms are causal to which infections and the implications of pharmaceutical treatment, as well as understanding intrinsic and acquired microbial resistance
+
Experience with data analysis with microbiological tests and their results, to understand the determination and limitations of MIC values and their interpretations to RSI values
+
Availability of the biological taxonomy of microorganisms and probably normalisation factors for pharmaceuticals, such as defined daily doses (DDD)
+
Available (inter-)national guidelines, and profound methods to apply them
-
Of course, we cannot instantly provide you with knowledge and
-experience. But with this AMR package, we aimed at
-providing (1) tools to simplify antimicrobial resistance data cleaning,
-transformation and analysis, (2) methods to easily incorporate
-international guidelines and (3) scientifically reliable reference data,
-including the requirements mentioned above.
-
The AMR package enables standardised and reproducible
-AMR data analysis, with the application of evidence-based rules,
-determination of first isolates, translation of various codes for
-microorganisms and antimicrobial agents, determination of (multi-drug)
-resistant microorganisms, and calculation of antimicrobial resistance,
-prevalence and future trends.
+
Of course, we cannot instantly provide you with knowledge and experience. But with this AMR package, we aimed at providing (1) tools to simplify antimicrobial resistance data cleaning, transformation and analysis, (2) methods to easily incorporate international guidelines and (3) scientifically reliable reference data, including the requirements mentioned above.
+
The AMR package enables standardised and reproducible AMR data analysis, with the application of evidence-based rules, determination of first isolates, translation of various codes for microorganisms and antimicrobial agents, determination of (multi-drug) resistant microorganisms, and calculation of antimicrobial resistance, prevalence and future trends.
Preparation
-
For this tutorial, we will create fake demonstration data to work
-with.
-
You can skip to Cleaning the data if
-you already have your own data ready. If you start your analysis, try to
-make the structure of your data generally look like this:
+
For this tutorial, we will create fake demonstration data to work with.
+
You can skip to Cleaning the data if you already have your own data ready. If you start your analysis, try to make the structure of your data generally look like this:
date
@@ -261,21 +231,21 @@ make the structure of your data generally look like this:
-
2022-03-10
+
2022-03-12
abcd
Escherichia coli
S
S
-
2022-03-10
+
2022-03-12
abcd
Escherichia coli
S
R
-
2022-03-10
+
2022-03-12
efgh
Escherichia coli
R
@@ -286,13 +256,8 @@ make the structure of your data generally look like this:
Needed R packages
-
As with many uses in R, we need some additional packages for AMR data
-analysis. Our package works closely together with the tidyverse packagesdplyr and ggplot2 by
-RStudio. The tidyverse tremendously improves the way we conduct data
-science - it allows for a very natural way of writing syntaxes and
-creating beautiful plots in R.
-
We will also use the cleaner package, that can be used
-for cleaning data and creating frequency tables.
+
As with many uses in R, we need some additional packages for AMR data analysis. Our package works closely together with the tidyverse packagesdplyr and ggplot2 by RStudio. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
+
We will also use the cleaner package, that can be used for cleaning data and creating frequency tables.
We will create some fake example data to use for analysis. For AMR
-data analysis, we need at least: a patient ID, name or code of a
-microorganism, a date and antimicrobial results (an antibiogram). It
-could also include a specimen type (e.g. to filter on blood or urine),
-the ward type (e.g. to filter on ICUs).
-
With additional columns (like a hospital name, the patients gender of
-even [well-defined] clinical properties) you can do a comparative
-analysis, as this tutorial will demonstrate too.
+
We will create some fake example data to use for analysis. For AMR data analysis, we need at least: a patient ID, name or code of a microorganism, a date and antimicrobial results (an antibiogram). It could also include a specimen type (e.g. to filter on blood or urine), the ward type (e.g. to filter on ICUs).
+
With additional columns (like a hospital name, the patients gender of even [well-defined] clinical properties) you can do a comparative analysis, as this tutorial will demonstrate too.
Patients
To start with patients, we need a unique list of patients.
The LETTERS object is available in R - it’s a vector
-with 26 characters: A to Z. The
-patients object we just created is now a vector of length
-260, with values (patient IDs) varying from A1 to
-Z10. Now we we also set the gender of our patients, by
-putting the ID and the gender in a table:
+
The LETTERS object is available in R - it’s a vector with 26 characters: A to Z. The patients object we just created is now a vector of length 260, with values (patient IDs) varying from A1 to Z10. Now we we also set the gender of our patients, by putting the ID and the gender in a table:
patients_table<-data.frame(patient_id =patients,
gender =c(rep("M", 135),
@@ -335,19 +289,14 @@ putting the ID and the gender in a table:
Dates
-
Let’s pretend that our data consists of blood cultures isolates from
-between 1 January 2010 and 1 January 2018.
+
Let’s pretend that our data consists of blood cultures isolates from between 1 January 2010 and 1 January 2018.
This dates object now contains all days in our date
-range.
+
This dates object now contains all days in our date range.
Microorganisms
-
For this tutorial, we will uses four different microorganisms:
-Escherichia coli, Staphylococcus aureus,
-Streptococcus pneumoniae, and Klebsiella
-pneumoniae:
+
For this tutorial, we will uses four different microorganisms: Escherichia coli, Staphylococcus aureus, Streptococcus pneumoniae, and Klebsiella pneumoniae:
Using the sample() function, we can randomly select
-items from all objects we defined earlier. To let our fake data reflect
-reality a bit, we will also approximately define the probabilities of
-bacteria and the antibiotic results, using the random_rsi()
-function.
+
Using the sample() function, we can randomly select items from all objects we defined earlier. To let our fake data reflect reality a bit, we will also approximately define the probabilities of bacteria and the antibiotic results, using the random_rsi() function.
We also created a package dedicated to data cleaning and checking,
-called the cleaner package. It freq() function
-can be used to create frequency tables.
+
We also created a package dedicated to data cleaning and checking, called the cleaner package. It freq() function can be used to create frequency tables.
So, we can draw at least two conclusions immediately. From a data
-scientists perspective, the data looks clean: only values M
-and F. From a researchers perspective: there are slightly
-more men. Nothing we didn’t already know.
-
The data is already quite clean, but we still need to transform some
-variables. The bacteria column now consists of text, and we
-want to add more variables based on microbial IDs later on. So, we will
-transform this column to valid IDs. The mutate() function
-of the dplyr package makes this really easy:
+
So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values M and F. From a researchers perspective: there are slightly more men. Nothing we didn’t already know.
+
The data is already quite clean, but we still need to transform some variables. The bacteria column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The mutate() function of the dplyr package makes this really easy:
We also want to transform the antibiotics, because in real life data
-we don’t know if they are really clean. The as.rsi()
-function ensures reliability and reproducibility in these kind of
-variables. The is.rsi.eligible() can check which columns
-are probably columns with R/SI test results. Using mutate()
-and across(), we can apply the transformation to the formal
-<rsi> class:
+
We also want to transform the antibiotics, because in real life data we don’t know if they are really clean. The as.rsi() function ensures reliability and reproducibility in these kind of variables. The is.rsi.eligible() can check which columns are probably columns with R/SI test results. Using mutate() and across(), we can apply the transformation to the formal <rsi> class:
Finally, we will apply EUCAST
-rules on our antimicrobial results. In Europe, most medical
-microbiological laboratories already apply these rules. Our package
-features their latest insights on intrinsic resistance and exceptional
-phenotypes. Moreover, the eucast_rules() function can also
-apply additional rules, like forcing
-ampicillin = R when
-amoxicillin/clavulanic acid = R.
-
Because the amoxicillin (column AMX) and
-amoxicillin/clavulanic acid (column AMC) in our data were
-generated randomly, some rows will undoubtedly contain AMX = S and AMC =
-R, which is technically impossible. The eucast_rules()
-fixes this:
+
Finally, we will apply EUCAST rules on our antimicrobial results. In Europe, most medical microbiological laboratories already apply these rules. Our package features their latest insights on intrinsic resistance and exceptional phenotypes. Moreover, the eucast_rules() function can also apply additional rules, like forcing ampicillin = R when amoxicillin/clavulanic acid = R.
+
Because the amoxicillin (column AMX) and amoxicillin/clavulanic acid (column AMC) in our data were generated randomly, some rows will undoubtedly contain AMX = S and AMC = R, which is technically impossible. The eucast_rules() fixes this:
We also need to know which isolates we can actually use for
-analysis.
-
To conduct an analysis of antimicrobial resistance, you must only include the first
-isolate of every patient per episode (Hindler et al., Clin
-Infect Dis. 2007). If you would not do this, you could easily get an
-overestimate or underestimate of the resistance of an antibiotic.
-Imagine that a patient was admitted with an MRSA and that it was found
-in 5 different blood cultures the following weeks (yes, some countries
-like the Netherlands have these blood drawing policies). The resistance
-percentage of oxacillin of all isolates would be overestimated, because
-you included this MRSA more than once. It would clearly be selection
-bias.
-
The Clinical and Laboratory Standards Institute (CLSI) appoints this
-as follows:
+
We also need to know which isolates we can actually use for analysis.
+
To conduct an analysis of antimicrobial resistance, you must only include the first isolate of every patient per episode (Hindler et al., Clin Infect Dis. 2007). If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following weeks (yes, some countries like the Netherlands have these blood drawing policies). The resistance percentage of oxacillin of all isolates would be overestimated, because you included this MRSA more than once. It would clearly be selection bias.
+
The Clinical and Laboratory Standards Institute (CLSI) appoints this as follows:
-
(…) When preparing a cumulative antibiogram to guide clinical
-decisions about empirical antimicrobial therapy of initial infections,
-only the first isolate of a given species per patient, per
-analysis period (eg, one year) should be included, irrespective of body
-site, antimicrobial susceptibility profile, or other phenotypical
-characteristics (eg, biotype). The first isolate is easily
-identified, and cumulative antimicrobial susceptibility test data
-prepared using the first isolate are generally comparable to cumulative
-antimicrobial susceptibility test data calculated by other methods,
-providing duplicate isolates are excluded. M39-A4
-Analysis and Presentation of Cumulative Antimicrobial Susceptibility
-Test Data, 4th Edition. CLSI, 2014. Chapter 6.4
+
(…) When preparing a cumulative antibiogram to guide clinical decisions about empirical antimicrobial therapy of initial infections, only the first isolate of a given species per patient, per analysis period (eg, one year) should be included, irrespective of body site, antimicrobial susceptibility profile, or other phenotypical characteristics (eg, biotype). The first isolate is easily identified, and cumulative antimicrobial susceptibility test data prepared using the first isolate are generally comparable to cumulative antimicrobial susceptibility test data calculated by other methods, providing duplicate isolates are excluded. M39-A4 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition. CLSI, 2014. Chapter 6.4
-
This AMR package includes this methodology with the
-first_isolate() function and is able to apply the four
-different methods as defined by Hindler
-et al. in 2007: phenotype-based, episode-based,
-patient-based, isolate-based. The right method depends on your goals and
-analysis, but the default phenotype-based method is in any case the
-method to properly correct for most duplicate isolates. This method also
-takes into account the antimicrobial susceptibility test results using
-all_microbials(). Read more about the methods on the
-first_isolate() page.
+
This AMR package includes this methodology with the first_isolate() function and is able to apply the four different methods as defined by Hindler et al. in 2007: phenotype-based, episode-based, patient-based, isolate-based. The right method depends on your goals and analysis, but the default phenotype-based method is in any case the method to properly correct for most duplicate isolates. This method also takes into account the antimicrobial susceptibility test results using all_microbials(). Read more about the methods on the first_isolate() page.
The outcome of the function can easily be added to our data:
data<-data%>%
@@ -630,11 +502,9 @@ takes into account the antimicrobial susceptibility test results using
# ℹ Using column 'patient_id' as input for `col_patient_id`.# Basing inclusion on all antimicrobial results, using a points threshold of# 2
-# => Found 10,713 'phenotype-based' first isolates (53.6% of total where a
+# => Found 10,541 'phenotype-based' first isolates (52.7% of total where a# microbial ID was available)
-
So only 53.6% is suitable for resistance analysis! We can now filter
-on it with the filter() function, also from the
-dplyr package:
+
So only 52.7% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:
You might want to start by getting an idea of how the data is distributed. It’s an important start, because it also decides how you will continue your analysis. Although this package contains a convenient function to make frequency tables, exploratory data analysis (EDA) is not the primary scope of this package. Use a package like DataExplorer for that, or read the free online book Exploratory Data Analysis with R by Roger D. Peng.
+
+
Dispersion of species
+
+
To just get an idea how the species are distributed, create a frequency table with our freq() function. We created the genus and species column earlier based on the microbial ID. With paste(), we can concatenate them together.
+
The freq() function can be used like the base R language was intended:
# ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)
+
+
+
+
+
+
+
+
+
+
+
+
+
-
date
patient_id
hospital
@@ -681,286 +757,42 @@ like:
-
3
-
2016-12-08
-
I1
-
Hospital B
+
2015-10-24
+
Y10
+
Hospital A
B_STPHY_AURS
R
-
I
S
S
-
M
+
R
+
F
Gram-positive
Staphylococcus
aureus
TRUE
-
5
-
2014-11-30
-
N6
-
Hospital C
-
B_ESCHR_COLI
-
R
-
S
-
R
-
S
-
F
-
Gram-negative
-
Escherichia
-
coli
-
TRUE
-
-
-
8
-
2016-12-03
-
J3
+
2017-06-23
+
E1
Hospital A
-
B_KLBSL_PNMN
-
R
+
B_STRPT_PNMN
+
S
S
R
R
M
-
Gram-negative
-
Klebsiella
+
Gram-positive
+
Streptococcus
pneumoniae
TRUE
-
-
9
-
2010-04-28
-
J10
-
Hospital A
-
B_ESCHR_COLI
-
S
-
S
-
R
-
S
-
M
-
Gram-negative
-
Escherichia
-
coli
-
TRUE
-
-
15
-
2010-08-04
-
L1
+
2011-11-15
+
J9
Hospital B
-
B_STRPT_PNMN
-
R
-
R
-
S
-
R
-
M
-
Gram-positive
-
Streptococcus
-
pneumoniae
-
TRUE
-
-
-
17
-
2014-04-28
-
Q5
-
Hospital C
-
B_STRPT_PNMN
-
R
-
R
-
S
-
R
-
F
-
Gram-positive
-
Streptococcus
-
pneumoniae
-
TRUE
-
-
-
-
Time for the analysis!
-
-
-
-
Analysing the data
-
-
You might want to start by getting an idea of how the data is
-distributed. It’s an important start, because it also decides how you
-will continue your analysis. Although this package contains a convenient
-function to make frequency tables, exploratory data analysis (EDA) is
-not the primary scope of this package. Use a package like DataExplorer
-for that, or read the free online book Exploratory Data Analysis
-with R by Roger D. Peng.
-
-
Dispersion of species
-
-
To just get an idea how the species are distributed, create a
-frequency table with our freq() function. We created the
-genus and species column earlier based on the
-microbial ID. With paste(), we can concatenate them
-together.
-
The freq() function can be used like the base R language
-was intended:
# ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
date
-
patient_id
-
hospital
-
bacteria
-
AMX
-
AMC
-
CIP
-
GEN
-
gender
-
gramstain
-
genus
-
species
-
first
-
-
-
-
2016-12-03
-
J3
-
Hospital A
-
B_KLBSL_PNMN
-
R
-
S
-
R
-
R
-
M
-
Gram-negative
-
Klebsiella
-
pneumoniae
-
TRUE
-
-
-
2010-08-04
-
L1
-
Hospital B
-
B_STRPT_PNMN
-
R
-
R
-
S
-
R
-
M
-
Gram-positive
-
Streptococcus
-
pneumoniae
-
TRUE
-
-
-
2014-04-28
-
Q5
-
Hospital C
-
B_STRPT_PNMN
-
R
-
R
-
S
-
R
-
F
-
Gram-positive
-
Streptococcus
-
pneumoniae
-
TRUE
-
-
-
2015-05-06
-
L9
-
Hospital D
B_ESCHR_COLI
-
R
-
R
+
S
+
S
S
R
M
@@ -969,41 +801,54 @@ antibiotic class they are in:
coli
TRUE
-
-
2010-09-03
-
M3
-
Hospital A
+
+
2010-10-03
+
D8
+
Hospital C
B_STRPT_PNMN
-
S
-
S
R
R
+
S
+
R
M
Gram-positive
Streptococcus
pneumoniae
TRUE
+
+
2010-05-24
+
E1
+
Hospital B
+
B_ESCHR_COLI
+
R
+
S
+
S
+
R
+
M
+
Gram-negative
+
Escherichia
+
coli
+
TRUE
+
-
2011-10-13
+
2010-08-26
D4
-
Hospital C
-
B_STRPT_PNMN
+
Hospital A
+
B_ESCHR_COLI
S
S
S
R
M
-
Gram-positive
-
Streptococcus
-
pneumoniae
+
Gram-negative
+
Escherichia
+
coli
TRUE
-
If you want to get a quick glance of the number of isolates in
-different bug/drug combinations, you can use the
-bug_drug_combinations() function:
+
If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the bug_drug_combinations() function:
data_1st%>%bug_drug_combinations()%>%
@@ -1022,50 +867,50 @@ different bug/drug combinations, you can use the
E. coli
AMX
-
2197
-
113
+
2154
+
135
2286
-
4596
+
4575
E. coli
AMC
-
3395
-
149
-
1052
-
4596
+
3356
+
158
+
1061
+
4575
E. coli
CIP
-
3341
+
3342
0
-
1255
-
4596
+
1233
+
4575
E. coli
GEN
-
3997
+
4034
0
-
599
-
4596
+
541
+
4575
K. pneumoniae
AMX
0
0
-
1184
-
1184
+
1157
+
1157
K. pneumoniae
AMC
-
917
-
43
+
887
+
46
224
-
1184
+
1157
@@ -1088,68 +933,49 @@ different bug/drug combinations, you can use the
E. coli
GEN
-
3997
+
4034
0
-
599
-
4596
+
541
+
4575
K. pneumoniae
GEN
-
1070
+
1050
0
-
114
-
1184
+
107
+
1157
S. aureus
GEN
-
2476
+
2386
0
-
329
-
2805
+
297
+
2683
S. pneumoniae
GEN
0
0
-
2128
-
2128
+
2126
+
2126
-
This will only give you the crude numbers in the data. To calculate
-antimicrobial resistance in a more sensible way, also by correcting for
-too few results, we use the resistance() and
-susceptibility() functions.
+
This will only give you the crude numbers in the data. To calculate antimicrobial resistance in a more sensible way, also by correcting for too few results, we use the resistance() and susceptibility() functions.
All these functions contain a minimum argument, denoting
-the minimum required number of test results for returning a value. These
-functions will otherwise return NA. The default is
-minimum = 30, following the CLSI
-M39-A4 guideline for applying microbial epidemiology.
-
As per the EUCAST guideline of 2019, we calculate resistance as the
-proportion of R (proportion_R(), equal to
-resistance()) and susceptibility as the proportion of S and
-I (proportion_SI(), equal to
-susceptibility()). These functions can be used on their
-own:
All these functions contain a minimum argument, denoting the minimum required number of test results for returning a value. These functions will otherwise return NA. The default is minimum = 30, following the CLSI M39-A4 guideline for applying microbial epidemiology.
+
As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R(), equal to resistance()) and susceptibility as the proportion of S and I (proportion_SI(), equal to susceptibility()). These functions can be used on their own:
Of course it would be very convenient to know the number of isolates
-responsible for the percentages. For that purpose the
-n_rsi() can be used, which works exactly like
-n_distinct() from the dplyr package. It counts
-all isolates available for every group (i.e. values S, I or R):
+
Of course it would be very convenient to know the number of isolates responsible for the percentages. For that purpose the n_rsi() can be used, which works exactly like n_distinct() from the dplyr package. It counts all isolates available for every group (i.e. values S, I or R):
data_1st%>%group_by(hospital)%>%
@@ -1197,29 +1019,27 @@ all isolates available for every group (i.e. values S, I or R):
Hospital A
-
0.5412355
-
3189
+
0.5326923
+
3120
Hospital B
-
0.5406417
-
3740
+
0.5487608
+
3712
Hospital C
-
0.5450746
+
0.5426866
1675
Hospital D
-
0.5452821
-
2109
+
0.5496559
+
2034
-
These functions can also be used to get the proportion of multiple
-antibiotics, to calculate empiric susceptibility of combination
-therapies very easily:
+
These functions can also be used to get the proportion of multiple antibiotics, to calculate empiric susceptibility of combination therapies very easily:
data_1st%>%group_by(genus)%>%
@@ -1236,34 +1056,31 @@ therapies very easily:
Escherichia
-
0.7711053
-
0.8696693
-
0.9738903
+
0.7680874
+
0.8817486
+
0.9803279
Klebsiella
-
0.8108108
-
0.9037162
-
0.9805743
+
0.8063959
+
0.9075194
+
0.9732066
Staphylococcus
-
0.7907308
-
0.8827094
-
0.9732620
+
0.7968692
+
0.8893030
+
0.9776370
Streptococcus
-
0.5324248
+
0.5371590
0.0000000
-
0.5324248
+
0.5371590
-
Or if you are curious for the resistance within certain antibiotic
-classes, use a antibiotic class selector such as
-penicillins(), which automatically will include the columns
-AMX and AMC of our data:
+
Or if you are curious for the resistance within certain antibiotic classes, use a antibiotic class selector such as penicillins(), which automatically will include the columns AMX and AMC of our data:
data_1st%>%# group by hospital
@@ -1284,28 +1101,27 @@ classes, use a antibiotic class selector such as
Hospital A
-
54.1%
-
27.2%
+
53.3%
+
25.1%
Hospital B
-
54.1%
-
27.4%
+
54.9%
+
28.0%
Hospital C
-
54.5%
-
25.0%
+
54.3%
+
27.9%
Hospital D
-
54.5%
-
25.9%
+
55.0%
+
25.8%
-
To make a transition to the next part, let’s see how differences in
-the previously calculated combination therapies could be plotted:
+
To make a transition to the next part, let’s see how differences in the previously calculated combination therapies could be plotted:
data_1st%>%group_by(genus)%>%
@@ -1323,10 +1139,7 @@ the previously calculated combination therapies could be plotted:
Plots
-
To show results in plots, most R users would nowadays use the
-ggplot2 package. This package lets you create plots in
-layers. You can read more about it on their website. A quick
-example would look like these syntaxes:
+
To show results in plots, most R users would nowadays use the ggplot2 package. This package lets you create plots in layers. You can read more about it on their website. A quick example would look like these syntaxes:
ggplot(data =a_data_set,
mapping =aes(x =year,
@@ -1340,21 +1153,13 @@ example would look like these syntaxes:
# or as short as:ggplot(a_data_set)+geom_bar(aes(year))
-
The AMR package contains functions to extend this
-ggplot2 package, for example geom_rsi(). It
-automatically transforms data with count_df() or
-proportion_df() and show results in stacked bars. Its
-simplest and shortest example:
+
The AMR package contains functions to extend this ggplot2 package, for example geom_rsi(). It automatically transforms data with count_df() or proportion_df() and show results in stacked bars. Its simplest and shortest example:
Omit the translate_ab = FALSE to have the antibiotic
-codes (AMX, AMC, CIP, GEN) translated to official WHO names
-(amoxicillin, amoxicillin/clavulanic acid, ciprofloxacin,
-gentamicin).
-
If we group on e.g. the genus column and add some
-additional functions from our package, we can create this:
+
Omit the translate_ab = FALSE to have the antibiotic codes (AMX, AMC, CIP, GEN) translated to official WHO names (amoxicillin, amoxicillin/clavulanic acid, ciprofloxacin, gentamicin).
+
If we group on e.g. the genus column and add some additional functions from our package, we can create this:
# group the data on `genus`ggplot(data_1st%>%group_by(genus))+
@@ -1377,8 +1182,7 @@ additional functions from our package, we can create this:
# (is now y axis because we turned the plot)theme(axis.text.y =element_text(face ="italic"))
-
To simplify this, we also created the ggplot_rsi()
-function, which combines almost all above functions:
+
To simplify this, we also created the ggplot_rsi() function, which combines almost all above functions:
data_1st%>%group_by(genus)%>%
@@ -1391,27 +1195,24 @@ function, which combines almost all above functions:
Plotting MIC and disk diffusion values
-
The AMR package also extends the plot() and
-ggplot2::autoplot() functions for plotting minimum
-inhibitory concentrations (MIC, created with as.mic()) and
-disk diffusion diameters (created with as.disk()).
-
With the random_mic() and random_disk()
-functions, we can generate sampled values for the new data types (S3
-classes) <mic> and <disk>:
+
The AMR package also extends the plot() and ggplot2::autoplot() functions for plotting minimum inhibitory concentrations (MIC, created with as.mic()) and disk diffusion diameters (created with as.disk()).
+
With the random_mic() and random_disk() functions, we can generate sampled values for the new data types (S3 classes) <mic> and <disk>:
@@ -1420,17 +1221,11 @@ classes) <mic> and <disk>:
# ggplot2:autoplot(mic_values)
-
But we could also be more specific, by generating MICs that are
-likely to be found in E. coli for ciprofloxacin:
+
But we could also be more specific, by generating MICs that are likely to be found in E. coli for ciprofloxacin:
mic_values<-random_mic(size =100, mo ="E. coli", ab ="cipro")
-
For the plot() and autoplot() function, we
-can define the microorganism and an antimicrobial agent the same way.
-This will add the interpretation of those values according to a chosen
-guidelines (defaults to the latest EUCAST guideline).
-
Default colours are colour-blind friendly, while maintaining the
-convention that e.g. ‘susceptible’ should be green and ‘resistant’
-should be red:
+
For the plot() and autoplot() function, we can define the microorganism and an antimicrobial agent the same way. This will add the interpretation of those values according to a chosen guidelines (defaults to the latest EUCAST guideline).
+
Default colours are colour-blind friendly, while maintaining the convention that e.g. ‘susceptible’ should be green and ‘resistant’ should be red:
# base R:plot(mic_values, mo ="E. coli", ab ="cipro")
@@ -1439,25 +1234,22 @@ should be red:
# ggplot2:autoplot(mic_values, mo ="E. coli", ab ="cipro")
-
For disk diffusion values, there is not much of a difference in
-plotting:
+
For disk diffusion values, there is not much of a difference in plotting:
# base R:plot(disk_values, mo ="E. coli", ab ="cipro")
-
And when using the ggplot2 package, but now choosing the
-latest implemented CLSI guideline (notice that the EUCAST-specific term
-“Susceptible, incr. exp.” has changed to “Intermediate”):
+
And when using the ggplot2 package, but now choosing the latest implemented CLSI guideline (notice that the EUCAST-specific term “Susceptible, incr. exp.” has changed to “Intermediate”):
autoplot(disk_values,
mo ="E. coli",
@@ -1469,14 +1261,8 @@ latest implemented CLSI guideline (notice that the EUCAST-specific term
Independence test
-
The next example uses the example_isolates data set.
-This is a data set included with this package and contains 2,000
-microbial isolates with their full antibiograms. It reflects reality and
-can be used to practice AMR data analysis.
-
We will compare the resistance to fosfomycin (column
-FOS) in hospital A and D. The input for the
-fisher.test() can be retrieved with a transformation like
-this:
+
The next example uses the example_isolates data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis.
+
We will compare the resistance to fosfomycin (column FOS) in hospital A and D. The input for the fisher.test() can be retrieved with a transformation like this:
# use package 'tidyr' to pivot data:library(tidyr)
@@ -1510,9 +1296,7 @@ this:
# sample estimates:# odds ratio # 0.4488318
-
As can be seen, the p value is 0.031, which means that the fosfomycin
-resistance found in isolates from patients in hospital A and D are
-really different.
+
As can be seen, the p value is 0.031, which means that the fosfomycin resistance found in isolates from patients in hospital A and D are really different.
@@ -295,8 +295,8 @@
# Table 3 - Enterobacteriaceae... OK.# Table 4 - Pseudomonas aeruginosa... OK.# Table 5 - Acinetobacter spp.... OK.
-# Warning: NA introduced for isolates where the available percentage of antimicrobial
-# classes was below 50% (set with `pct_required_classes`)
+# Warning: in `mdro()`: NA introduced for isolates where the available percentage of
+# antimicrobial classes was below 50% (set with `pct_required_classes`)
Only results with ‘R’ are considered as resistance. Use combine_SI = FALSE to also consider ‘I’ as resistance.
Determining multidrug-resistant organisms (MDRO), according to: Guideline: Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance. Author(s): Magiorakos AP, Srinivasan A, Carey RB, …, Vatopoulos A, Weber JT, Monnet DL Source: Clinical Microbiology and Infection 18:3, 2012; doi: 10.1111/j.1469-0691.2011.03570.x
(16 isolates had no test results)
@@ -320,17 +320,17 @@ Unique: 2
1
Negative
1601
-
92.60%
+
92.6%
1601
-
92.60%
+
92.6%
2
Multi-drug-resistant (MDR)
128
-
7.40%
+
7.4%
1729
-
100.00%
+
100.0%
@@ -358,18 +358,18 @@ Unique: 2
head(my_TB_data)# rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin
-# 1 I R I S R S
-# 2 I S R R S R
-# 3 R I S I R S
-# 4 S S I R I S
-# 5 S R S S S I
-# 6 S R R S R I
+# 1 I R I R I I
+# 2 I R I I I I
+# 3 S I I R S S
+# 4 R I R I R I
+# 5 S I S S R S
+# 6 S S I I I S# kanamycin
-# 1 S
-# 2 I
-# 3 R
-# 4 R
-# 5 I
+# 1 I
+# 2 R
+# 3 I
+# 4 I
+# 5 R# 6 R
We can now add the interpretation of MDR-TB to our data set. You can use:
Good news. The first two components explain a total of 93.3% of the variance (see the PC1 and PC2 values of the Proportion of Variance. We can create a so-called biplot with the base R biplot() function, to see which antimicrobial resistance per drug explain the difference per microorganism.
Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 430,288 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.
+
Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 439,030 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.
R understands any data type, including SPSS/SAS/Stata.
@@ -241,7 +241,7 @@
R is (nowadays) the preferred analysis software in academic papers.
At present, R is among the world most powerful statistical languages, and it is generally very popular in science (Bollmann et al., 2017). For all the above reasons, the number of references to R as an analysis method in academic papers is rising continuously and has even surpassed SPSS for academic use (Muenchen, 2014).
-
I believe that the thing with SPSS is, that it has always had a great user interface which is very easy to learn and use. Back when they developed it, they had very little competition, let alone from R. R didn’t even had a professional user interface until the last decade (called RStudio, see below). How people used R between the nineties and 2010 is almost completely incomparable to how R is being used now. The language itself has been restyled completely by volunteers who are dedicated professionals in the field of data science. SPSS was great when there was nothing else that could compete. But now in 2021, I don’t see any reason why SPSS would be of any better use than R.
+
I believe that the thing with SPSS is, that it has always had a great user interface which is very easy to learn and use. Back when they developed it, they had very little competition, let alone from R. R didn’t even had a professional user interface until the last decade (called RStudio, see below). How people used R between the nineties and 2010 is almost completely incomparable to how R is being used now. The language itself has been restyled completely by volunteers who are dedicated professionals in the field of data science. SPSS was great when there was nothing else that could compete. But now in 2022, I don’t see any reason why SPSS would be of any better use than R.
Using the microbenchmark package, we can review the calculation performance of this function. Its function microbenchmark() runs different input expressions independently of each other and measures their time-to-result.
In the next test, we try to ‘coerce’ different input values into the microbial code of Staphylococcus aureus. Coercion is a computational process of forcing output based on an input. For microorganism names, coercing user input to taxonomically valid microorganism names is crucial to ensure correct interpretation and to enable grouping based on taxonomic properties.
The actual result is the same every time: it returns its microorganism code B_STPHY_AURS (B stands for Bacteria, its taxonomic kingdom).
In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 47 times slower to determine.
+
In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 65 times slower to determine.
To improve performance, we implemented two important algorithms to save unnecessary calculations: repetitive results and already precalculated results.
Repetitive results
@@ -258,8 +258,8 @@
# what do these values look like? They are of class <mo>:head(x)# Class <mo>
-# [1] B_STPHY_AURS B_STRPT_EQNS B_KLBSL_PNMN B_STPHY_EPDR B_STPHY_AURS
-# [6] B_CRYNB_STRT
+# [1] B_PROTS_MRBL B_STPHY_CONS B_ESCHR_COLI B_PSDMN_AERG B_ENTRC_FCLS
+# [6] B_STPHY_AURS# as the example_isolates data set has 2,000 rows, we should have 2 million itemslength(x)
@@ -272,11 +272,11 @@
# now let's see:run_it<-microbenchmark(mo_name(x),
times =10)
-print(run_it, unit ="ms", signif =3)
+print(run_it, unit ="ms", signif =3)# Unit: milliseconds# expr min lq mean median uq max neval
-# mo_name(x) 196 209 274 223 364 388 10
-
So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.223 seconds. That is 112 nanoseconds on average. You only lose time on your unique input values.
+# mo_name(x) 265 269 357 298 471 516 10
+
So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.298 seconds. That is 149 nanoseconds on average. You only lose time on your unique input values.
Precalculated results
@@ -287,13 +287,13 @@
B =mo_name("S. aureus"),
C =mo_name("Staphylococcus aureus"),
times =10)
-print(run_it, unit ="ms", signif =3)
+print(run_it, unit ="ms", signif =3)# Unit: milliseconds
-# expr min lq mean median uq max neval
-# A 8.00 9.16 9.19 9.28 9.46 9.73 10
-# B 23.40 27.20 32.60 27.90 28.10 80.20 10
-# C 1.85 2.25 2.40 2.47 2.62 2.90 10
-
So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0025 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:
+# expr min lq mean median uq max neval
+# A 12.30 12.30 12.60 12.50 12.60 14.2 10
+# B 61.70 61.90 62.70 62.40 62.50 66.2 10
+# C 3.04 3.05 6.92 3.12 3.21 40.9 10
+
So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0031 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:
run_it<-microbenchmark(A =mo_species("aureus"),
B =mo_genus("Staphylococcus"),
@@ -304,17 +304,17 @@
G =mo_phylum("Firmicutes"),
H =mo_kingdom("Bacteria"),
times =10)
-print(run_it, unit ="ms", signif =3)
+print(run_it, unit ="ms", signif =3)# Unit: milliseconds# expr min lq mean median uq max neval
-# A 1.76 1.80 2.07 1.95 2.26 2.90 10
-# B 1.69 1.73 1.90 1.81 2.03 2.48 10
-# C 1.71 1.77 1.92 1.91 2.05 2.17 10
-# D 1.68 1.71 1.76 1.76 1.82 1.88 10
-# E 1.68 1.70 1.89 1.89 2.04 2.26 10
-# F 1.67 1.75 1.93 1.89 2.11 2.35 10
-# G 1.70 1.76 1.97 1.88 2.12 2.43 10
-# H 1.67 1.71 1.83 1.75 1.98 2.14 10
+# A 3.02 3.09 3.22 3.10 3.46 3.55 10
+# B 3.03 3.04 3.21 3.12 3.42 3.48 10
+# C 3.03 3.05 3.08 3.06 3.12 3.16 10
+# D 2.98 3.01 3.17 3.09 3.40 3.47 10
+# E 3.01 3.06 3.19 3.12 3.43 3.43 10
+# F 2.95 2.99 3.11 3.05 3.16 3.46 10
+# G 2.94 3.06 3.19 3.13 3.41 3.54 10
+# H 2.93 3.01 3.12 3.08 3.19 3.42 10
Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" anyway, there is no point in calculating the result. And because this package contains all phyla of all known bacteria, it can just return the initial value immediately.
@@ -347,19 +347,19 @@
ru =mo_name(CoNS, language ="ru"),
sv =mo_name(CoNS, language ="sv"),
times =100)
-print(run_it, unit ="ms", signif =4)
+print(run_it, unit ="ms", signif =4)# Unit: milliseconds
-# expr min lq mean median uq max neval
-# da 1.9470 2.0220 2.190 2.0720 2.358 3.234 100
-# de 1.9560 2.0330 3.649 2.1610 2.401 50.670 100
-# en 0.8937 0.9124 1.022 0.9776 1.120 1.748 100
-# es 1.9710 2.0290 2.216 2.1000 2.391 3.109 100
-# fr 1.8280 1.8960 3.214 1.9420 2.237 71.550 100
-# it 1.9370 1.9970 2.163 2.0610 2.339 3.210 100
-# nl 1.9710 2.0280 2.698 2.1110 2.421 49.340 100
-# pt 1.8920 1.9600 2.119 2.0200 2.261 3.265 100
-# ru 1.8630 1.9420 2.779 2.0270 2.335 66.660 100
-# sv 1.8680 1.9190 4.062 1.9890 2.263 78.870 100
All reference data (about microorganisms, antibiotics, R/SI
-interpretation, EUCAST rules, etc.) in this AMR package are
-reliable, up-to-date and freely available. We continually export our
-data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also
-supply tab separated files that are machine-readable and suitable for
-input in any software program, such as laboratory information
-systems.
-
On this page, we explain how to download them and how the structure
-of the data sets look like.
+
All reference data (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR package are reliable, up-to-date and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply tab separated files that are machine-readable and suitable for input in any software program, such as laboratory information systems.
+
On this page, we explain how to download them and how the structure of the data sets look like.
-If you are reading this page from within R, please
-visit
-our website, which is automatically updated with every code change.
+If you are reading this page from within R, please visit our website, which is automatically updated with every code change.
Microorganisms (currently accepted names)
-
A data set with 70,760 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 and
-snomed.
-
This data set is in R available as microorganisms, after
-you load the AMR package.
-
It was last updated on 29 November 2021 11:38:23 UTC. Find more info
-about the structure of this data set here.
+
A data set with 70,760 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 and snomed.
+
This data set is in R available as microorganisms, after you load the AMR package.
+
It was last updated on 1 February 2022 22:08:20 UTC. Find more info about the structure of this data set here.
NOTE: The exported files for SAS, SPSS and Stata do not
-contain SNOMED codes, as their file size would exceed 100 MB; the file
-size limit of GitHub. Advice? Use R instead.
+
NOTE: The exported files for SAS, SPSS and Stata do not contain SNOMED codes, as their file size would exceed 100 MB; the file size limit of GitHub. Advice? Use R instead.
Source
-
Our full taxonomy of microorganisms is based on the authoritative and
-comprehensive:
+
Our full taxonomy of microorganisms is based on the authoritative and comprehensive:
@@ -456,64 +427,40 @@ Health Information Network Vocabulary Access and Distribution System
Microorganisms (previously accepted names)
-
A data set with 14,338 rows and 4 columns, containing the following
-column names: fullname, fullname_new, ref and
-prevalence.
-
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 6 October 2021 14:38:29 UTC. Find more info
-about the structure of this data set here.
+
A data set with 14,338 rows and 4 columns, containing the following column names: fullname, fullname_new, ref and prevalence.
+
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 1 February 2022 22:08:19 UTC. Find more info about the structure of this data set here.
@@ -546,50 +493,31 @@ Standing in Nomenclature (LPSN, last updated: 5 October 2021)
Antibiotic agents
-
A data set with 464 rows and 14 columns, containing the following
-column names: ab, cid, name, group, atc,
-atc_group1, atc_group2, abbreviations,
-synonyms, oral_ddd, oral_units,
-iv_ddd, iv_units and loinc.
-
This data set is in R available as antibiotics, after
-you load the AMR package.
-
It was last updated on 14 December 2021 21:59:33 UTC. Find more info
-about the structure of this data set here.
+
A data set with 464 rows and 14 columns, containing the following column names: ab, cid, name, group, atc, atc_group1, atc_group2, abbreviations, synonyms, oral_ddd, oral_units, iv_ddd, iv_units and loinc.
+
This data set is in R available as antibiotics, after you load the AMR package.
+
It was last updated on 1 February 2022 22:08:19 UTC. Find more info about the structure of this data set here.
This data set contains all EARS-Net and ATC codes gathered from WHO
-and WHONET, and all compound IDs from PubChem. It also contains all
-brand names (synonyms) as found on PubChem and Defined Daily Doses
-(DDDs) for oral and parenteral administration.
+
This data set contains all EARS-Net and ATC codes gathered from WHO and WHONET, and all compound IDs from PubChem. It also contains all brand names (synonyms) as found on PubChem and Defined Daily Doses (DDDs) for oral and parenteral administration.
Combinations of penicillins, incl. beta-lactamase
-inhibitors
+
Combinations of penicillins, incl. beta-lactamase inhibitors
a/c, amcl, aml, …
amocla, amoclan, amoclav, …
1.5
@@ -734,49 +661,31 @@ inhibitors
Antiviral agents
-
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 and iv_units.
-
This data set is in R available as antivirals, after you
-load the AMR package.
-
It was last updated on 29 August 2020 19:53:07 UTC. Find more info
-about the structure of this data set here.
+
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 and iv_units.
+
This data set is in R available as antivirals, after you load the AMR package.
+
It was last updated on 23 July 2021 20:35:47 UTC. Find more info about the structure of this data set here.
This data set contains all ATC codes gathered from WHO and all
-compound IDs from PubChem. It also contains all brand names (synonyms)
-as found on PubChem and Defined Daily Doses (DDDs) for oral and
-parenteral administration.
+
This data set contains all ATC codes gathered from WHO and all compound IDs from PubChem. It also contains all brand names (synonyms) as found on PubChem and Defined Daily Doses (DDDs) for oral and parenteral administration.
Example content
@@ -1162,40 +1055,27 @@ v3.3 (2021).
Interpretation from MIC values / disk diameters to R/SI
-
A data set with 20,318 rows and 11 columns, containing the following
-column names: guideline, method, site, mo,
-rank_index, ab, ref_tbl, disk_dose,
-breakpoint_S, breakpoint_R and uti.
-
This data set is in R available as rsi_translation,
-after you load the AMR package.
-
It was last updated on 14 December 2021 21:59:33 UTC. Find more info
-about the structure of this data set here.
+
A data set with 20,318 rows and 11 columns, containing the following column names: guideline, method, site, mo, rank_index, ab, ref_tbl, disk_dose, breakpoint_S, breakpoint_R and uti.
+
This data set is in R available as rsi_translation, after you load the AMR package.
+
It was last updated on 1 February 2022 22:08:20 UTC. Find more info about the structure of this data set here.
This data set contains interpretation rules for MIC values and disk
-diffusion diameters. Included guidelines are CLSI (2010-2021) and EUCAST
-(2011-2021).
+
This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2021) and EUCAST (2011-2021).
Example content
@@ -1313,57 +1193,33 @@ diffusion diameters. Included guidelines are CLSI (2010-2021) and EUCAST
Dosage guidelines from EUCAST
-
A data set with 169 rows and 9 columns, containing the following
-column names: ab, name, type, dose,
-dose_times, administration, notes,
-original_txt and eucast_version.
-
This data set is in R available as dosage, after you
-load the AMR package.
-
It was last updated on 25 January 2021 20:58:20 UTC. Find more info
-about the structure of this data set here.
+
A data set with 169 rows and 9 columns, containing the following column names: ab, name, type, dose, dose_times, administration, notes, original_txt and eucast_version.
+
This data set is in R available as dosage, after you load the AMR package.
+
It was last updated on 23 July 2021 20:35:47 UTC. Find more info about the structure of this data set here.
Our package contains a function resistance_predict(), which takes the same input as functions for other AMR data analysis. Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance.
It is basically as easy as:
-
# resistance prediction of piperacillin/tazobactam (TZP):
-resistance_predict(tbl = example_isolates, col_date ="date", col_ab ="TZP", model ="binomial")
-
-# or:
-example_isolates %>%
-resistance_predict(col_ab ="TZP",
- model "binomial")
-
-# to bind it to object 'predict_TZP' for example:
-predict_TZP <- example_isolates %>%
-resistance_predict(col_ab ="TZP",
-model ="binomial")
+
# resistance prediction of piperacillin/tazobactam (TZP):
+resistance_predict(tbl = example_isolates, col_date ="date", col_ab ="TZP", model ="binomial")
+
+# or:
+example_isolates %>%
+resistance_predict(col_ab ="TZP",
+ model "binomial")
+
+# to bind it to object 'predict_TZP' for example:
+predict_TZP <-example_isolates %>%
+resistance_predict(col_ab ="TZP",
+model ="binomial")
The function will look for a date column itself if col_date is not set.
When running any of these commands, a summary of the regression model will be printed unless using resistance_predict(..., info = FALSE).
# ℹ Using column 'date' as input for `col_date`.
@@ -264,7 +264,8 @@
# 27 2028 0.43730688 0.3418075 0.5328063 NA NA 0.43730688# 28 2029 0.46175755 0.3597639 0.5637512 NA NA 0.46175755# 29 2030 0.48639359 0.3782932 0.5944939 NA NA 0.48639359
-# 30 2031 0.51109592 0.3973697 0.6248221 NA NA 0.51109592
+# 30 2031 0.51109592 0.3973697 0.6248221 NA NA 0.51109592
+# 31 2032 0.53574417 0.4169574 0.6545309 NA NA 0.53574417
The function plot is available in base R, and can be extended by other packages to depend the output based on the type of input. We extended its function to cope with resistance predictions:
diff --git a/docs/index.html b/docs/index.html
index 6f9950ee..91b04530 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -195,75 +195,22 @@
AMR (for R)
-
Update: The latest EUCAST
-guideline for intrinsic resistance (v3.3, October 2021) is now
-supported, the CLSI 2021 interpretation guideline is now supported, and
-our taxonomy tables have been updated as well (LPSN, 5 October
-2021).
+
Update: The latest EUCAST guideline for intrinsic resistance (v3.3, October 2021) is now supported, the CLSI 2021 interpretation guideline is now supported, and our taxonomy tables have been updated as well (LPSN, 5 October 2021).
What is AMR (for R)?
-
AMR is a free, open-source and independent R package (see Copyright) to simplify the analysis and prediction
-of Antimicrobial Resistance (AMR) and to work with microbial and
-antimicrobial data and properties, by using evidence-based methods.
-Our aim is to provide a standard for clean and
-reproducible AMR data analysis, that can therefore empower
-epidemiological analyses to continuously enable surveillance and
-treatment evaluation in any setting.
The AMR package is available in
-
-Danish,
-
-Dutch,
-
-English,
-
-French,
-
-German,
-
-Italian,
-
-Portuguese,
-
-Russian,
-
-Spanish and
-
-Swedish. Antimicrobial drug (group) names and colloquial microorganism
-names are provided in these languages.
AMR is a free, open-source and independent R package (see Copyright) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
The AMR package is available in Danish, Dutch, English, French, German, Italian, Portuguese, Russian, Spanish and Swedish. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
-
-Used in 175 countries Since its first public
-release in early 2018, this R package has been used in almost all
-countries in the world. Click the map to enlarge and to see the country
-names.
+Used in 175 countries Since its first public release in early 2018, this R package has been used in almost all countries in the world. Click the map to enlarge and to see the country names.
-
With AMR (for R), there’s always a knowledgeable
-microbiologist by your side!
+
With AMR (for R), there’s always a knowledgeable microbiologist by your side!
# AMR works great with dplyr, but it's not required or neccesary
@@ -277,12 +224,7 @@ microbiologist by your side!select(bacteria,
aminoglycosides(),
carbapenems())
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.
+
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.
Latest development version
-
The latest and unpublished development version can be installed from
-GitHub in two ways:
+
The latest and unpublished development version can be installed from GitHub in two ways:
Manually, using:
@@ -475,16 +393,11 @@ GitHub in two ways:
remotes::install_github("msberends/AMR")
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…).
+
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…).
This package contains the complete taxonomic tree of almost all
-~70,000 microorganisms from the authoritative and comprehensive
-Catalogue of Life (CoL, www.catalogueoflife.org),
-supplemented by data from the List of Prokaryotic names with Standing in
-Nomenclature (LPSN, lpsn.dsmz.de).
-This supplementation is needed until the CoL+ project is finished,
-which we await. With catalogue_of_life_version() can be
-checked which version of the CoL is included in this package.
+
This package contains the complete taxonomic tree of almost all ~70,000 microorganisms from the authoritative and comprehensive Catalogue of Life (CoL, www.catalogueoflife.org), supplemented by data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await. With catalogue_of_life_version() can be checked which version of the CoL is included in this package.
Read more about which data from the Catalogue of Life in our manual.
Antimicrobial reference data
-
This package contains all ~550 antibiotic, antimycotic and
-antiviral drugs and their Anatomical Therapeutic Chemical (ATC)
-codes, ATC groups and Defined Daily Dose (DDD, oral and IV) from the
-World Health Organization Collaborating Centre for Drug Statistics
-Methodology (WHOCC, https://www.whocc.no) and the Pharmaceuticals
-Community Register of the European Commission.
This package contains all ~550 antibiotic, antimycotic and antiviral drugs and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD, oral and IV) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, https://www.whocc.no) and the Pharmaceuticals Community Register of the European Commission.
We support WHONET and EARS-Net data. Exported files from WHONET can
-be imported into R and can be analysed easily using this package. For
-education purposes, we created an example data set WHONET
-with the exact same structure as a WHONET export file. Furthermore, this
-package also contains a data set
-antibiotics with all EARS-Net antibiotic abbreviations, and knows
-almost all WHONET abbreviations for microorganisms. When using WHONET
-data as input for analysis, all input parameters will be set
-automatically.
We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an example data set WHONET with the exact same structure as a WHONET export file. Furthermore, this package also contains a data set antibiotics with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.
The AMR package basically does four important
-things:
+
The AMR package basically does four important things:
-
It cleanses existing data by providing new
-classes for microoganisms, antibiotics and antimicrobial
-results (both S/I/R and MIC). By installing this package, you teach R
-everything about microbiology that is needed for analysis. These
-functions all use intelligent rules to guess results that you would
-expect:
+
It cleanses existing data by providing new classes for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). By installing this package, you teach R everything about microbiology that is needed for analysis. These functions all use intelligent rules to guess results that you would expect:
-
Use as.mo() to get a microbial ID. The IDs are human
-readable for the trained eye - the ID of Klebsiella pneumoniae
-is “B_KLBSL_PNMN” (B stands for Bacteria) and the ID of S.
-aureus is “B_STPHY_AURS”. The function takes almost any text as
-input that looks like the name or code of a microorganism like “E.
-coli”, “esco” or “esccol” and tries to find expected results using
-intelligent rules combined with the included Catalogue of Life data set.
-It only takes milliseconds to find results, please see our benchmarks. Moreover, it can group
-Staphylococci into coagulase negative and positive (CoNS and
-CoPS, see source) and can
-categorise Streptococci into Lancefield groups (like
-beta-haemolytic Streptococcus Group B, source).
-
Use as.ab() to get an antibiotic ID. Like microbial
-IDs, these IDs are also human readable based on those used by EARS-Net.
-For example, the ID of amoxicillin is AMX and the ID of
-gentamicin is GEN. The as.ab() function also
-uses intelligent rules to find results like accepting misspelling, trade
-names and abbrevations used in many laboratory systems. For instance,
-the values “Furabid”, “Furadantin”, “nitro” all return the ID of
-Nitrofurantoine. To accomplish this, the package contains a database
-with most LIS codes, official names, trade names, ATC codes, defined
-daily doses (DDD) and drug categories of antibiotics.
-
Use as.rsi() to get antibiotic interpretations based on
-raw MIC values (in mg/L) or disk diffusion values (in mm), or transform
-existing values to valid antimicrobial results. It produces just S, I or
-R based on your input and warns about invalid values. Even values like
-“<=0.002; S” (combined MIC/RSI) will result in “S”.
-
Use as.mic() to cleanse your MIC values. It produces a
-so-called factor (called ordinal in SPSS) with valid MIC values
-as levels. A value like “<=0.002; S” (combined MIC/RSI) will result
-in “<=0.002”.
+
Use as.mo() to get a microbial ID. The IDs are human readable for the trained eye - the ID of Klebsiella pneumoniae is “B_KLBSL_PNMN” (B stands for Bacteria) and the ID of S. aureus is “B_STPHY_AURS”. The function takes almost any text as input that looks like the name or code of a microorganism like “E. coli”, “esco” or “esccol” and tries to find expected results using intelligent rules combined with the included Catalogue of Life data set. It only takes milliseconds to find results, please see our benchmarks. Moreover, it can group Staphylococci into coagulase negative and positive (CoNS and CoPS, see source) and can categorise Streptococci into Lancefield groups (like beta-haemolytic Streptococcus Group B, source).
+
Use as.ab() to get an antibiotic ID. Like microbial IDs, these IDs are also human readable based on those used by EARS-Net. For example, the ID of amoxicillin is AMX and the ID of gentamicin is GEN. The as.ab() function also uses intelligent rules to find results like accepting misspelling, trade names and abbrevations used in many laboratory systems. For instance, the values “Furabid”, “Furadantin”, “nitro” all return the ID of Nitrofurantoine. To accomplish this, the package contains a database with most LIS codes, official names, trade names, ATC codes, defined daily doses (DDD) and drug categories of antibiotics.
+
Use as.rsi() to get antibiotic interpretations based on raw MIC values (in mg/L) or disk diffusion values (in mm), or transform existing values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like “<=0.002; S” (combined MIC/RSI) will result in “S”.
+
Use as.mic() to cleanse your MIC values. It produces a so-called factor (called ordinal in SPSS) with valid MIC values as levels. A value like “<=0.002; S” (combined MIC/RSI) will result in “<=0.002”.
-
It enhances existing data and adds new
-data from data sets included in this package.
+
It enhances existing data and adds new data from data sets included in this package.
You can also identify first weighted isolates of every
-patient, an adjusted version of the CLSI guideline. This takes into
-account key antibiotics of every strain and compares them.
+
You can also identify first weighted isolates of every patient, an adjusted version of the CLSI guideline. This takes into account key antibiotics of every strain and compares them.
-
Use mdro() to determine which micro-organisms are
-multi-drug resistant organisms (MDRO). It supports a variety of
-international guidelines, such as the MDR-paper by Magiorakos et
-al. (2012, PMID
-21793988), the exceptional phenotype definitions of EUCAST and the
-WHO guideline on multi-drug resistant TB. It also supports the national
-guidelines of the Netherlands and Germany.
-
The data set
-microorganisms contains the complete taxonomic tree of ~70,000
-microorganisms. Furthermore, some colloquial names and all Gram stains
-are available, which enables resistance analysis of e.g. different
-antibiotics per Gram stain. The package also contains functions to look
-up values in this data set like mo_genus(),
-mo_family(), mo_gramstain() or even
-mo_phylum(). Use mo_snomed() to look up any
-SNOMED CT code associated with a microorganism. As all these function
-use as.mo() internally, they also use the same intelligent
-rules for determination. For example, mo_genus("MRSA") and
-mo_genus("S. aureus") will both return
-"Staphylococcus". They also come with support for German,
-Danish, Dutch, Spanish, Italian, French and Portuguese. These functions
-can be used to add new variables to your data.
-
The data set antibiotics
-contains ~450 antimicrobial drugs with their EARS-Net code, ATC code,
-PubChem compound ID, LOINC code, official name, common LIS codes and
-DDDs of both oral and parenteral administration. It also contains all
-(thousands of) trade names found in PubChem. Use functions like
-ab_name(), ab_group(), ab_atc(),
-ab_loinc() and ab_tradenames() to look up
-values. The ab_* functions use as.ab()
-internally so they support the same intelligent rules to guess the most
-probable result. For example, ab_name("Fluclox"),
-ab_name("Floxapen") and ab_name("J01CF05")
-will all return "Flucloxacillin". These functions can again
-be used to add new variables to your data.
+
Use mdro() to determine which micro-organisms are multi-drug resistant organisms (MDRO). It supports a variety of international guidelines, such as the MDR-paper by Magiorakos et al. (2012, PMID 21793988), the exceptional phenotype definitions of EUCAST and the WHO guideline on multi-drug resistant TB. It also supports the national guidelines of the Netherlands and Germany.
+
The data set microorganisms contains the complete taxonomic tree of ~70,000 microorganisms. Furthermore, some colloquial names and all Gram stains are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like mo_genus(), mo_family(), mo_gramstain() or even mo_phylum(). Use mo_snomed() to look up any SNOMED CT code associated with a microorganism. As all these function use as.mo() internally, they also use the same intelligent rules for determination. For example, mo_genus("MRSA") and mo_genus("S. aureus") will both return "Staphylococcus". They also come with support for German, Danish, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
+
The data set antibiotics contains ~450 antimicrobial drugs with their EARS-Net code, ATC code, PubChem compound ID, LOINC code, official name, common LIS codes and DDDs of both oral and parenteral administration. It also contains all (thousands of) trade names found in PubChem. Use functions like ab_name(), ab_group(), ab_atc(), ab_loinc() and ab_tradenames() to look up values. The ab_* functions use as.ab() internally so they support the same intelligent rules to guess the most probable result. For example, ab_name("Fluclox"), ab_name("Floxapen") and ab_name("J01CF05") will all return "Flucloxacillin". These functions can again be used to add new variables to your data.
-
It analyses the data with convenient functions
-that use well-known methods.
+
It analyses the data with convenient functions that use well-known methods.
Plot AMR results with geom_rsi(), a function made for the ggplot2 package
+
Predict antimicrobial resistance for the nextcoming years using logistic regression models with the resistance_predict() function
-
It teaches the user how to use all the above
-actions.
+
It teaches the user how to use all the above actions.
-
Aside from this website with many tutorials, the package itself
-contains extensive help pages with many examples for all functions.
+
Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
The package also contains example data sets:
-
The example_isolates
-data set. This data set contains 2,000 microbial isolates with their
-full antibiograms. It reflects reality and can be used to practice AMR
-data analysis.
-
The WHONET data
-set. This data set only contains fake data, but with the exact same
-structure as files exported by WHONET. Read more about WHONET on its tutorial page.
+
The example_isolates data set. This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis.
+
The WHONET data set. This data set only contains fake data, but with the exact same structure as files exported by WHONET. Read more about WHONET on its tutorial page.
@@ -687,9 +484,7 @@ structure as files exported by WHONET. Read more about WHONET
All functions in this package are considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months.
-
Changed
-
Support for antibiotic interpretations of the MIPS laboratory system: "U" for S (‘susceptible urine’), "D" for I (‘susceptible dose-dependent’)
+
Changed
+
Fix for using as.rsi() on values containing capped values (such as >=), sometimes leading to NA
+
Support for antibiotic interpretations of the MIPS laboratory system: "U" for S (‘susceptible urine’), "D" for I (‘susceptible dose-dependent’)
Improved algorithm of as.mo(), especially for ignoring non-taxonomic text, such as:
@@ -177,7 +178,7 @@
Updated MIC printing in tibbles
-
Other
+
Other
Fix for unit testing on R 3.3
Fix for size of some image elements, as requested by CRAN
@@ -270,7 +271,7 @@
Improved plot legends for MICs and disk diffusion values
Improved speed of as.ab() and all ab_*() functions
NA values of the classes <mic>, <disk> and <rsi> are now exported objects of this package, e.g. NA_mic_ is an NA of class mic (just like the base R NA_character_ is an NA of class character)
The proportion_df(), count_df() and rsi_df() functions now return with the additional S3 class ‘rsi_df’ so they can be extended by other packages
Function betalactams() as additional antbiotic column selector and function filter_betalactams() as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.
Function mo_is_yeast(), which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:
@@ -461,7 +462,7 @@
Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent
All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)
Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see translate)
-
Plotting is now possible with base R using plot() and with ggplot2 using ggplot() on any vector of MIC and disk diffusion values
+
Plotting is now possible with base R using plot() and with ggplot2 using ggplot() on any vector of MIC and disk diffusion values
Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the microorganisms data set
@@ -756,7 +757,7 @@
Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.
Making 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:
-
Function freq() that was borrowed from the cleaner package was removed. Use cleaner::freq(), or run library("cleaner") before you use freq().
Printing values of class 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.
All functions from the mo_* family (like mo_name() and mo_gramstain()) are noticeably slower when running on hundreds of thousands of rows.
For developers: classes mo and ab now both also inherit class character, to support any data transformation. This change invalidates code that checks for class length == 1.
@@ -1019,7 +1020,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
#> 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 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
@@ -1248,7 +1249,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
The age() function gained a new argument exact to determine ages with decimals
Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:
@@ -1483,15 +1484,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
# OLD WAYseptic_patients%>%mutate(genus =mo_genus(mo))%>%
- freq(genus)
+ freq(genus)# NEW WAYseptic_patients%>%
- freq(mo_genus(mo))
+ freq(mo_genus(mo))# Even supports grouping variables:septic_patients%>%group_by(gender)%>%
- freq(mo_genus(mo))
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antibiotic results are from our example_isolates data set. All patient names are created using online surname generators and are only in place for practice purposes.
diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html
index 5b821928..179490fb 100644
--- a/docs/reference/ab_from_text.html
+++ b/docs/reference/ab_from_text.html
@@ -275,13 +275,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html
index dd6cfc6d..4dc1ad04 100644
--- a/docs/reference/ab_property.html
+++ b/docs/reference/ab_property.html
@@ -344,13 +344,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/age.html b/docs/reference/age.html
index a34bf8a7..e89308e9 100644
--- a/docs/reference/age.html
+++ b/docs/reference/age.html
@@ -226,13 +226,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html
index 3fe52145..34bfa16d 100644
--- a/docs/reference/age_groups.html
+++ b/docs/reference/age_groups.html
@@ -250,13 +250,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html
index 0f8ee763..9ed5b395 100644
--- a/docs/reference/antibiotic_class_selectors.html
+++ b/docs/reference/antibiotic_class_selectors.html
@@ -430,13 +430,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html
index 1618698e..554d00b6 100644
--- a/docs/reference/as.mic.html
+++ b/docs/reference/as.mic.html
@@ -273,13 +273,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html
index dbf53ee8..5393b7ff 100644
--- a/docs/reference/as.mo.html
+++ b/docs/reference/as.mo.html
@@ -377,13 +377,11 @@ This package contains the complete taxonomic tree of almost all microorganisms (
diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html
index 05e31b60..fb4fae39 100644
--- a/docs/reference/as.rsi.html
+++ b/docs/reference/as.rsi.html
@@ -334,7 +334,7 @@ The lifecycle of this function is stable# \donttest{
if(require("skimr")){# class <rsi> supported in skim() too:
- skim(example_isolates)
+ skim(example_isolates)}# }# For INTERPRETING disk diffusion and MIC values -----------------------
@@ -423,13 +423,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html
index c7060b2e..dbfe2e38 100644
--- a/docs/reference/atc_online.html
+++ b/docs/reference/atc_online.html
@@ -257,13 +257,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/availability.html b/docs/reference/availability.html
index 3cba58d1..41c2549f 100644
--- a/docs/reference/availability.html
+++ b/docs/reference/availability.html
@@ -216,13 +216,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html
index 04faa69a..ad7f7294 100644
--- a/docs/reference/bug_drug_combinations.html
+++ b/docs/reference/bug_drug_combinations.html
@@ -265,13 +265,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html
index 1cee5457..0f7da61c 100644
--- a/docs/reference/eucast_rules.html
+++ b/docs/reference/eucast_rules.html
@@ -334,13 +334,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
A data set containing 2,000 microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR data analysis. For examples, please read the tutorial on our website.
A data set containing 3,000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice.
diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html
index fa85c4b6..0c307305 100644
--- a/docs/reference/first_isolate.html
+++ b/docs/reference/first_isolate.html
@@ -371,13 +371,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html
index 6901dc82..e6b57053 100644
--- a/docs/reference/ggplot_pca.html
+++ b/docs/reference/ggplot_pca.html
@@ -304,13 +304,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html
index c149ca97..4a5b9418 100644
--- a/docs/reference/ggplot_rsi.html
+++ b/docs/reference/ggplot_rsi.html
@@ -395,13 +395,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html
index 918718a7..e88dfbc2 100644
--- a/docs/reference/guess_ab_col.html
+++ b/docs/reference/guess_ab_col.html
@@ -243,13 +243,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
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.
+
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.
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().
+
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().
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().
+
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().
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 (carbapenems(),
-aminoglycosides()), or determine multi-drug resistant
-microorganisms (MDRO, mdro()).
+
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 (carbapenems(), aminoglycosides()), or determine multi-drug resistant microorganisms (MDRO, mdro()).
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.
+
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.
@@ -353,9 +333,7 @@ information about how to work with functions in this package.
Data Set with 500 Isolates - WHONET Example
Other: miscellaneous functions
-
These functions are mostly for internal use, but some of them may
-also be suitable for your analysis. Especially the ‘like’ function can
-be useful: if (x %like% y) {...}.
+
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) {...}.
diff --git a/docs/reference/italicise_taxonomy.html b/docs/reference/italicise_taxonomy.html
index 59c52dd7..97b9b8b5 100644
--- a/docs/reference/italicise_taxonomy.html
+++ b/docs/reference/italicise_taxonomy.html
@@ -221,13 +221,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/join.html b/docs/reference/join.html
index eb975064..67d790ab 100644
--- a/docs/reference/join.html
+++ b/docs/reference/join.html
@@ -242,13 +242,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/key_antimicrobials.html b/docs/reference/key_antimicrobials.html
index ce2fe5e5..a6c79a90 100644
--- a/docs/reference/key_antimicrobials.html
+++ b/docs/reference/key_antimicrobials.html
@@ -308,13 +308,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html
index fe6c7183..de4ba679 100644
--- a/docs/reference/kurtosis.html
+++ b/docs/reference/kurtosis.html
@@ -210,13 +210,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html
index aac85a16..d83200a2 100644
--- a/docs/reference/lifecycle.html
+++ b/docs/reference/lifecycle.html
@@ -211,13 +211,11 @@ The lifecycle of this function is questioning. This function mi
diff --git a/docs/reference/like.html b/docs/reference/like.html
index 62c307ea..e4141ee9 100644
--- a/docs/reference/like.html
+++ b/docs/reference/like.html
@@ -260,13 +260,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html
index 63dccbf7..279d4cdb 100644
--- a/docs/reference/mo_property.html
+++ b/docs/reference/mo_property.html
@@ -433,13 +433,11 @@ This package contains the complete taxonomic tree of almost all microorganisms (
diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html
index 0ce2ecb3..7b0deab1 100644
--- a/docs/reference/mo_source.html
+++ b/docs/reference/mo_source.html
@@ -267,13 +267,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/pca.html b/docs/reference/pca.html
index 3b33550a..f28a22ca 100644
--- a/docs/reference/pca.html
+++ b/docs/reference/pca.html
@@ -266,13 +266,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/plot.html b/docs/reference/plot.html
index d76ee05a..b7dbab6d 100644
--- a/docs/reference/plot.html
+++ b/docs/reference/plot.html
@@ -332,13 +332,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html
index 2eba482a..1b654405 100644
--- a/docs/reference/proportion.html
+++ b/docs/reference/proportion.html
@@ -381,13 +381,11 @@ A microorganism is categorised as Susceptible, Increased exposure when
diff --git a/docs/reference/random.html b/docs/reference/random.html
index a116ed62..bd1a4c4b 100644
--- a/docs/reference/random.html
+++ b/docs/reference/random.html
@@ -232,13 +232,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html
index 84604110..7585597f 100644
--- a/docs/reference/resistance_predict.html
+++ b/docs/reference/resistance_predict.html
@@ -358,13 +358,11 @@ A microorganism is categorised as Susceptible, Increased exposure when
diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html
index 3e362ca1..5b3fab34 100644
--- a/docs/reference/rsi_translation.html
+++ b/docs/reference/rsi_translation.html
@@ -17,7 +17,7 @@
AMR (for R)
- 1.8.0
+ 1.8.0.9005
@@ -161,7 +161,9 @@
Data set containing reference data to interpret MIC and disk diffusion to R/SI values, according to international guidelines. Currently implemented guidelines are EUCAST (2011-2021) and CLSI (2010-2021). Use as.rsi() to transform MICs or disks measurements to R/SI values.
diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html
index e092e822..4219273c 100644
--- a/docs/reference/skewness.html
+++ b/docs/reference/skewness.html
@@ -210,13 +210,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.
diff --git a/docs/reference/translate.html b/docs/reference/translate.html
index 4a8d1972..a3b2e656 100644
--- a/docs/reference/translate.html
+++ b/docs/reference/translate.html
@@ -237,13 +237,11 @@ The lifecycle of this function is stable
-
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein,
-Erwin E. A. Hassing.
+
Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.