diff --git a/DESCRIPTION b/DESCRIPTION
index 3638d34f..60dfbaf1 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 0.5.0.9015
+Version: 0.5.0.9016
Date: 2019-01-29
Title: Antimicrobial Resistance Analysis
Authors@R: c(
diff --git a/NAMESPACE b/NAMESPACE
index 51b0f4ac..50cf58d0 100755
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -253,7 +253,7 @@ importFrom(graphics,plot)
importFrom(graphics,text)
importFrom(hms,is.hms)
importFrom(knitr,kable)
-importFrom(rlang,as_name)
+importFrom(rlang,as_label)
importFrom(rlang,enquos)
importFrom(rlang,eval_tidy)
importFrom(stats,complete.cases)
diff --git a/R/data.R b/R/data.R
index 0843ee78..673d381f 100755
--- a/R/data.R
+++ b/R/data.R
@@ -42,13 +42,14 @@
#' \item{\code{useful_gramnegative}}{\code{FALSE} if not useful according to EUCAST, \code{NA} otherwise (see Source)}
#' \item{\code{useful_grampositive}}{\code{FALSE} if not useful according to EUCAST, \code{NA} otherwise (see Source)}
#' }
-#' @source - World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
+#' @source World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
#'
#' Table antibiotic coding EARSS (from WHONET 5.3): \url{http://www.madsonline.dk/Tutorials/landskoder_antibiotika_WM.pdf}
#'
#' EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016: \url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf}
#'
#' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{http://ec.europa.eu/health/documents/community-register/html/atc.htm}
+#' @inheritSection WHOCC WHOCC
#' @inheritSection AMR Read more on our website!
#' @seealso \code{\link{microorganisms}}
# use this later to further fill AMR::antibiotics
@@ -203,6 +204,41 @@
#' @inheritSection AMR Read more on our website!
"septic_patients"
+#' Data set with 500 isolates - WHONET example
+#'
+#' 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 data itself was based on our \code{\link{septic_patients}} data set.
+#' @format A \code{\link{data.frame}} with 500 observations and 53 variables:
+#' \describe{
+#' \item{\code{Identification number}}{ID of the sample}
+#' \item{\code{Specimen number}}{ID of the specimen}
+#' \item{\code{Organism}}{Microorganisms, can be coerced with \code{\link{as.mo}}}
+#' \item{\code{Country}}{Country of origin}
+#' \item{\code{Laboratory}}{Name of laboratory}
+#' \item{\code{Last name}}{Last name of patient}
+#' \item{\code{First name}}{Initial of patient}
+#' \item{\code{Sex}}{Gender of patient}
+#' \item{\code{Age}}{Age of patient}
+#' \item{\code{Age category}}{Age group, can also be looked up using \code{\link{age_groups}}}
+#' \item{\code{Date of admission}}{Date of hospital admission}
+#' \item{\code{Specimen date}}{Date when specimen was received at laboratory}
+#' \item{\code{Specimen type}}{Specimen type or group}
+#' \item{\code{Specimen type (Numeric)}}{Translation of \code{"Specimen type"}}
+#' \item{\code{Reason}}{Reason of request with Differential Diagnosis}
+#' \item{\code{Isolate number}}{ID of isolate}
+#' \item{\code{Organism type}}{Type of microorganism, can also be looked up using \code{\link{mo_type}}}
+#' \item{\code{Serotype}}{Serotype of microorganism}
+#' \item{\code{Beta-lactamase}}{Microorganism produces beta-lactamase?}
+#' \item{\code{ESBL}}{Microorganism produces extended spectrum beta-lactamase?}
+#' \item{\code{Carbapenemase}}{Microorganism produces carbapenemase?}
+#' \item{\code{MRSA screening test}}{Microorganism is possible MRSA?}
+#' \item{\code{Inducible clindamycin resistance}}{Clindamycin can be induced?}
+#' \item{\code{Comment}}{Other comments}
+#' \item{\code{Date of data entry}}{Date this data was entered in WHONET}
+#' \item{\code{AMP_ND10:CIP_EE}}{27 different antibiotics. You can lookup the abbreviatons in the \code{\link{antibiotics}} data set, or use e.g. \code{\link{atc_name}("AMP")} to get the official name immediately.}
+#' }
+#' @inheritSection AMR Read more on our website!
+"WHONET"
+
#' Supplementary Data
#'
#' These \code{\link{data.table}s} are transformed from the \code{\link{microorganisms}} and \code{\link{microorganisms}} data sets to improve speed of \code{\link{as.mo}}. They are meant for internal use only, and are only mentioned here for reference.
diff --git a/R/first_isolate.R b/R/first_isolate.R
index 8b5c13f8..46e16bd5 100755
--- a/R/first_isolate.R
+++ b/R/first_isolate.R
@@ -206,7 +206,14 @@ first_isolate <- function(tbl,
# -- patient id
if (is.null(col_patient_id)) {
+ if (all(c("First name", "Last name", "Sex", "Identification number") %in% colnames(tbl))) {
+ # WHONET support
+ tbl <- tbl %>% mutate(patient_id = paste(`First name`, `Last name`, Sex))
+ col_patient_id <- "patient_id"
+ message(blue(paste0("NOTE: Using combined columns ", bold("`First name`, `Last name` and `Sex`"), " as input for `col_patient_id`.")))
+ } else {
col_patient_id <- search_type_in_df(tbl = tbl, type = "patient_id")
+ }
}
if (is.null(col_patient_id)) {
stop("`col_patient_id` must be set.", call. = FALSE)
diff --git a/R/freq.R b/R/freq.R
index 37d23823..0bf89807 100755
--- a/R/freq.R
+++ b/R/freq.R
@@ -71,7 +71,7 @@
#' @importFrom utils browseVignettes
#' @importFrom hms is.hms
#' @importFrom crayon red green silver
-#' @importFrom rlang enquos eval_tidy as_name
+#' @importFrom rlang enquos eval_tidy as_label
#' @keywords summary summarise frequency freq
#' @rdname freq
#' @name freq
@@ -206,6 +206,7 @@ frequency_tbl <- function(x,
# x_haslevels <- !is.null(levels(x))
x.name <- NULL
cols <- NULL
+ cols.names <- NULL
if (any(class(x) == "list")) {
cols <- names(x)
x <- as.data.frame(x, stringsAsFactors = FALSE)
@@ -224,9 +225,19 @@ frequency_tbl <- function(x,
if (is.null(x.name)) {
x.name <- deparse(substitute(x))
}
- if (x.name == ".") {
- x.name <- NULL
+ if (x.name %like% "(%>%)") {
+ x.name <- x.name %>% strsplit("%>%", fixed = TRUE) %>% unlist() %>% .[1] %>% trimws()
}
+ if (x.name == ".") {
+ x.name <- "a data.frame"
+ }
+ x.name <- paste0("`", x.name, "`")
+ x.name.dims <- x %>%
+ dim() %>%
+ format(decimal.mark = decimal.mark, big.mark = big.mark) %>%
+ trimws() %>%
+ paste(collapse = " x ")
+ x.name <- paste0(x.name, " (", x.name.dims, ")")
x.group <- group_vars(x)
if (length(x.group) > 1) {
@@ -238,24 +249,19 @@ frequency_tbl <- function(x,
if (length(user_exprs) > 0) {
new_list <- list(0)
-
for (i in 1:length(user_exprs)) {
new_list[[i]] <- eval_tidy(user_exprs[[i]], data = x)
- this_name <- try( as_name(user_exprs[[i]]) , silent = TRUE)
- if (class(this_name) == "try-error") {
- this_name <- paste0("V", i)
- }
- cols <- c(cols, this_name)
+ cols <- c(cols, as_label(user_exprs[[i]]))
}
if (length(new_list) == 1 & length(x.group) == 0) {
# is now character
x <- new_list[[1]]
df <- NULL
- cols <- NULL
} else {
# create data frame
- df <- as.data.frame(new_list, col.names = paste0("V", 1:length(new_list)), stringsAsFactors = FALSE)
+ df <- as.data.frame(new_list, col.names = cols, stringsAsFactors = FALSE)
+ cols.names <- colnames(df)
}
} else {
# complete data frame
@@ -264,7 +270,7 @@ frequency_tbl <- function(x,
# support grouping variables
if (length(x.group) > 0) {
- x.group_cols <- c(x.group, cols)
+ x.group_cols <- c(x.group, cols.names)
x <- bind_cols(x, df)
# if (droplevels == TRUE) {
# x <- x %>% mutate_at(vars(x.group_cols), droplevels)
@@ -302,11 +308,10 @@ frequency_tbl <- function(x,
# no groups, multiple values like: septic_patients %>% freq(mo, mo_genus(mo))
x <- df
df <- NULL
- cols <- NULL
}
}
if (length(cols) > 0 & is.data.frame(x)) {
- x <- x[, cols]
+ x <- x[, cols.names]
}
} else if (any(class(x) == "table")) {
@@ -328,6 +333,7 @@ frequency_tbl <- function(x,
x <- x %>% pull(1)
} else if (ncol(x) < 10) {
mult.columns <- ncol(x)
+ # paste old columns together
x <- do.call(paste, c(x[colnames(x)], sep = sep))
} else {
stop("A maximum of 9 columns can be analysed at the same time.", call. = FALSE)
diff --git a/R/misc.R b/R/misc.R
index 4b0a696f..ec634752 100755
--- a/R/misc.R
+++ b/R/misc.R
@@ -152,7 +152,10 @@ search_type_in_df <- function(tbl, type) {
# -- date
if (type == "date") {
for (i in 1:ncol(tbl)) {
- if ("Date" %in% class(tbl %>% pull(i)) | "POSIXct" %in% class(tbl %>% pull(i))) {
+ if (any(colnames(tbl) %like% "^(Specimen date)")) {
+ # WHONET support
+ found <- colnames(tbl)[colnames(tbl) %like% "^(Specimen date)"][1]
+ } else if ("Date" %in% class(tbl %>% pull(i)) | "POSIXct" %in% class(tbl %>% pull(i))) {
found <- colnames(tbl)[i]
break
}
diff --git a/R/zzz.R b/R/zzz.R
index 592756bc..5b7f859c 100755
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -21,19 +21,34 @@
#' The \code{AMR} Package
#'
-#' Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
+#' Welcome to the \code{AMR} package.
#' @details
-#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
+#' \code{AMR} is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.
#'
-#' This package was created for both academic research and routine analysis by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
-#' @section Read more on our website!:
-#' \if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-#' On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+#' We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.
+#'
+#' This package can be used for:
+#' \itemize{
+#' \item{Calculating antimicrobial resistance}
+#' \item{Predicting antimicrobial resistance using regression models}
+#' \item{Getting properties for any microorganism (like Gram stain, species, genus or family)}
+#' \item{Getting properties for any antibiotic (like name, ATC code, defined daily dose or trade name)}
+#' \item{Plotting antimicrobial resistance}
+#' \item{Determining first isolates to be used for AMR analysis}
+#' \item{Applying EUCAST rules}
+#' \item{Determining multi-drug resistance organisms (MDRO)}
+#' \item{Descriptive statistics: frequency tables, kurtosis and skewness}
+#' }
#' @section Authors:
#' Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] \cr
#'
#' [1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - \url{rug.nl} \url{umcg.nl} \cr
#' [2] Certe Medical Diagnostics & Advice, Groningen, the Netherlands - \url{certe.nl}
+
+#' @section Read more on our website!:
+#' \if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
+#' On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
+
#' @section Contact us:
#' For suggestions, comments or questions, please contact us at:
#'
diff --git a/_pkgdown.yml b/_pkgdown.yml
index c896b0ff..10518726 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -136,6 +136,7 @@ reference:
- '`antibiotics`'
- '`microorganisms`'
- '`septic_patients`'
+ - '`WHONET`'
- '`microorganisms.codes`'
- '`microorganisms.old`'
- '`supplementary_data`'
diff --git a/data/WHONET.rda b/data/WHONET.rda
new file mode 100644
index 00000000..4c642251
Binary files /dev/null and b/data/WHONET.rda differ
diff --git a/data/antibiotics.rda b/data/antibiotics.rda
index 6782d134..2f309d6c 100755
Binary files a/data/antibiotics.rda and b/data/antibiotics.rda differ
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index 8c3c0770..708f719b 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -78,7 +78,7 @@
AMR (for R)
- 0.5.0.9015
+ 0.5.0.9016
diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html
index af02aedf..09e907f5 100644
--- a/docs/articles/AMR.html
+++ b/docs/articles/AMR.html
@@ -185,7 +185,7 @@
How to conduct AMR analysis
Matthijs S. Berends
-
28 January 2019
+
29 January 2019
AMR.Rmd
@@ -194,7 +194,7 @@
-
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 RMarkdown. However, the methodology remains unchanged. This page was generated on 28 January 2019.
+
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 RMarkdown. However, the methodology remains unchanged. This page was generated on 29 January 2019.
Introduction
@@ -210,21 +210,21 @@
-
2019-01-28
+
2019-01-29
abcd
Escherichia coli
S
S
-
2019-01-28
+
2019-01-29
abcd
Escherichia coli
S
R
-
2019-01-28
+
2019-01-29
efgh
Escherichia coli
R
@@ -285,18 +285,18 @@
Put everything together
-
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 with the prob parameter.
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 with the prob parameter.
So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values M and F. From a researcher 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:
+
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 mutate_at() will run the as.rsi() function on defined variables:
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 mutate_at() will run the as.rsi() function on defined variables:
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 amox) and amoxicillin/clavulanic acid (column amcl) in our data were generated randomly, some rows will undoubtedly contain amox = S and amcl = R, which is technically impossible. The eucast_rules() fixes this:
This AMR package includes this methodology with the first_isolate() function. It adopts the episode of a year (can be changed by user) and it starts counting days after every selected isolate. This new variable can easily be added to our data:
Only 4 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and show be included too. This is why we weigh isolates, based on their antibiogram. The key_antibiotics() function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.
If a column exists with a name like ‘key(…)ab’ the first_isolate() function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:
Instead of 4, now 8 isolates are flagged. In total, 89% of all isolates are marked ‘first weighted’ - 147.9% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
+
Instead of 4, now 9 isolates are flagged. In total, 88.1% of all isolates are marked ‘first weighted’ - 146.6% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
The functions portion_R, portion_RI, portion_I, portion_IS and portion_S can be used to determine the portion of a specific antimicrobial outcome. They 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):
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:
The AMR package contains functions to extend this ggplot2 package, for example geom_rsi(). It automatically transforms data with count_df() or portion_df() and show results in stacked bars. Its simplest and shortest example:
Omit the translate_ab = FALSE to have the antibiotic codes (amox, amcl, cipr, gent) translated to official WHO names (amoxicillin, amoxicillin and betalactamase inhibitor, ciprofloxacin, gentamicin).
If we group on e.g. the genus column and add some additional functions from our package, we can create this:
We can transform the data and apply the test in only a couple of lines:
septic_patients %>%
-filter(hospital_id %in%c("A", "D")) %>%# filter on only hospitals A and D
-select(hospital_id, fosf) %>%# select the hospitals and fosfomycin
-group_by(hospital_id) %>%# group on the hospitals
+filter(hospital_id %in%c("A", "D")) %>%# filter on only hospitals A and D
+select(hospital_id, fosf) %>%# select the hospitals and fosfomycin
+group_by(hospital_id) %>%# group on the hospitalscount_df(combine_IR =TRUE) %>%# count all isolates per group (hospital_id)
-tidyr::spread(hospital_id, Value) %>%# transform output so A and D are columns
-select(A, D) %>%# and select these only
+tidyr::spread(hospital_id, Value) %>%# transform output so A and D are columns
+select(A, D) %>%# and select these onlyas.matrix() %>%# transform to good old matrix for fisher.test()fisher.test() # do Fisher's Exact Test#
diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png
index bed4123c..a7f40a3c 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png
index 1b5d363b..5718311c 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png
index 13ab47ff..5a2af150 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png
index 9aa21099..f9ede70a 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ
diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html
index 3e5fecf6..75d6a736 100644
--- a/docs/articles/EUCAST.html
+++ b/docs/articles/EUCAST.html
@@ -185,7 +185,7 @@
This tutorial assumes you already imported the WHONET data with e.g. the readxl package. In RStudio, this can be done using the menu button ‘Import Dataset’ in the tab ‘Environment’. Choose the option ‘From Excel’ and select your exported file. Make sure date fields are imported correctly.
First, load the relevant packages if you did not yet did this. I use the tidyverse for all of my analyses. All of them. If you don’t know it yet, I suggest you read about it on their website: https://www.tidyverse.org/.
We will have to transform some variables to simplify and automate the analysis:
+
+
Microorganisms should be transformed to our own microorganism IDs (called an mo) using the ITIS reference data set, which contains all ~20,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with as.mo().
+
Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values "S", "I" or "R". That is exactly where the as.rsi() function is for.
AMR is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.
-
We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public Licence version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full licence here.
+
We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full license here.
This package can be used for:
Calculating antimicrobial resistance
@@ -200,7 +200,7 @@
Plotting antimicrobial resistance
Determining first isolates to be used for AMR analysis
Descriptive statistics: frequency tables, kurtosis and skewness
This package is ready-to-use for a professional environment by specialists in the following fields:
@@ -251,7 +251,7 @@
WHONET / EARS-Net
-
We support data (exported files) from WHONET. The AMR package contains a data set antibiotics which also contains all EARS-Net antibiotic abbreviations. Furthermore, 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 and a WHONET export file. Furthermore, this package also contains a data set antibiotics with all EARS-Net antibiotic abbreviations. When using WHONET data as input for analysis, all input parameters will be set automatically.
The AMR package basically does four important things:
-
It cleanses existing data, by transforming it to reproducible and profound classes, making the most efficient use of R. These functions all use artificial intelligence 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). With this package, you learn R everything about microbiology that is needed for analysis. These functions all use artificial intelligence to guess results that you would expect:
Use as.mo() to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of Klebsiella pneumoniae is “B_KLBSL_PNE” (B stands for Bacteria) and the ID of S. aureus is “B_STPHY_AUR”. 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 artificial intelligence (AI) on the included ITIS data set, consisting of almost 20,000 microorganisms. It is very fast, 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.rsi() to transform 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”.
@@ -295,8 +295,8 @@
Use mdro() (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.
-
The data set microorganisms contains the complete taxonomic tree of more than 18,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain 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(). As they use as.mo() internally, they also use artificial intelligence. For example, mo_genus("MRSA") and mo_genus("S. aureus") will both return "Staphylococcus". They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
-
The data set antibiotics contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like ab_name() and ab_tradenames() to look up values. The ab_* functions use as.atc() internally so they support AI to guess your expected 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.
+
The data set microorganisms contains the complete taxonomic tree of almost 20,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain 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(). As they use as.mo() internally, they also use artificial intelligence. For example, mo_genus("MRSA") and mo_genus("S. aureus") will both return "Staphylococcus". They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
+
The data set antibiotics contains almost 500 antimicrobial drugs with their ATC code, EARS-Net code, common LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains hundreds of trade names. Use functions like atc_name() and atc_tradenames() to look up values. The atc_* functions use as.atc() internally so they support AI to guess your expected result. For example, atc_name("Fluclox"), atc_name("Floxapen") and atc_name("J01CF05") will all return "Flucloxacillin". These functions can again be used to add new variables to your data.
@@ -312,8 +312,8 @@
It teaches the user how to use all the above actions.
-
The package contains extensive help pages with many examples.
-
It also contains an example data set called septic_patients. This data set contains:
+
Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
Welcome to the AMR package. This page gives some additional contact information about the authors.
+
Welcome to the AMR package.
Details
-
This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
-
This package was created for both academic research and routine analysis by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
AMR is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.
+
We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.
+
This package can be used for:
+
Calculating antimicrobial resistance
+
Predicting antimicrobial resistance using regression models
+
Getting properties for any microorganism (like Gram stain, species, genus or family)
+
Getting properties for any antibiotic (like name, ATC code, defined daily dose or trade name)
+
Plotting antimicrobial resistance
+
Determining first isolates to be used for AMR analysis
diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html
index dbfc998a..a7e5fac8 100644
--- a/docs/reference/WHOCC.html
+++ b/docs/reference/WHOCC.html
@@ -247,7 +247,7 @@ This package contains all ~500 antimicrobial drugs and their An
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 data itself was based on our septic_patients data set.
+
+
+
+
WHONET
+
+
Format
+
+
A data.frame with 500 observations and 53 variables:
27 different antibiotics. You can lookup the abbreviatons in the antibiotics data set, or use e.g. atc_name("AMP") to get the official name immediately.
diff --git a/docs/reference/as.atc.html b/docs/reference/as.atc.html
index 8afd2b4b..91fb5147 100644
--- a/docs/reference/as.atc.html
+++ b/docs/reference/as.atc.html
@@ -269,7 +269,7 @@ This package contains all ~500 antimicrobial drugs and their An
@@ -371,16 +371,16 @@ The mo_property functions (like # the select function of tidyverse is also supported:
library(dplyr)
df$mo<-df%>%
- select(microorganism_name) %>%
+ select(microorganism_name) %>%as.mo()
# and can even contain 2 columns, which is convenient for genus/species combinations:df$mo<-df%>%
- select(genus, species) %>%
+ select(genus, species) %>%as.mo()
# although this works easier and does the same:df<-df%>%
- mutate(mo=as.mo(paste(genus, species)))
+ mutate(mo=as.mo(paste(genus, species)))
# }
diff --git a/docs/reference/count.html b/docs/reference/count.html
index eb8a7191..59587c14 100644
--- a/docs/reference/count.html
+++ b/docs/reference/count.html
@@ -289,14 +289,14 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
Details
These functions are meant to count isolates. Use the portion_* functions to calculate microbial resistance.
-
n_rsi is an alias of count_all. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to n_distinct. Their function is equal to count_S(...) + count_IR(...).
+
n_rsi is an alias of count_all. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to n_distinct. Their function is equal to count_S(...) + count_IR(...).
count_df takes any variable from data that has an "rsi" class (created with as.rsi) and counts the amounts of R, I and S. The resulting tidy data (see Source) data.frame will have three rows (S/I/R) and a column for each variable with class "rsi".
@@ -328,13 +328,13 @@ On our website https://msberends.gitla
library(dplyr)
septic_patients%>%
- group_by(hospital_id) %>%
- summarise(R=count_R(cipr),
+ group_by(hospital_id) %>%
+ summarise(R=count_R(cipr),
I=count_I(cipr),
S=count_S(cipr),
n1=count_all(cipr), # the actual total; sum of all threen2=n_rsi(cipr), # same - analogous to n_distinct
- total=n()) # NOT the amount of tested isolates!
+ total=n()) # NOT the amount of tested isolates!# Count co-resistance between amoxicillin/clav acid and gentamicin,# so we can see that combination therapy does a lot more than mono therapy.
@@ -352,13 +352,13 @@ On our website https://msberends.gitla
# Get portions S/I/R immediately of all rsi columnsseptic_patients%>%
- select(amox, cipr) %>%
+ select(amox, cipr) %>%count_df(translate=FALSE)
# It also supports grouping variablesseptic_patients%>%
- select(hospital_id, amox, cipr) %>%
- group_by(hospital_id) %>%
+ select(hospital_id, amox, cipr) %>%
+ group_by(hospital_id) %>%count_df(translate=FALSE)
# }
diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html
index 74f6942a..0bb9f0c3 100644
--- a/docs/reference/eucast_rules.html
+++ b/docs/reference/eucast_rules.html
@@ -394,7 +394,7 @@
diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html
index 8b7bd819..b403ddd1 100644
--- a/docs/reference/first_isolate.html
+++ b/docs/reference/first_isolate.html
@@ -360,7 +360,7 @@ To conduct an analysis of antimicrobial resistance, you should only include the
@@ -375,11 +375,11 @@ On our website https://msberends.gitla
library(dplyr)
# Filter on first isolates:septic_patients%>%
- mutate(first_isolate=first_isolate(.,
+ mutate(first_isolate=first_isolate(.,
col_date="date",
col_patient_id="patient_id",
col_mo="mo")) %>%
- filter(first_isolate==TRUE)
+ filter(first_isolate==TRUE)
# Which can be shortened to:septic_patients%>%
@@ -390,14 +390,14 @@ On our website https://msberends.gitla
# Now let's see if first isolates matter:A<-septic_patients%>%
- group_by(hospital_id) %>%
- summarise(count=n_rsi(gent), # gentamicin availability
+ group_by(hospital_id) %>%
+ summarise(count=n_rsi(gent), # gentamicin availabilityresistance=portion_IR(gent)) # gentamicin resistanceB<-septic_patients%>%filter_first_weighted_isolate() %>%# the 1st isolate filter
- group_by(hospital_id) %>%
- summarise(count=n_rsi(gent), # gentamicin availability
+ group_by(hospital_id) %>%
+ summarise(count=n_rsi(gent), # gentamicin availabilityresistance=portion_IR(gent)) # gentamicin resistance# Have a look at A and B.
diff --git a/docs/reference/freq.html b/docs/reference/freq.html
index 290b346d..2b1966db 100644
--- a/docs/reference/freq.html
+++ b/docs/reference/freq.html
@@ -374,7 +374,7 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal ggplot functions.
+
Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal ggplot functions.
@@ -321,7 +321,7 @@
At default, the names of antibiotics will be shown on the plots using abname. This can be set with the option get_antibiotic_names (a logical value), so change it e.g. to FALSE with options(get_antibiotic_names = FALSE).
The functions geom_rsi will take any variable from the data that has an rsi class (created with as.rsi) using fun (count_df at default, can also be portion_df) and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.
-
facet_rsi creates 2d plots (at default based on S/I/R) using facet_wrap.
+
facet_rsi creates 2d plots (at default based on S/I/R) using facet_wrap.
scale_y_percent transforms the y axis to a 0 to 100% range using scale_continuous.
scale_rsi_colours sets colours to the bars: green for S, yellow for I and red for R, using scale_brewer.
theme_rsi is a ggplot theme with minimal distraction.
@@ -341,12 +341,12 @@ On our website https://msberends.gitla
library(ggplot2)
# get antimicrobial results for drugs against a UTI:
-ggplot(septic_patients%>%select(amox, nitr, fosf, trim, cipr)) +
+ggplot(septic_patients%>%select(amox, nitr, fosf, trim, cipr)) +
geom_rsi()
# prettify the plot using some additional functions:df<-septic_patients[, c("amox", "nitr", "fosf", "trim", "cipr")]
-ggplot(df) +
+ggplot(df) +
geom_rsi() +
scale_y_percent() +
scale_rsi_colours() +
@@ -355,17 +355,17 @@ On our website https://msberends.gitla
# or better yet, simplify this using the wrapper function - a single command:septic_patients%>%
- select(amox, nitr, fosf, trim, cipr) %>%
+ select(amox, nitr, fosf, trim, cipr) %>%ggplot_rsi()
# get only portions and no counts:septic_patients%>%
- select(amox, nitr, fosf, trim, cipr) %>%
+ select(amox, nitr, fosf, trim, cipr) %>%ggplot_rsi(fun=portion_df)
# add other ggplot2 parameters as you like:septic_patients%>%
- select(amox, nitr, fosf, trim, cipr) %>%
+ select(amox, nitr, fosf, trim, cipr) %>%ggplot_rsi(width=0.5,
colour="black",
size=1,
@@ -374,56 +374,56 @@ On our website https://msberends.gitla
# resistance of ciprofloxacine per age groupseptic_patients%>%
- mutate(first_isolate=first_isolate(.)) %>%
- filter(first_isolate==TRUE,
+ mutate(first_isolate=first_isolate(.)) %>%
+ filter(first_isolate==TRUE,
mo==as.mo("E. coli")) %>%# `age_group` is also a function of this package:
- group_by(age_group=age_groups(age)) %>%
- select(age_group,
+ group_by(age_group=age_groups(age)) %>%
+ select(age_group,
cipr) %>%ggplot_rsi(x="age_group")
# }# NOT RUN {# for colourblind mode, use divergent colours from the viridis package:septic_patients%>%
- select(amox, nitr, fosf, trim, cipr) %>%
- ggplot_rsi() + scale_fill_viridis_d()
+ select(amox, nitr, fosf, trim, cipr) %>%
+ ggplot_rsi() + scale_fill_viridis_d()
# it also supports groups (don't forget to use the group var on `x` or `facet`):septic_patients%>%
- select(hospital_id, amox, nitr, fosf, trim, cipr) %>%
- group_by(hospital_id) %>%
+ select(hospital_id, amox, nitr, fosf, trim, cipr) %>%
+ group_by(hospital_id) %>%ggplot_rsi(x=hospital_id,
facet=Antibiotic,
nrow=1) +
- labs(title="AMR of Anti-UTI Drugs Per Hospital",
+ labs(title="AMR of Anti-UTI Drugs Per Hospital",
x="Hospital")
# genuine analysis: check 2 most prevalent microorganismsseptic_patients%>%# create new bacterial ID's, with all CoNS under the same group (Becker et al.)
- mutate(mo=as.mo(mo, Becker=TRUE)) %>%
+ mutate(mo=as.mo(mo, Becker=TRUE)) %>%# filter on top three bacterial ID's
- filter(mo%in%top_freq(freq(.$mo), 3)) %>%
+ filter(mo%in%top_freq(freq(.$mo), 3)) %>%# determine first isolates
- mutate(first_isolate=first_isolate(.,
+ mutate(first_isolate=first_isolate(.,
col_date="date",
col_patient_id="patient_id",
col_mo="mo")) %>%# filter on first isolates
- filter(first_isolate==TRUE) %>%
+ filter(first_isolate==TRUE) %>%# get short MO names (like "E. coli")
- mutate(mo=mo_shortname(mo, Becker=TRUE)) %>%
+ mutate(mo=mo_shortname(mo, Becker=TRUE)) %>%# select this short name and some antiseptic drugs
- select(mo, cfur, gent, cipr) %>%
+ select(mo, cfur, gent, cipr) %>%# group by MO
- group_by(mo) %>%
+ group_by(mo) %>%# plot the thing, putting MOs on the facetggplot_rsi(x=Antibiotic,
facet=mo,
translate_ab=FALSE,
nrow=1) +
- labs(title="AMR of Top Three Microorganisms In Blood Culture Isolates",
+ labs(title="AMR of Top Three Microorganisms In Blood Culture Isolates",
subtitle="Only First Isolates, CoNS grouped according to Becker et al. (2014)",
x="Microorganisms")
# }
diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html
index 0360d4d8..5f519a67 100644
--- a/docs/reference/guess_ab_col.html
+++ b/docs/reference/guess_ab_col.html
@@ -257,7 +257,7 @@
+On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html
index 0a2623aa..70fa067b 100644
--- a/docs/reference/skewness.html
+++ b/docs/reference/skewness.html
@@ -264,7 +264,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
+On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 0ce9b9e7..4c2c3537 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -15,6 +15,9 @@
https://msberends.gitlab.io/AMR/reference/WHOCC.html
+
+ https://msberends.gitlab.io/AMR/reference/WHONET.html
+ https://msberends.gitlab.io/AMR/reference/abname.html
diff --git a/index.md b/index.md
index 19d86e95..ea0434a3 100644
--- a/index.md
+++ b/index.md
@@ -7,7 +7,7 @@
`AMR` is a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.
We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
-This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but **not** patent) purposes under the terms of the GNU General Public Licence version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full licence [here](./LICENSE-text.html).
+This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but **not** patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full license [here](./LICENSE-text.html).
This package can be used for:
@@ -18,7 +18,7 @@ This package can be used for:
* Plotting antimicrobial resistance
* Determining first isolates to be used for AMR analysis
* Applying EUCAST rules
- * Determining multi-drug resistance organisms (MDRO)
+ * Determining multi-drug resistant organisms (MDRO)
* Descriptive statistics: frequency tables, kurtosis and skewness
This package is ready-to-use for a professional environment by specialists in the following fields:
@@ -75,7 +75,7 @@ To find out how to conduct AMR analysis, please [continue reading here to get st
-We support data (exported files) from WHONET. The `AMR` package contains a data set `antibiotics` which also contains all EARS-Net antibiotic abbreviations. Furthermore, 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`](./reference/WHONET.html) with the exact same structure and a WHONET export file. Furthermore, this package also contains a [data set `antibiotics`](./reference/antibiotics.html) with all EARS-Net antibiotic abbreviations. When using WHONET data as input for analysis, all input parameters will be set automatically.
Read our tutorial about [how to work with WHONET data here](./articles/WHONET.html).
@@ -101,7 +101,7 @@ Read more about the data from ITIS [in our manual](./reference/ITIS.html).
The `AMR` package basically does four important things:
-1. It **cleanses existing data**, by transforming it to reproducible and profound *classes*, making the most efficient use of R. These functions all use artificial intelligence to guess results that you would expect:
+1. It **cleanses existing data** by providing new *classes* for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). With this package, you learn R everything about microbiology that is needed for analysis. These functions all use artificial intelligence to guess results that you would expect:
* Use `as.mo()` to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of *Klebsiella pneumoniae* is "B_KLBSL_PNE" (B stands for Bacteria) and the ID of *S. aureus* is "B_STPHY_AUR". 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 artificial intelligence (AI) on the included ITIS data set, consisting of almost 20,000 microorganisms. It is *very* fast, please see our [benchmarks](./articles/benchmarks.html). Moreover, it can group *Staphylococci* into coagulase negative and positive (CoNS and CoPS, see [source](./reference/as.mo.html#source)) and can categorise *Streptococci* into Lancefield groups (like beta-haemolytic *Streptococcus* Group B, [source](./reference/as.mo.html#source)).
* Use `as.rsi()` to transform 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".
@@ -114,8 +114,8 @@ The `AMR` package basically does four important things:
* Use `first_isolate()` to identify the first isolates of every patient [using guidelines from the CLSI](https://clsi.org/standards/products/microbiology/documents/m39/) (Clinical and Laboratory Standards Institute).
* 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()` (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.
- * The data set `microorganisms` contains the complete taxonomic tree of more than 18,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain 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()`. As they use `as.mo()` internally, they also use artificial intelligence. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
- * The data set `antibiotics` contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like `ab_name()` and `ab_tradenames()` to look up values. The `ab_*` functions use `as.atc()` internally so they support AI to guess your expected 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.
+ * The [data set `microorganisms`](./reference/microorganisms.html) contains the complete taxonomic tree of almost 20,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain 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()`. As they use `as.mo()` internally, they also use artificial intelligence. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
+ * The [data set `antibiotics`](./reference/antibiotics.html) contains almost 500 antimicrobial drugs with their ATC code, EARS-Net code, common LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains hundreds of trade names. Use functions like `atc_name()` and `atc_tradenames()` to look up values. The `atc_*` functions use `as.atc()` internally so they support AI to guess your expected result. For example, `atc_name("Fluclox")`, `atc_name("Floxapen")` and `atc_name("J01CF05")` will all return `"Flucloxacillin"`. These functions can again be used to add new variables to your data.
3. It **analyses the data** with convenient functions that use well-known methods.
@@ -126,8 +126,8 @@ The `AMR` package basically does four important things:
4. It **teaches the user** how to use all the above actions.
- * The package contains extensive help pages with many examples.
- * It also contains an example data set called `septic_patients`. This data set contains:
+ * Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
+ * It also contains an [example data set called `septic_patients`](.reference/septic_patients.html). This data set contains:
* 2,000 blood culture isolates from anonymised septic patients between 2001 and 2017 in the Northern Netherlands
* Results of 40 antibiotics (each antibiotic in its own column) with a total of 38,414 antimicrobial results
* Real and genuine data
diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd
index 032b7f6e..7b1d433b 100644
--- a/man/AMR-deprecated.Rd
+++ b/man/AMR-deprecated.Rd
@@ -49,7 +49,7 @@ These functions are so-called '\link{Deprecated}'. They will be removed in a fut
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\keyword{internal}
diff --git a/man/AMR.Rd b/man/AMR.Rd
index 38471a41..fefe4e95 100644
--- a/man/AMR.Rd
+++ b/man/AMR.Rd
@@ -4,19 +4,26 @@
\alias{AMR}
\title{The \code{AMR} Package}
\description{
-Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
+Welcome to the \code{AMR} package.
}
\details{
-This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
+\code{AMR} is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.
-This package was created for both academic research and routine analysis by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
+We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.
+
+This package can be used for:
+\itemize{
+ \item{Calculating antimicrobial resistance}
+ \item{Predicting antimicrobial resistance using regression models}
+ \item{Getting properties for any microorganism (like Gram stain, species, genus or family)}
+ \item{Getting properties for any antibiotic (like name, ATC code, defined daily dose or trade name)}
+ \item{Plotting antimicrobial resistance}
+ \item{Determining first isolates to be used for AMR analysis}
+ \item{Applying EUCAST rules}
+ \item{Determining multi-drug resistance organisms (MDRO)}
+ \item{Descriptive statistics: frequency tables, kurtosis and skewness}
}
-\section{Read more on our website!}{
-
-\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
}
-
\section{Authors}{
Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] \cr
@@ -25,6 +32,12 @@ Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Gl
[2] Certe Medical Diagnostics & Advice, Groningen, the Netherlands - \url{certe.nl}
}
+\section{Read more on our website!}{
+
+\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
+}
+
\section{Contact us}{
For suggestions, comments or questions, please contact us at:
diff --git a/man/ITIS.Rd b/man/ITIS.Rd
index a2e7baf8..c9b9bcb3 100644
--- a/man/ITIS.Rd
+++ b/man/ITIS.Rd
@@ -19,7 +19,7 @@ ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic spec
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/WHOCC.Rd b/man/WHOCC.Rd
index 2134d791..4be99fd9 100644
--- a/man/WHOCC.Rd
+++ b/man/WHOCC.Rd
@@ -19,7 +19,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/WHONET.Rd b/man/WHONET.Rd
new file mode 100644
index 00000000..6ab8ad3f
--- /dev/null
+++ b/man/WHONET.Rd
@@ -0,0 +1,48 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/data.R
+\docType{data}
+\name{WHONET}
+\alias{WHONET}
+\title{Data set with 500 isolates - WHONET example}
+\format{A \code{\link{data.frame}} with 500 observations and 53 variables:
+\describe{
+ \item{\code{Identification number}}{ID of the sample}
+ \item{\code{Specimen number}}{ID of the specimen}
+ \item{\code{Organism}}{Microorganisms, can be coerced with \code{\link{as.mo}}}
+ \item{\code{Country}}{Country of origin}
+ \item{\code{Laboratory}}{Name of laboratory}
+ \item{\code{Last name}}{Last name of patient}
+ \item{\code{First name}}{Initial of patient}
+ \item{\code{Sex}}{Gender of patient}
+ \item{\code{Age}}{Age of patient}
+ \item{\code{Age category}}{Age group, can also be looked up using \code{\link{age_groups}}}
+ \item{\code{Date of admission}}{Date of hospital admission}
+ \item{\code{Specimen date}}{Date when specimen was received at laboratory}
+ \item{\code{Specimen type}}{Specimen type or group}
+ \item{\code{Specimen type (Numeric)}}{Translation of \code{"Specimen type"}}
+ \item{\code{Reason}}{Reason of request with Differential Diagnosis}
+ \item{\code{Isolate number}}{ID of isolate}
+ \item{\code{Organism type}}{Type of microorganism, can also be looked up using \code{\link{mo_type}}}
+ \item{\code{Serotype}}{Serotype of microorganism}
+ \item{\code{Beta-lactamase}}{Microorganism produces beta-lactamase?}
+ \item{\code{ESBL}}{Microorganism produces extended spectrum beta-lactamase?}
+ \item{\code{Carbapenemase}}{Microorganism produces carbapenemase?}
+ \item{\code{MRSA screening test}}{Microorganism is possible MRSA?}
+ \item{\code{Inducible clindamycin resistance}}{Clindamycin can be induced?}
+ \item{\code{Comment}}{Other comments}
+ \item{\code{Date of data entry}}{Date this data was entered in WHONET}
+ \item{\code{AMP_ND10:CIP_EE}}{27 different antibiotics. You can lookup the abbreviatons in the \code{\link{antibiotics}} data set, or use e.g. \code{\link{atc_name}("AMP")} to get the official name immediately.}
+}}
+\usage{
+WHONET
+}
+\description{
+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 data itself was based on our \code{\link{septic_patients}} data set.
+}
+\section{Read more on our website!}{
+
+\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
+}
+
+\keyword{datasets}
diff --git a/man/abname.Rd b/man/abname.Rd
index a61904c8..f2922eaa 100644
--- a/man/abname.Rd
+++ b/man/abname.Rd
@@ -38,7 +38,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/age.Rd b/man/age.Rd
index a332bc80..e2918fd3 100644
--- a/man/age.Rd
+++ b/man/age.Rd
@@ -20,7 +20,7 @@ Calculates age in years based on a reference date, which is the sytem date at de
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/age_groups.Rd b/man/age_groups.Rd
index 96cfd279..7497c0de 100644
--- a/man/age_groups.Rd
+++ b/man/age_groups.Rd
@@ -34,7 +34,7 @@ To split ages, the input can be:
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/antibiotics.Rd b/man/antibiotics.Rd
index a3d2092c..a41d4e70 100644
--- a/man/antibiotics.Rd
+++ b/man/antibiotics.Rd
@@ -25,7 +25,7 @@
\item{\code{useful_grampositive}}{\code{FALSE} if not useful according to EUCAST, \code{NA} otherwise (see Source)}
}}
\source{
-- World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
+World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
Table antibiotic coding EARSS (from WHONET 5.3): \url{http://www.madsonline.dk/Tutorials/landskoder_antibiotika_WM.pdf}
@@ -39,10 +39,20 @@ antibiotics
\description{
A data set containing all antibiotics with a J0 code and some other antimicrobial agents, with their DDDs. Except for trade names and abbreviations, all properties were downloaded from the WHO, see Source.
}
+\section{WHOCC}{
+
+\if{html}{\figure{logo_who.png}{options: height=60px style=margin-bottom:5px} \cr}
+This package contains \strong{all ~500 antimicrobial drugs} and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, \url{https://www.whocc.no}) and the Pharmaceuticals Community Register of the European Commission (\url{http://ec.europa.eu/health/documents/community-register/html/atc.htm}).
+
+These have become the gold standard for international drug utilisation monitoring and research.
+
+The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.
+}
+
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/as.atc.Rd b/man/as.atc.Rd
index e3d1ceab..040c6451 100644
--- a/man/as.atc.Rd
+++ b/man/as.atc.Rd
@@ -38,7 +38,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/as.mic.Rd b/man/as.mic.Rd
index bea513d9..39dc9680 100755
--- a/man/as.mic.Rd
+++ b/man/as.mic.Rd
@@ -23,7 +23,7 @@ This transforms a vector to a new class \code{mic}, which is an ordered factor w
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/as.mo.Rd b/man/as.mo.Rd
index 10f10f9f..a4e247bd 100644
--- a/man/as.mo.Rd
+++ b/man/as.mo.Rd
@@ -96,7 +96,7 @@ ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic spec
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd
index 158b3a6a..d51dbde0 100755
--- a/man/as.rsi.Rd
+++ b/man/as.rsi.Rd
@@ -27,7 +27,7 @@ The function \code{is.rsi.eligible} returns \code{TRUE} when a columns contains
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/atc_property.Rd b/man/atc_property.Rd
index 1edac996..2dd7bd76 100755
--- a/man/atc_property.Rd
+++ b/man/atc_property.Rd
@@ -40,7 +40,7 @@ Use these functions to return a specific property of an antibiotic from the \cod
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/count.Rd b/man/count.Rd
index 46cfce6c..85e9e0ce 100644
--- a/man/count.Rd
+++ b/man/count.Rd
@@ -61,7 +61,7 @@ These functions are meant to count isolates. Use the \code{\link{portion}_*} fun
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd
index 9460fdef..f5624dba 100644
--- a/man/eucast_rules.Rd
+++ b/man/eucast_rules.Rd
@@ -156,7 +156,7 @@ Abbrevations of the column containing antibiotics in the form: \strong{abbreviat
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd
index e8a305a0..1b0072e8 100755
--- a/man/first_isolate.Rd
+++ b/man/first_isolate.Rd
@@ -99,7 +99,7 @@ The function \code{filter_first_weighted_isolate} is essentially equal to:
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/freq.Rd b/man/freq.Rd
index da2873e1..a43f8ac7 100755
--- a/man/freq.Rd
+++ b/man/freq.Rd
@@ -110,7 +110,7 @@ The function \code{top_freq} uses \code{\link[dplyr]{top_n}} internally and will
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/g.test.Rd b/man/g.test.Rd
index be5ec92d..7fea4d71 100644
--- a/man/g.test.Rd
+++ b/man/g.test.Rd
@@ -103,7 +103,7 @@ If there are more than two categories and you want to find out which ones are si
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/get_locale.Rd b/man/get_locale.Rd
index 457c9dbd..cd93c2f9 100644
--- a/man/get_locale.Rd
+++ b/man/get_locale.Rd
@@ -20,6 +20,6 @@ Supported languages are \code{"en"} (English), \code{"de"} (German), \code{"nl"}
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
diff --git a/man/ggplot_rsi.Rd b/man/ggplot_rsi.Rd
index 5ac5bc75..cb480b0f 100644
--- a/man/ggplot_rsi.Rd
+++ b/man/ggplot_rsi.Rd
@@ -84,7 +84,7 @@ At default, the names of antibiotics will be shown on the plots using \code{\lin
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/guess_ab_col.Rd b/man/guess_ab_col.Rd
index 26627157..a4eb521f 100644
--- a/man/guess_ab_col.Rd
+++ b/man/guess_ab_col.Rd
@@ -19,7 +19,7 @@ This tries to find a column name in a data set based on information from the \co
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/join.Rd b/man/join.Rd
index f7c6548c..18fa8a6d 100755
--- a/man/join.Rd
+++ b/man/join.Rd
@@ -41,7 +41,7 @@ Join the dataset \code{\link{microorganisms}} easily to an existing table or cha
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/key_antibiotics.Rd b/man/key_antibiotics.Rd
index cc4afe6c..4515cb26 100755
--- a/man/key_antibiotics.Rd
+++ b/man/key_antibiotics.Rd
@@ -77,7 +77,7 @@ The function \code{key_antibiotics} returns a character vector with 12 antibioti
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd
index 9c9c38ea..dd657b44 100644
--- a/man/kurtosis.Rd
+++ b/man/kurtosis.Rd
@@ -26,7 +26,7 @@ Kurtosis is a measure of the "tailedness" of the probability distribution of a r
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/like.Rd b/man/like.Rd
index 8db2d04a..08c17cbb 100755
--- a/man/like.Rd
+++ b/man/like.Rd
@@ -37,7 +37,7 @@ Using RStudio? This function can also be inserted from the Addins menu and can h
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/mdro.Rd b/man/mdro.Rd
index b3220d30..48314bdc 100644
--- a/man/mdro.Rd
+++ b/man/mdro.Rd
@@ -258,7 +258,7 @@ Abbrevations of the column containing antibiotics in the form: \strong{abbreviat
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/microorganisms.Rd b/man/microorganisms.Rd
index 40e61b16..06d8d24f 100755
--- a/man/microorganisms.Rd
+++ b/man/microorganisms.Rd
@@ -44,7 +44,7 @@ ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic spec
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/microorganisms.codes.Rd b/man/microorganisms.codes.Rd
index ce516570..2ffa6c4e 100644
--- a/man/microorganisms.codes.Rd
+++ b/man/microorganisms.codes.Rd
@@ -18,7 +18,7 @@ A data set containing commonly used codes for microorganisms. Define your own wi
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/microorganisms.old.Rd b/man/microorganisms.old.Rd
index ff5bde68..e67579a2 100644
--- a/man/microorganisms.old.Rd
+++ b/man/microorganisms.old.Rd
@@ -33,7 +33,7 @@ ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic spec
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/mo_property.Rd b/man/mo_property.Rd
index 4d3a63d9..42cd46cc 100644
--- a/man/mo_property.Rd
+++ b/man/mo_property.Rd
@@ -114,7 +114,7 @@ ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic spec
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/mo_source.Rd b/man/mo_source.Rd
index a0a20dea..38c7324b 100644
--- a/man/mo_source.Rd
+++ b/man/mo_source.Rd
@@ -28,7 +28,7 @@ Reading an Excel file (\code{.xlsx}) with only one row has a size of 8-9 kB. The
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/p.symbol.Rd b/man/p.symbol.Rd
index b3bda736..e2beb2e2 100644
--- a/man/p.symbol.Rd
+++ b/man/p.symbol.Rd
@@ -20,6 +20,6 @@ Return the symbol related to the p value: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
diff --git a/man/portion.Rd b/man/portion.Rd
index 82a1422f..51a1bf90 100644
--- a/man/portion.Rd
+++ b/man/portion.Rd
@@ -82,7 +82,7 @@ The old \code{\link{rsi}} function is still available for backwards compatibilit
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/read.4D.Rd b/man/read.4D.Rd
index 70e80964..456e297a 100644
--- a/man/read.4D.Rd
+++ b/man/read.4D.Rd
@@ -125,6 +125,6 @@ Column names will be transformed, but the original column names are set as a "la
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd
index c1e16737..46dde885 100644
--- a/man/resistance_predict.Rd
+++ b/man/resistance_predict.Rd
@@ -72,7 +72,7 @@ Create a prediction model to predict antimicrobial resistance for the next years
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\examples{
diff --git a/man/septic_patients.Rd b/man/septic_patients.Rd
index 96393e53..feb248a8 100755
--- a/man/septic_patients.Rd
+++ b/man/septic_patients.Rd
@@ -26,7 +26,7 @@ An anonymised data set containing 2,000 microbial blood culture isolates with th
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\keyword{datasets}
diff --git a/man/skewness.Rd b/man/skewness.Rd
index 0af0af49..509a5631 100644
--- a/man/skewness.Rd
+++ b/man/skewness.Rd
@@ -28,7 +28,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\seealso{
diff --git a/man/supplementary_data.Rd b/man/supplementary_data.Rd
index 9fcbfbe8..b48d9396 100644
--- a/man/supplementary_data.Rd
+++ b/man/supplementary_data.Rd
@@ -24,7 +24,7 @@ These \code{\link{data.table}s} are transformed from the \code{\link{microorgani
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
-On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
+On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
}
\keyword{datasets}
diff --git a/vignettes/WHONET.Rmd b/vignettes/WHONET.Rmd
index 35b0776a..63c76083 100644
--- a/vignettes/WHONET.Rmd
+++ b/vignettes/WHONET.Rmd
@@ -23,4 +23,54 @@ knitr::opts_chunk$set(
)
```
-*(will be available soon)*
+# Import of data
+
+This tutorial assumes you already imported the WHONET data with e.g. the [`readxl` package](https://readxl.tidyverse.org/). In RStudio, this can be done using the menu button 'Import Dataset' in the tab 'Environment'. Choose the option 'From Excel' and select your exported file. Make sure date fields are imported correctly.
+
+An example syntax could look like this:
+
+```{r, eval = FALSE}
+library(readxl)
+data <- read_excel(path = "path/to/your/file.xlsx")
+```
+
+This package comes with an [example data set `WHONET`](./reference/WHONET.html). We will use it for this analysis.
+
+# Preparation
+
+First, load the relevant packages if you did not yet did this. I use the tidyverse for all of my analyses. All of them. If you don't know it yet, I suggest you read about it on their website: https://www.tidyverse.org/.
+
+```{r, message = FALSE}
+library(tidyverse)
+library(AMR)
+```
+
+We will have to transform some variables to simplify and automate the analysis:
+
+* Microorganisms should be transformed to our own microorganism IDs (called an `mo`) using [the ITIS reference data set](./reference/ITIS.html), which contains all ~20,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with `as.mo()`.
+* Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values `"S"`, `"I"` or `"R"`. That is exactly where the `as.rsi()` function is for.
+
+```{r}
+# transform variables
+data <- WHONET %>%
+ # get microbial ID based on given organism
+ mutate(mo = as.mo(Organism)) %>%
+ # transform everything from "AMP_ND10" to "CIP_EE" to the new `rsi` class
+ mutate_at(vars(AMP_ND10:CIP_EE), as.rsi)
+```
+
+No errors or warnings, so all values are transformed succesfully. Let's check it though, with a couple of frequency tables:
+
+```{r, results = 'asis'}
+# our newly created `mo` variable
+data %>% freq(mo, nmax = 10)
+
+# our transformed antibiotic columns
+# amoxicillin/clavulanic acid (J01CR02) as an example
+data %>% freq(AMC_ND2)
+```
+
+# Analysis
+
+*(more will be available soon)*
+