diff --git a/DESCRIPTION b/DESCRIPTION index d82496bb..1bda40fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 0.5.0.9018 -Date: 2019-02-20 +Date: 2019-02-21 Title: Antimicrobial Resistance Analysis Authors@R: c( person( diff --git a/R/amr.R b/R/amr.R new file mode 100644 index 00000000..bdbc9b5a --- /dev/null +++ b/R/amr.R @@ -0,0 +1,67 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# SOURCE # +# https://gitlab.com/msberends/AMR # +# # +# LICENCE # +# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# This R package is free software; you can freely use and distribute # +# it for both personal and commercial purposes under the terms of the # +# GNU General Public License version 2.0 (GNU GPL-2), as published by # +# the Free Software Foundation. # +# # +# This R package was created for academic research and was publicly # +# released in the hope that it will be useful, but it comes WITHOUT # +# ANY WARRANTY OR LIABILITY. # +# Visit our website for more info: https://msberends.gitab.io/AMR. # +# ==================================================================== # + +#' The \code{AMR} Package +#' +#' Welcome to the \code{AMR} package. +#' @details +#' \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. +#' +#' 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{Reference for microorganisms, since it contains almost all 60,000 microbial (sub)species from the Catalogue of Life} +#' \item{Calculating antimicrobial resistance} +#' \item{Calculating empirical susceptibility of both mono therapy and combination therapy} +#' \item{Predicting future 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 expert rules (not the translation from MIC to RSI values)} +#' \item{Determining multi-drug resistant 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!: +#' 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: +#' +#' Matthijs S. Berends \cr +#' m.s.berends [at] umcg [dot] nl \cr +#' Department of Medical Microbiology, University of Groningen \cr +#' University Medical Center Groningen \cr +#' Post Office Box 30001 \cr +#' 9700 RB Groningen +#' +#' If you have found a bug, please file a new issue at: \cr +#' \url{https://gitlab.com/msberends/AMR/issues} +#' @name AMR +#' @rdname AMR +NULL diff --git a/R/atc_online.R b/R/atc_online.R index 77bbad0e..c201b51a 100644 --- a/R/atc_online.R +++ b/R/atc_online.R @@ -56,6 +56,7 @@ #' @export #' @rdname atc_online #' @importFrom dplyr %>% progress_estimated +#' @inheritSection AMR Read more on our website! #' @source \url{https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/} #' @examples #' \donttest{ diff --git a/R/availability.R b/R/availability.R index a120430d..d3fc71b1 100644 --- a/R/availability.R +++ b/R/availability.R @@ -24,6 +24,7 @@ #' Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. \code{\link{portion_IR}}. #' @param tbl a \code{data.frame} or \code{list} #' @return \code{data.frame} with column names of \code{tbl} as row names and columns: \code{percent_IR}, \code{count}, \code{percent}, \code{visual_availability}. +#' @inheritSection AMR Read more on our website! #' @export #' @examples #' availability(septic_patients) diff --git a/R/data.R b/R/data.R index 85e4c27d..6e8d1840 100755 --- a/R/data.R +++ b/R/data.R @@ -170,6 +170,7 @@ catalogue_of_life <- list( #' Version info of included Catalogue of Life #' @seealso \code{\link{microorganisms}} #' @inheritSection catalogue_of_life Catalogue of Life +#' @inheritSection AMR Read more on our website! #' @export catalogue_of_life_version <- function() { list(version = catalogue_of_life$version, diff --git a/R/mo.R b/R/mo.R index e2550ed8..cd495022 100755 --- a/R/mo.R +++ b/R/mo.R @@ -304,11 +304,13 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, # add start en stop regex x <- paste0('^', x, '$') x_withspaces_start_only <- paste0('^', x_withspaces) + x_withspaces_end_only <- paste0(x_withspaces, '$') x_withspaces_start_end <- paste0('^', x_withspaces, '$') # cat(paste0('x "', x, '"\n')) # cat(paste0('x_species "', x_species, '"\n')) # cat(paste0('x_withspaces_start_only "', x_withspaces_start_only, '"\n')) + # cat(paste0('x_withspaces_end_only "', x_withspaces_end_only, '"\n')) # cat(paste0('x_withspaces_start_end "', x_withspaces_start_end, '"\n')) # cat(paste0('x_backup "', x_backup, '"\n')) # cat(paste0('x_trimmed "', x_trimmed, '"\n')) @@ -494,194 +496,113 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, } } - # FIRST TRY SUPERPREVALENT IN HUMAN INFECTIONS ---- - found <- microorganisms.superprevDT[tolower(fullname) %in% tolower(c(x_backup[i], x_trimmed[i])), ..property][[1]] - # most probable: is exact match in fullname - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.superprevDT[mo == toupper(x_backup[i]), ..property][[1]] - # is a valid mo - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.superprevDT[tolower(fullname) == tolower(x_trimmed_without_group[i]), ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } + check_per_prevalence <- function(data_to_check, + a.x_backup, + b.x_trimmed, + c.x_trimmed_without_group, + d.x_withspaces_start_end, + e.x_withspaces_start_only, + f.x_withspaces_end_only) { - # try any match keeping spaces ---- - found <- microorganisms.superprevDT[fullname %like% x_withspaces_start_end[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try any match keeping spaces, not ending with $ ---- - found <- microorganisms.superprevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try any match diregarding spaces ---- - found <- microorganisms.superprevDT[fullname %like% x[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try splitting of characters in the middle and then find ID ---- - # only when text length is 6 or lower - # like esco = E. coli, klpn = K. pneumoniae, stau = S. aureus, staaur = S. aureus - if (nchar(x_trimmed[i]) <= 6) { - x_length <- nchar(x_trimmed[i]) - x[i] <- paste0(x_trimmed[i] %>% substr(1, x_length / 2), - '.* ', - x_trimmed[i] %>% substr((x_length / 2) + 1, x_length)) - found <- microorganisms.superprevDT[fullname %like% paste0('^', x[i]), ..property][[1]] + found <- data_to_check[tolower(fullname) %in% tolower(c(a.x_backup, b.x_trimmed)), ..property][[1]] + # most probable: is exact match in fullname if (length(found) > 0) { - x[i] <- found[1L] - next + return(found[1L]) } - } - # try fullname without start and stop regex, to also find subspecies ---- - # like "K. pneu rhino" >> "Klebsiella pneumoniae (rhinoscleromatis)" = KLEPNERH - found <- microorganisms.superprevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - - # TRY PREVALENT IN HUMAN INFECTIONS ---- - found <- microorganisms.prevDT[tolower(fullname) %in% tolower(c(x_backup[i], x_trimmed[i])), ..property][[1]] - # most probable: is exact match in fullname - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.prevDT[mo == toupper(x_backup[i]), ..property][[1]] - # is a valid mo - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.prevDT[tolower(fullname) == tolower(x_trimmed_without_group[i]), ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - - # try any match keeping spaces ---- - found <- microorganisms.prevDT[fullname %like% x_withspaces_start_end[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try any match keeping spaces, not ending with $ ---- - found <- microorganisms.prevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try any match diregarding spaces ---- - found <- microorganisms.prevDT[fullname %like% x[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - - # try splitting of characters in the middle and then find ID ---- - # only when text length is 6 or lower - # like esco = E. coli, klpn = K. pneumoniae, stau = S. aureus, staaur = S. aureus - if (nchar(x_trimmed[i]) <= 6) { - x_length <- nchar(x_trimmed[i]) - x[i] <- paste0(x_trimmed[i] %>% substr(1, x_length / 2), - '.* ', - x_trimmed[i] %>% substr((x_length / 2) + 1, x_length)) - found <- microorganisms.prevDT[fullname %like% paste0('^', x[i]), ..property][[1]] + found <- data_to_check[mo == toupper(a.x_backup), ..property][[1]] + # is a valid mo if (length(found) > 0) { - x[i] <- found[1L] - next + return(found[1L]) } + found <- data_to_check[tolower(fullname) == tolower(c.x_trimmed_without_group), ..property][[1]] + if (length(found) > 0) { + return(found[1L]) + } + + # try any match keeping spaces ---- + found <- data_to_check[fullname %like% d.x_withspaces_start_end, ..property][[1]] + if (length(found) > 0 & nchar(b.x_trimmed) >= 6) { + return(found[1L]) + } + + # try any match keeping spaces, not ending with $ ---- + found <- data_to_check[fullname %like% paste0(trimws(e.x_withspaces_start_only), " "), ..property][[1]] + if (length(found) > 0) { + return(found[1L]) + } + found <- data_to_check[fullname %like% e.x_withspaces_start_only, ..property][[1]] + if (length(found) > 0 & nchar(b.x_trimmed) >= 6) { + return(found[1L]) + } + + # try any match keeping spaces, not start with ^ ---- + found <- data_to_check[fullname %like% paste0(" ", trimws(f.x_withspaces_end_only)), ..property][[1]] + if (length(found) > 0) { + return(found[1L]) + } + found <- data_to_check[fullname %like% f.x_withspaces_end_only, ..property][[1]] + if (length(found) > 0 & nchar(b.x_trimmed) >= 6) { + return(found[1L]) + } + + # try splitting of characters in the middle and then find ID ---- + # only when text length is 6 or lower + # like esco = E. coli, klpn = K. pneumoniae, stau = S. aureus, staaur = S. aureus + if (nchar(b.x_trimmed) <= 6) { + x_length <- nchar(b.x_trimmed) + x_split <- paste0("^", + b.x_trimmed %>% substr(1, x_length / 2), + '.* ', + b.x_trimmed %>% substr((x_length / 2) + 1, x_length)) + found <- data_to_check[fullname %like% x_split, ..property][[1]] + if (length(found) > 0) { + return(found[1L]) + } + } + + # try fullname without start and without nchar limit of >= 6 ---- + # like "K. pneu rhino" >> "Klebsiella pneumoniae (rhinoscleromatis)" = KLEPNERH + found <- data_to_check[fullname %like% e.x_withspaces_start_only, ..property][[1]] + if (length(found) > 0) { + return(found[1L]) + } + + # didn't found any + return(NA_character_) } - # try fullname without start and stop regex, to also find subspecies ---- - # like "K. pneu rhino" >> "Klebsiella pneumoniae (rhinoscleromatis)" = KLEPNERH - found <- microorganisms.prevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] + # FIRST TRY VERY PREVALENT IN HUMAN INFECTIONS ---- + x[i] <- check_per_prevalence(data_to_check = microorganismsDT[prevalence == 1], + a.x_backup = x_backup[i], + b.x_trimmed = x_trimmed[i], + c.x_trimmed_without_group = x_trimmed_without_group[i], + d.x_withspaces_start_end = x_withspaces_start_end[i], + e.x_withspaces_start_only = x_withspaces_start_only[i], + f.x_withspaces_end_only = x_withspaces_end_only[i]) + if (!is.na(x[i])) { + next + } + # THEN TRY PREVALENT IN HUMAN INFECTIONS ---- + x[i] <- check_per_prevalence(data_to_check = microorganismsDT[prevalence == 2], + a.x_backup = x_backup[i], + b.x_trimmed = x_trimmed[i], + c.x_trimmed_without_group = x_trimmed_without_group[i], + d.x_withspaces_start_end = x_withspaces_start_end[i], + e.x_withspaces_start_only = x_withspaces_start_only[i], + f.x_withspaces_end_only = x_withspaces_end_only[i]) + if (!is.na(x[i])) { next } - # THEN UNPREVALENT IN HUMAN INFECTIONS ---- - found <- microorganisms.unprevDT[tolower(fullname) == tolower(x_backup[i]), ..property][[1]] - # most probable: is exact match in fullname - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.unprevDT[tolower(fullname) == tolower(x_trimmed[i]), ..property][[1]] - # most probable: is exact match in fullname - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.unprevDT[mo == toupper(x_backup[i]), ..property][[1]] - # is a valid mo - if (length(found) > 0) { - x[i] <- found[1L] - next - } - found <- microorganisms.unprevDT[tolower(fullname) == tolower(x_trimmed_without_group[i]), ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - # try any match keeping spaces ---- - found <- microorganisms.unprevDT[fullname %like% x_withspaces_start_end[i], ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - # try any match keeping spaces, not ending with $ ---- - found <- microorganisms.unprevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - # try any match diregarding spaces ---- - found <- microorganisms.unprevDT[fullname %like% x[i], ..property][[1]] - if (length(found) > 0 & nchar(x_trimmed[i]) >= 6) { - x[i] <- found[1L] - next - } - # try splitting of characters in the middle and then find ID ---- - # only when text length is 6 or lower - # like esco = E. coli, klpn = K. pneumoniae, stau = S. aureus, staaur = S. aureus - if (nchar(x_trimmed[i]) <= 6) { - x_length <- nchar(x_trimmed[i]) - x[i] <- paste0(x_trimmed[i] %>% substr(1, x_length / 2), - '.* ', - x_trimmed[i] %>% substr((x_length / 2) + 1, x_length)) - found <- microorganisms.unprevDT[fullname %like% paste0('^', x[i]), ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] - next - } - } - - # try fullname without start and stop regex, to also find subspecies ---- - # like "K. pneu rhino" >> "Klebsiella pneumoniae (rhinoscleromatis)" = KLEPNERH - found <- microorganisms.unprevDT[fullname %like% x_withspaces_start_only[i], ..property][[1]] - if (length(found) > 0) { - x[i] <- found[1L] + x[i] <- check_per_prevalence(data_to_check = microorganismsDT[prevalence == 3], + a.x_backup = x_backup[i], + b.x_trimmed = x_trimmed[i], + c.x_trimmed_without_group = x_trimmed_without_group[i], + d.x_withspaces_start_end = x_withspaces_start_end[i], + e.x_withspaces_start_only = x_withspaces_start_only[i], + f.x_withspaces_end_only = x_withspaces_end_only[i]) + if (!is.na(x[i])) { next } diff --git a/R/mo_property.R b/R/mo_property.R index 82b409c3..cc938e1f 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -125,7 +125,7 @@ #' language = "nl") # "Streptococcus groep A" #' #' -#' # Get a list with the complete taxonomy (subkingdom to subspecies) +#' # Get a list with the complete taxonomy (kingdom to subspecies) #' mo_taxonomy("E. coli") mo_fullname <- function(x, language = get_locale(), ...) { x <- mo_validate(x = x, property = "fullname", ...) diff --git a/R/zzz.R b/R/zzz.R index 4e3c2bef..349055cb 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -19,53 +19,7 @@ # Visit our website for more info: https://msberends.gitab.io/AMR. # # ==================================================================== # -#' The \code{AMR} Package -#' -#' Welcome to the \code{AMR} package. -#' @details -#' \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. -#' -#' 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: -#' -#' Matthijs S. Berends \cr -#' m.s.berends [at] umcg [dot] nl \cr -#' Department of Medical Microbiology, University of Groningen \cr -#' University Medical Center Groningen \cr -#' Post Office Box 30001 \cr -#' 9700 RB Groningen -#' -#' If you have found a bug, please file a new issue at: \cr -#' \url{https://gitlab.com/msberends/AMR/issues} -#' @name AMR -#' @rdname AMR -NULL - -#' @importFrom dplyr mutate +#' @importFrom dplyr mutate case_when #' @importFrom data.table as.data.table setkey .onLoad <- function(libname, pkgname) { # get new functions not available in older versions of R @@ -80,31 +34,27 @@ NULL # packageStartupMessage("Loading taxonomic database...", appendLF = FALSE) microorganismsDT <- AMR::microorganisms %>% - mutate(prevalent = ifelse(phylum %in% c("Proteobacteria", - "Firmicutes", - "Actinobacteria", - "Bacteroidetes") - | genus %in% c("Candida", - "Aspergillus", - "Trichophyton", - "Giardia", - "Dientamoeba", - "Entamoeba"), - 0, - 1), - superprevalent = ifelse( - # most important Gram negatives - class == "Gammaproteobacteria" - # Streptococci and Staphylococci - | order %in% c("Lactobacillales", - "Bacillales"), - 0, - 1)) %>% + mutate(prevalence = case_when( + # most important Gram negatives # Streptococci and Staphylococci + class == "Gammaproteobacteria" + | order %in% c("Lactobacillales", "Bacillales") + ~ 1, + phylum %in% c("Proteobacteria", + "Firmicutes", + "Actinobacteria", + "Bacteroidetes") + | genus %in% c("Candida", + "Aspergillus", + "Trichophyton", + "Giardia", + "Dientamoeba", + "Entamoeba") + ~ 2, + TRUE ~ 3 + )) %>% as.data.table() - setkey(microorganismsDT, kingdom, superprevalent, prevalent, fullname) - microorganisms.superprevDT <- microorganismsDT[superprevalent == 0,] - microorganisms.prevDT <- microorganismsDT[superprevalent == 1 & prevalent == 0,] - microorganisms.unprevDT <- microorganismsDT[superprevalent == 1 & prevalent == 1,] + setkey(microorganismsDT, kingdom, prevalence, fullname) + microorganisms.oldDT <- as.data.table(AMR::microorganisms.old) setkey(microorganisms.oldDT, col_id, fullname) @@ -112,209 +62,12 @@ NULL value = microorganismsDT, envir = asNamespace("AMR")) - assign(x = "microorganisms.superprevDT", - value = microorganisms.superprevDT, - envir = asNamespace("AMR")) - - assign(x = "microorganisms.prevDT", - value = microorganisms.prevDT, - envir = asNamespace("AMR")) - - assign(x = "microorganisms.unprevDT", - value = microorganisms.unprevDT, - envir = asNamespace("AMR")) - assign(x = "microorganisms.oldDT", value = microorganisms.oldDT, envir = asNamespace("AMR")) # conversion of old MO codes from v0.5.0 (ITIS) to later versions (Catalogue of Life) - mo_codes_v0.5.0 <- c(B_ACHRMB = "B_ACHRM", B_ANNMA = "B_ACTNS", B_ACLLS = "B_ALCYC", - B_AHNGM = "B_ARCHN", B_ARMTM = "B_ARMTMN", B_ARTHRS = "B_ARTHR", - B_APHLS = "B_AZRHZP", B_BRCHA = "B_BRCHY", B_BCTRM = "B_BRVBCT", - B_CLRBCT = "B_CLRBC", B_CTRDM = "B_CLSTR", B_CPRMM = "B_CYLND", - B_DLCLN = "B_DPLCL", B_DMCLM = "B_DSLFT", B_DSLFVB = "B_DSLFV", - B_FCTRM = "B_FSBCT", B_GNRLA = "B_GRDNR", B_HNRBM = "B_HLNRB", - B_HPHGA = "B_HNPHGA", B_HCCCS = "B_HYDRC", B_MCRCLS = "B_MCRCL", - B_MTHYLS = "B_MLSMA", B_MARCLS = "B_MRCLS", B_MGCLS = "B_MSTGC", - B_MCLLA = "B_MTHYLC", B_MYCPLS = "B_MYCPL", B_NBCTR = "B_NTRBC", - B_OCLLS = "B_OCNBC", B_PTHRX = "B_PLNKT", B_PCCCS = "B_PRCHL", - B_PSPHN = "B_PRPHY", B_PDMNS = "B_PSDMN", B_SCCHRP = "B_SCCHR", - B_SRBCTR = "B_SHRBCTR", B_STRPTC = "B_STRPT", B_SHMNS = "B_SYNTR", - B_TRBCTR = "B_THRMN", P_ALBMN = "C_ABMNA", F_ACHLY = "C_ACHLY", - P_ACINT = "C_ACINT", P_ARTCL = "C_ACLNA", P_ACRVL = "C_ACRVL", - P_ADRCT = "C_ADRCT", P_AMPHS = "C_AHSRS", F_ALBUG = "C_ALBUG", - P_ALCNT = "C_ALCNT", P_ALFRD = "C_ALFRD", P_ALLGR = "C_ALLGR", - P_AMPHL = "C_ALPTS", F_ALTHR = "C_ALTHR", P_AMLLA = "C_AMLLA", - P_ANMLN = "C_AMLNA", P_AMMBC = "C_AMMBC", P_AMMDS = "C_AMMDS", - P_AMMLG = "C_AMMLG", P_AMMMR = "C_AMMMR", P_AMMMS = "C_AMMMS", - P_AMMON = "C_AMMON", P_AMMSC = "C_AMMSC", P_AMMSP = "C_AMMSP", - P_AMMST = "C_AMMST", P_AMMTM = "C_AMMTM", F_AMYCS = "C_AMYCS", - P_ANARM = "C_ANARM", P_ANGLD = "C_ANGLD", P_ANGLG = "C_ANGLG", - P_ANNLC = "C_ANNLC", F_ANSLP = "C_ANSLP", F_APDCH = "C_APDCH", - F_APHND = "C_APHND", F_APLNC = "C_APLNC", F_AQLND = "C_AQLND", - P_ARCHS = "C_ARCHAS", P_ASTRN = "C_ARNNN", P_ARNPR = "C_ARNPR", - F_ARSPR = "C_ARSPR", P_ARTST = "C_ARTSTR", P_AMPHC = "C_ARYNA", - P_ASCHM = "C_ASCHM", P_ASPDS = "C_ASPDS", P_ASTCL = "C_ASTCL", - P_ASTRG = "C_ASTRGR", P_ASTRM = "C_ASTRMM", P_ASTRR = "C_ASTRR", - P_ASTRT = "C_ASTRTR", F_ATKNS = "C_ATKNS", F_AYLLA = "C_AYLLA", - P_BAGGN = "C_BAGGN", P_BCCLL = "C_BCCLL", P_BDLLD = "C_BDLLD", - P_BGNRN = "C_BGNRN", P_BLCLN = "C_BLCLN", P_BLMND = "C_BLMND", - P_BLMNL = "C_BLMNL", P_BLPHR = "C_BLPHR", P_BLVNT = "C_BLVNT", - P_BOLVN = "C_BOLVN", P_BORLS = "C_BORLS", P_BRNNM = "C_BRNNM", - P_BRSLN = "C_BRSLN", P_BRSRD = "C_BRSRD", F_BRVLG = "C_BRVLG", - F_BNLLA = "C_BRVLGN", P_BSCCM = "C_BSCCM", F_BSDPH = "C_BSDPH", - P_BTHYS = "C_BTHYS", P_BTLLN = "C_BTLLN", P_BULMN = "C_BULMN", - P_CCLDM = "C_CCLDM", P_CDNLL = "C_CDNLL", P_CLPSS = "C_CDNLLP", - P_CHLDN = "C_CHLDNL", P_CHLST = "C_CHLST", P_CHNLM = "C_CHNLM", - P_CHRYS = "C_CHRYSL", P_CHTSP = "C_CHTSP", P_CBCDS = "C_CIBCDS", - P_CLCRN = "C_CLCRN", P_CLMNA = "C_CLMNA", P_CLPDM = "C_CLPDM", - P_CLPHR = "C_CLPHRY", P_CLVLN = "C_CLVLN", P_CMPNL = "C_CMPNL", - P_CNCRS = "C_CNCRS", P_CNTCH = "C_CNTCH", F_CNTRM = "C_CNTRMY", - P_COLPD = "C_COLPD", P_COLPS = "C_COLPS", P_CPRDS = "C_CPRDS", - P_CRNSP = "C_CPRMA", P_CRBNL = "C_CRBNL", P_CRBRB = "C_CRBRB", - P_CRBRG = "C_CRBRG", P_CRBRS = "C_CRBRS", P_CRCHS = "C_CRCHS", - P_CRCLC = "C_CRCLC", P_CRNLC = "C_CRNLC", P_CRNTH = "C_CRNTH", - P_CRPNT = "C_CRPNT", P_CRSTG = "C_CRSTG", P_CRTHN = "C_CRTHN", - P_CRTRN = "C_CRTRN", P_CYMBL = "C_CRTTA", P_CRYPT = "C_CRYPT", - P_CSHMN = "C_CSHMNL", P_CSSDL = "C_CSSDL", P_CLNDS = "C_CSSDLN", - P_CHRNA = "C_CTHRN", P_CTPSS = "C_CTPSS", P_CUNLN = "C_CUNLN", - P_CYLND = "C_CVLNA", P_CYCLC = "C_CYCLCB", P_CDNTA = "C_CYCLD", - P_CYCLG = "C_CYCLG", P_CYCLM = "C_CYCLM", P_CYRTL = "C_CYRTL", - P_CYSTM = "C_CYSTM", P_DCHLM = "C_DCHLM", P_DCRBS = "C_DCRBS", - P_DCTYC = "C_DCTYC", P_DIDNM = "C_DIDNM", P_DLPTS = "C_DLPTS", - P_DNTLN = "C_DNTLN", P_DNTST = "C_DNTST", P_DORTH = "C_DORTH", - P_DCTYP = "C_DPHMS", F_DPLCY = "C_DPLCY", P_DNDRT = "C_DRTNA", - P_DSCMM = "C_DSCMM", P_DSCRB = "C_DSCRB", P_DSCRN = "C_DSCRN", - P_DSCSP = "C_DSCSP", P_DSNBR = "C_DSNBR", P_DYCBC = "C_DYCBC", - F_DCTYC = "C_DYCHS", F_ECTRG = "C_ECTRG", B_EDWRD = "C_EDWRD", - P_EGGRL = "C_EGGRL", P_EHLYS = "C_EHLYS", P_EHRNB = "C_EHRNB", - P_ELPHD = "C_ELPHD", P_ENCHL = "C_ELYDM", P_EPHDM = "C_EPHDM", - P_EPLTS = "C_EPLTS", P_EPLXL = "C_EPLXL", P_EPNDL = "C_EPNDL", - P_EPNDS = "C_EPNDS", P_ENLLA = "C_EPSTM", P_EPSTY = "C_EPSTY", - F_ERYCH = "C_ERYCH", F_ESMDM = "C_ESMDM", P_ESSYR = "C_ESSYR", - P_FSCHR = "C_FHRNA", P_FLRLS = "C_FLRLS", P_FLNTN = "C_FNTNA", - P_FRNDC = "C_FRNDC", P_FRNTN = "C_FRNTN", P_FRSNK = "C_FRSNK", - P_FNLLA = "C_FSCHRN", P_FSSRN = "C_FSSRN", P_FVCSS = "C_FVCSS", - P_GDRYN = "C_GDRYN", F_GELGN = "C_GELGN", P_GERDA = "C_GERDA", - P_GLACM = "C_GLACM", P_GLBBL = "C_GLBBL", P_GLBGR = "C_GLBGR", - P_GLBLN = "C_GLBLN", P_GRTLA = "C_GLBRT", P_GLBTX = "C_GLBTX", - P_GLLNA = "C_GLLNA", P_GLMSP = "C_GLMSP", P_GLNDL = "C_GLNDL", - F_GNMCH = "C_GNMCH", P_GOSLL = "C_GOSLL", P_GRNDS = "C_GRNDS", - P_GRNTA = "C_GRNTA", P_GLBRT = "C_GTLLA", P_GTTLN = "C_GTTLN", - P_GVLNP = "C_GVLNP", P_GYPSN = "C_GYPSN", P_GYRDN = "C_GYRDN", - P_HALTR = "C_HALTR", P_HANZW = "C_HANZW", P_HAURN = "C_HAURN", - P_HELNN = "C_HELNN", P_HLPHR = "C_HHRYA", P_HLNTA = "C_HLNTA", - F_HLPHT = "C_HLPHT", P_HLSTC = "C_HLSTC", P_HMSPH = "C_HMSPH", - P_HMTRM = "C_HMTRM", P_HPKNS = "C_HPKNS", P_HPLPH = "C_HPLPH", - P_HPPCR = "C_HPPCR", P_HNLLA = "C_HPPCRP", P_HRMSN = "C_HRMSN", - P_HRNLL = "C_HRNLL", F_HRPCH = "C_HRPCH", P_HSTGR = "C_HSTGR", - P_HSTTL = "C_HSTTL", P_HTRST = "C_HTGNA", P_HTRLL = "C_HTRLL", - P_HTRPH = "C_HTRPH", F_HYPHC = "C_HYPHC", P_HYPRM = "C_HYPRM", - P_INTRN = "C_INTRN", P_IRIDI = "C_IRIDI", P_ISLND = "C_ISLND", - P_JCLLL = "C_JCLLL", P_KHLLL = "C_KHLLL", P_KRNPS = "C_KRNPS", - P_KRRRL = "C_KRRRL", P_LABOE = "C_LABOE", P_LAGEN = "C_LAGEN", - P_LBSLL = "C_LBSLL", F_LTHLA = "C_LBYRN", P_LCRYM = "C_LCRYM", - P_LEMBS = "C_LEMBS", F_LGNDM = "C_LGNDM", P_LGNMM = "C_LGNMM", - P_LGNPH = "C_LGNPHR", F_LGNSM = "C_LGNSM", P_LGYNP = "C_LGYNP", - P_LITTB = "C_LITTB", P_LITUL = "C_LITUL", P_LMBDN = "C_LMBDN", - P_LMRCK = "C_LMRCK", F_LBYRN = "C_LMYXA", P_LNGLN = "C_LNGLN", - P_LNTCL = "C_LNTCL", P_LOXDS = "C_LOXDS", F_LPTLG = "C_LPTLG", - F_LNLLA = "C_LPTLGN", F_LPTMT = "C_LPTMT", P_LRYNG = "C_LRYNG", - P_LTCRN = "C_LTCRN", P_LTHPL = "C_LTHPL", P_LTNTS = "C_LTNTS", - F_LTRST = "C_LTRST", P_LXPHY = "C_LXPHY", P_MCRTH = "C_MCRTH", - P_MELNS = "C_MELNS", P_MSDNM = "C_MESDNM", P_METPS = "C_METPS", - P_MIMSN = "C_MIMSN", P_MINCN = "C_MINCN", P_MLLNL = "C_MLLNL", - P_MLMMN = "C_MLMMN", F_MNDNL = "C_MNDNL", P_MNLYS = "C_MNLYS", - P_MNPSS = "C_MNPSS", P_MRGNL = "C_MRGNL", P_MRGNP = "C_MRGNP", - P_MRSPL = "C_MRSPL", P_MRTNT = "C_MRTNT", P_MSSLN = "C_MSSLN", - P_MSSSS = "C_MSSSS", P_MTCNT = "C_MTCNT", P_MYCHS = "C_MYCHS", - P_MYSCH = "C_MYSCH", F_MYZCY = "C_MYZCY", P_NASSL = "C_NASSL", - P_NBCLN = "C_NBCLN", P_NBCLR = "C_NBCLR", P_NCNRB = "C_NCNRB", - P_NDBCL = "C_NDBCL", P_NRLLA = "C_NDBCLR", P_NMMLC = "C_NMMLC", - F_NMTPH = "C_NMTPH", P_NNNLL = "C_NNNLL", P_NODSR = "C_NODSR", - P_NONIN = "C_NONIN", P_NOURI = "C_NOURI", P_OCLNA = "C_OCLNA", - P_OGLNA = "C_OGLNA", P_OPHTH = "C_OLMDM", F_OLPDP = "C_OLPDP", - P_ONYCH = "C_OMPSS", P_OOLIN = "C_OOLIN", P_OPRCL = "C_OPRCL", - P_ORBLN = "C_ORBLN", F_ORCAD = "C_ORCAD", P_ORDRS = "C_ORDRS", - P_OPHRY = "C_ORYDM", P_OSNGL = "C_OSNGL", P_OXYTR = "C_OXYTR", - P_PARRN = "C_PARRN", P_PATRS = "C_PATRS", P_PAVNN = "C_PAVNN", - P_PTYCH = "C_PCYLS", P_PDPHR = "C_PDPHR", P_PELSN = "C_PELSN", - F_PHGMY = "C_PHGMY", F_PSDSP = "C_PHRTA", P_PHRYG = "C_PHRYG", - P_PHYSL = "C_PHYSL", F_PHYTP = "C_PHYTP", P_PLACS = "C_PLACS", - P_PLCPS = "C_PLCPS", P_PLCPSL = "C_PLCPSL", P_PLCTN = "C_PLCTN", - P_PLGPH = "C_PLGPH", B_PLGTH = "C_PLGTH", P_PLMRN = "C_PLMRN", - P_PLNCT = "C_PLNCT", P_PLNDSC = "C_PLNDSC", P_PLNGY = "C_PLNGY", - P_PLNRBL = "C_PLNLLA", P_PLNLN = "C_PLNLN", P_PLNLR = "C_PLNLR", - P_PLNRB = "C_PLNRB", P_PLNSP = "C_PLNSPR", P_PLRNM = "C_PLRNM", - P_PLRST = "C_PLRST", P_PLRTR = "C_PLRTR", F_PLSMD = "C_PLSMD", - P_PLTYC = "C_PLTYC", P_PSDBL = "C_PLVNA", P_PLYMR = "C_PLYMR", - P_PLTYN = "C_PNMTM", P_PNRPL = "C_PNRPL", F_PNTSM = "C_PNTSM", - P_PRCNT = "C_PRCNT", P_PRFSS = "C_PRFSS", P_PRMCM = "C_PRMCUM", - F_PRNSP = "C_PRNSP", P_PRPND = "C_PRPND", P_PRPYX = "C_PRPYX", - P_PRRDN = "C_PRRDN", P_PSDDF = "C_PSDDF", P_PSDMC = "C_PSDMC", - P_PSDND = "C_PSDND", P_PSDNN = "C_PSDNN", P_PSDPL = "C_PSDPLY", - P_PSMMS = "C_PSMMS", P_PTLLN = "C_PTLLN", P_PTLLND = "C_PTLLND", - F_PTRSN = "C_PTRSN", P_PULLN = "C_PULLN", P_PUTLN = "C_PUTLN", - P_PRTTR = "C_PYMNA", P_PYRGL = "C_PYRGL", P_PYRGO = "C_PYRGO", - P_PYRLN = "C_PYRLN", F_PYTHM = "C_PYTHIM", F_PYTHL = "C_PYTHL", - P_PYXCL = "C_PYXCL", P_QNQLC = "C_QNQLC", P_RAMLN = "C_RAMLN", - P_RBRTN = "C_RBRTN", P_RCRVD = "C_RCRVD", P_RCTBL = "C_RCTBL", - P_RCTCB = "C_RCTCB", P_RCTGL = "C_RCTGL", P_RCTVG = "C_RCTVG", - P_RDGDR = "C_RDGDR", P_REMNC = "C_REMNC", P_REPHX = "C_REPHX", - P_RHBDM = "C_RHBDMM", F_RHBDS = "C_RHBDSP", P_RHPDD = "C_RHPDD", - F_RHPDM = "C_RHPDM", F_RHZDMY = "C_RHZDM", P_RHZMM = "C_RHZMM", - P_RIVRN = "C_RIVRN", P_ROSLN = "C_ROSLN", P_ROTAL = "C_ROTAL", - P_RPHDP = "C_RPHDP", P_RPRTN = "C_RPRTN", P_RSSLL = "C_RSSLL", - P_RTLMM = "C_RTLMM", P_RTYLA = "C_RTYLA", P_RUGID = "C_RUGID", - F_RZLLP = "C_RZLLP", P_SAGRN = "C_SAGRN", P_SCCMM = "C_SCCMM", - P_SCCRH = "C_SCCRH", P_SCHLM = "C_SCHLM", F_SCLRS = "C_SCLRS", - P_SCTLR = "C_SCTLR", P_SEBRK = "C_SEBRK", P_SGMLN = "C_SGMLN", - P_SGMLP = "C_SGMLP", P_SGMMR = "C_SGMMR", P_SGMVR = "C_SGMVR", - F_SMMRS = "C_SMMRS", P_SNNDS = "C_SNNDS", P_SORTS = "C_SORTS", - P_SPHGN = "C_SPHGN", P_SPHNN = "C_SPHNN", P_SNLLA = "C_SPHNNL", - P_SPHTR = "C_SPHTR", P_SPHTX = "C_SPHTX", P_SPHVG = "C_SPHVG", - P_SPRDT = "C_SPRDT", P_SPRLC = "C_SPRLC", F_SPRLG = "C_SPRLG", - P_SPRLL = "C_SPRLL", F_SPRMY = "C_SPRMY", P_SPRPL = "C_SPRPL", - P_SPRSG = "C_SPRSG", P_SPRST = "C_SPRST", P_SPHNP = "C_SPRTA", - P_SPRZN = "C_SPRZN", P_SPHRG = "C_SPSNA", P_STHDM = "C_SPTHD", - P_SRCNR = "C_SRCNR", F_SRLPD = "C_SRLPD", F_SPNGS = "C_SSPRA", - F_STEIN = "C_STEIN", P_SPTHD = "C_STHDDS", P_STHRP = "C_STHRP", - P_STNFR = "C_STNFR", P_STNSM = "C_STNSM", P_STNTR = "C_STNTR", - P_STRBL = "C_STRBL", P_STRMB = "C_STRMB", P_STTSN = "C_STTSN", - P_STYLN = "C_SYCHA", F_SCHZC = "C_SYTRM", P_TBNLL = "C_TBNLL", - P_TRCHL = "C_TCHLS", P_TCHNT = "C_TCHNT", P_THRCL = "C_THRCL", - P_THRMM = "C_THRMM", P_TIARN = "C_TIARN", P_TKPHR = "C_TKPHR", - P_TLNMA = "C_TLNMA", P_TLYPM = "C_TLYPM", P_TMNDS = "C_TMNDS", - P_TMNTA = "C_TMNTA", P_TNTNN = "C_TNNDM", P_TTNNS = "C_TNTNN", - P_TNPSS = "C_TNTNNP", P_TONTN = "C_TONTN", P_TOSAI = "C_TOSAI", - P_TPHTR = "C_TPHTR", P_TRCHH = "C_TRCHH", P_TRPHS = "C_TRCHLR", - P_TMMNA = "C_TRCHM", P_TRCHS = "C_TRCHSP", P_TRFRN = "C_TRFRN", - P_TRLCL = "C_TRLCL", P_TRTXL = "C_TRTXL", P_TRTXS = "C_TRTXS", - P_TTRHY = "C_TTRHY", F_TTRMY = "C_TTRMY", P_TXTLR = "C_TXTLR", - F_THRST = "C_TYTRM", P_URLPT = "C_ULPTS", P_UNGLT = "C_UNGLT", - P_URCNT = "C_URCNT", P_URONM = "C_URONM", P_UROSM = "C_UROSM", - P_URTRC = "C_URTRC", P_URSTY = "C_UTYLA", P_UVGRN = "C_UVGRN", - P_VLVLN = "C_VALVLN", P_VGNLN = "C_VGNLN", P_VGNLNP = "C_VGNLNP", - P_VLNRA = "C_VLVLN", P_VGNCL = "C_VNCLA", P_VRGLN = "C_VRGLN", - P_VRGLNP = "C_VRGLNP", P_VRTCL = "C_VRTCL", P_WBBNL = "C_WBBNL", - P_WEBBN = "C_WEBBN", P_WSNRL = "C_WSNRL", P_ZTHMN = "C_ZHMNM", - B_ZOOGL = "C_ZOOGL", F_DDSCS = "F_DPDSC", F_SCCHR = "F_SMYCS", - P_AMTRN = "P_ACNTH", F_AMBDM = "P_AMBDM", F_ARCYR = "P_ARCYR", - F_BADHM = "P_BADHM", F_BDHMP = "P_BDHMP", F_BRBYL = "P_BRBYL", - F_BRFLD = "P_BRFLD", F_CLMYX = "P_CLMYX", F_CLSTD = "P_CLSTD", - F_CMTRC = "P_CMTRC", F_CRBRR = "P_CRBRR", F_CRTMY = "P_CRTMY", - F_CRTRM = "P_CRTRM", F_DCTYD = "P_DCTYD", F_DDYMM = "P_DDYMM", - F_DIACH = "P_DIACH", F_DIANM = "P_DIANM", F_DIDRM = "P_DIDRM", - F_ELMYX = "P_ELMYX", F_ESTLM = "P_ESTLM", F_FULIG = "P_FULIG", - F_HMTRC = "P_HMTRC", F_LCRPS = "P_LCRPS", F_LICEA = "P_LICEA", - F_LMPRD = "P_LMPRD", F_LPTDR = "P_LPTDR", F_LSTRL = "P_LSTRL", - F_LYCGL = "P_LYCGL", F_MCBRD = "P_MCBRD", F_MNKTL = "P_MNKTL", - F_MTTRC = "P_MTTRC", F_MUCLG = "P_MUCLG", F_PHYSR = "P_PHYSR", - F_PRCHN = "P_PRCHN", F_PRMBD = "P_PRMBD", F_PRTPH = "P_PRTPH", - F_PSRNA = "P_PSRNA", F_PYSRM = "P_PYSRM", F_RTCLR = "P_RTCLR", - F_STMNT = "P_STMNT", F_SYMPH = "P_SYMPH", F_TRBRK = "P_TRBRK", - F_TRICH = "P_TRICH", F_TUBFR = "P_TUBFR") + mo_codes_v0.5.0 <- c(B_ACHRMB = "B_ACHRM", B_ANNMA = "B_ACTNS", B_ACLLS = "B_ALCYC", B_AHNGM = "B_ARCHN", B_ARMTM = "B_ARMTMN", B_ARTHRS = "B_ARTHR", B_APHLS = "B_AZRHZP", B_BRCHA = "B_BRCHY", B_BCTRM = "B_BRVBCT", B_CLRBCT = "B_CLRBC", B_CTRDM = "B_CLSTR", B_CPRMM = "B_CYLND", B_DLCLN = "B_DPLCL", B_DMCLM = "B_DSLFT", B_DSLFVB = "B_DSLFV", B_FCTRM = "B_FSBCT", B_GNRLA = "B_GRDNR", B_HNRBM = "B_HLNRB", B_HPHGA = "B_HNPHGA", B_HCCCS = "B_HYDRC", B_MCRCLS = "B_MCRCL", B_MTHYLS = "B_MLSMA", B_MARCLS = "B_MRCLS", B_MGCLS = "B_MSTGC", B_MCLLA = "B_MTHYLC", B_MYCPLS = "B_MYCPL", B_NBCTR = "B_NTRBC", B_OCLLS = "B_OCNBC", B_PTHRX = "B_PLNKT", B_PCCCS = "B_PRCHL", B_PSPHN = "B_PRPHY", B_PDMNS = "B_PSDMN", B_SCCHRP = "B_SCCHR", B_SRBCTR = "B_SHRBCTR", B_STRPTC = "B_STRPT", B_SHMNS = "B_SYNTR", B_TRBCTR = "B_THRMN", P_ALBMN = "C_ABMNA", F_ACHLY = "C_ACHLY", P_ACINT = "C_ACINT", P_ARTCL = "C_ACLNA", P_ACRVL = "C_ACRVL", P_ADRCT = "C_ADRCT", P_AMPHS = "C_AHSRS", F_ALBUG = "C_ALBUG", P_ALCNT = "C_ALCNT", P_ALFRD = "C_ALFRD", P_ALLGR = "C_ALLGR", P_AMPHL = "C_ALPTS", F_ALTHR = "C_ALTHR", P_AMLLA = "C_AMLLA", P_ANMLN = "C_AMLNA", P_AMMBC = "C_AMMBC", P_AMMDS = "C_AMMDS", P_AMMLG = "C_AMMLG", P_AMMMR = "C_AMMMR", P_AMMMS = "C_AMMMS", P_AMMON = "C_AMMON", P_AMMSC = "C_AMMSC", P_AMMSP = "C_AMMSP", P_AMMST = "C_AMMST", P_AMMTM = "C_AMMTM", F_AMYCS = "C_AMYCS", P_ANARM = "C_ANARM", P_ANGLD = "C_ANGLD", P_ANGLG = "C_ANGLG", P_ANNLC = "C_ANNLC", F_ANSLP = "C_ANSLP", F_APDCH = "C_APDCH", F_APHND = "C_APHND", F_APLNC = "C_APLNC", F_AQLND = "C_AQLND", P_ARCHS = "C_ARCHAS", P_ASTRN = "C_ARNNN", P_ARNPR = "C_ARNPR", F_ARSPR = "C_ARSPR", P_ARTST = "C_ARTSTR", P_AMPHC = "C_ARYNA", P_ASCHM = "C_ASCHM", P_ASPDS = "C_ASPDS", P_ASTCL = "C_ASTCL", P_ASTRG = "C_ASTRGR", P_ASTRM = "C_ASTRMM", P_ASTRR = "C_ASTRR", P_ASTRT = "C_ASTRTR", F_ATKNS = "C_ATKNS", F_AYLLA = "C_AYLLA", P_BAGGN = "C_BAGGN", P_BCCLL = "C_BCCLL", P_BDLLD = "C_BDLLD", P_BGNRN = "C_BGNRN", P_BLCLN = "C_BLCLN", P_BLMND = "C_BLMND", P_BLMNL = "C_BLMNL", P_BLPHR = "C_BLPHR", P_BLVNT = "C_BLVNT", P_BOLVN = "C_BOLVN", P_BORLS = "C_BORLS", P_BRNNM = "C_BRNNM", P_BRSLN = "C_BRSLN", P_BRSRD = "C_BRSRD", F_BRVLG = "C_BRVLG", F_BNLLA = "C_BRVLGN", P_BSCCM = "C_BSCCM", F_BSDPH = "C_BSDPH", P_BTHYS = "C_BTHYS", P_BTLLN = "C_BTLLN", P_BULMN = "C_BULMN", P_CCLDM = "C_CCLDM", P_CDNLL = "C_CDNLL", P_CLPSS = "C_CDNLLP", P_CHLDN = "C_CHLDNL", P_CHLST = "C_CHLST", P_CHNLM = "C_CHNLM", P_CHRYS = "C_CHRYSL", P_CHTSP = "C_CHTSP", P_CBCDS = "C_CIBCDS", P_CLCRN = "C_CLCRN", P_CLMNA = "C_CLMNA", P_CLPDM = "C_CLPDM", P_CLPHR = "C_CLPHRY", P_CLVLN = "C_CLVLN", P_CMPNL = "C_CMPNL", P_CNCRS = "C_CNCRS", P_CNTCH = "C_CNTCH", F_CNTRM = "C_CNTRMY", P_COLPD = "C_COLPD", P_COLPS = "C_COLPS", P_CPRDS = "C_CPRDS", P_CRNSP = "C_CPRMA", P_CRBNL = "C_CRBNL", P_CRBRB = "C_CRBRB", P_CRBRG = "C_CRBRG", P_CRBRS = "C_CRBRS", P_CRCHS = "C_CRCHS", P_CRCLC = "C_CRCLC", P_CRNLC = "C_CRNLC", P_CRNTH = "C_CRNTH", P_CRPNT = "C_CRPNT", P_CRSTG = "C_CRSTG", P_CRTHN = "C_CRTHN", P_CRTRN = "C_CRTRN", P_CYMBL = "C_CRTTA", P_CRYPT = "C_CRYPT", P_CSHMN = "C_CSHMNL", P_CSSDL = "C_CSSDL", P_CLNDS = "C_CSSDLN", P_CHRNA = "C_CTHRN", P_CTPSS = "C_CTPSS", P_CUNLN = "C_CUNLN", P_CYLND = "C_CVLNA", P_CYCLC = "C_CYCLCB", P_CDNTA = "C_CYCLD", P_CYCLG = "C_CYCLG", P_CYCLM = "C_CYCLM", P_CYRTL = "C_CYRTL", P_CYSTM = "C_CYSTM", P_DCHLM = "C_DCHLM", P_DCRBS = "C_DCRBS", P_DCTYC = "C_DCTYC", P_DIDNM = "C_DIDNM", P_DLPTS = "C_DLPTS", P_DNTLN = "C_DNTLN", P_DNTST = "C_DNTST", P_DORTH = "C_DORTH", P_DCTYP = "C_DPHMS", F_DPLCY = "C_DPLCY", P_DNDRT = "C_DRTNA", P_DSCMM = "C_DSCMM", P_DSCRB = "C_DSCRB", P_DSCRN = "C_DSCRN", P_DSCSP = "C_DSCSP", P_DSNBR = "C_DSNBR", P_DYCBC = "C_DYCBC", F_DCTYC = "C_DYCHS", F_ECTRG = "C_ECTRG", B_EDWRD = "C_EDWRD", P_EGGRL = "C_EGGRL", P_EHLYS = "C_EHLYS", P_EHRNB = "C_EHRNB", P_ELPHD = "C_ELPHD", P_ENCHL = "C_ELYDM", P_EPHDM = "C_EPHDM", P_EPLTS = "C_EPLTS", P_EPLXL = "C_EPLXL", P_EPNDL = "C_EPNDL", P_EPNDS = "C_EPNDS", P_ENLLA = "C_EPSTM", P_EPSTY = "C_EPSTY", F_ERYCH = "C_ERYCH", F_ESMDM = "C_ESMDM", P_ESSYR = "C_ESSYR", P_FSCHR = "C_FHRNA", P_FLRLS = "C_FLRLS", P_FLNTN = "C_FNTNA", P_FRNDC = "C_FRNDC", P_FRNTN = "C_FRNTN", P_FRSNK = "C_FRSNK", P_FNLLA = "C_FSCHRN", P_FSSRN = "C_FSSRN", P_FVCSS = "C_FVCSS", P_GDRYN = "C_GDRYN", F_GELGN = "C_GELGN", P_GERDA = "C_GERDA", P_GLACM = "C_GLACM", P_GLBBL = "C_GLBBL", P_GLBGR = "C_GLBGR", P_GLBLN = "C_GLBLN", P_GRTLA = "C_GLBRT", P_GLBTX = "C_GLBTX", P_GLLNA = "C_GLLNA", P_GLMSP = "C_GLMSP", P_GLNDL = "C_GLNDL", F_GNMCH = "C_GNMCH", P_GOSLL = "C_GOSLL", P_GRNDS = "C_GRNDS", P_GRNTA = "C_GRNTA", P_GLBRT = "C_GTLLA", P_GTTLN = "C_GTTLN", P_GVLNP = "C_GVLNP", P_GYPSN = "C_GYPSN", P_GYRDN = "C_GYRDN", P_HALTR = "C_HALTR", P_HANZW = "C_HANZW", P_HAURN = "C_HAURN", P_HELNN = "C_HELNN", P_HLPHR = "C_HHRYA", P_HLNTA = "C_HLNTA", F_HLPHT = "C_HLPHT", P_HLSTC = "C_HLSTC", P_HMSPH = "C_HMSPH", P_HMTRM = "C_HMTRM", P_HPKNS = "C_HPKNS", P_HPLPH = "C_HPLPH", P_HPPCR = "C_HPPCR", P_HNLLA = "C_HPPCRP", P_HRMSN = "C_HRMSN", P_HRNLL = "C_HRNLL", F_HRPCH = "C_HRPCH", P_HSTGR = "C_HSTGR", P_HSTTL = "C_HSTTL", P_HTRST = "C_HTGNA", P_HTRLL = "C_HTRLL", P_HTRPH = "C_HTRPH", F_HYPHC = "C_HYPHC", P_HYPRM = "C_HYPRM", P_INTRN = "C_INTRN", P_IRIDI = "C_IRIDI", P_ISLND = "C_ISLND", P_JCLLL = "C_JCLLL", P_KHLLL = "C_KHLLL", P_KRNPS = "C_KRNPS", P_KRRRL = "C_KRRRL", P_LABOE = "C_LABOE", P_LAGEN = "C_LAGEN", P_LBSLL = "C_LBSLL", F_LTHLA = "C_LBYRN", P_LCRYM = "C_LCRYM", P_LEMBS = "C_LEMBS", F_LGNDM = "C_LGNDM", P_LGNMM = "C_LGNMM", P_LGNPH = "C_LGNPHR", F_LGNSM = "C_LGNSM", P_LGYNP = "C_LGYNP", P_LITTB = "C_LITTB", P_LITUL = "C_LITUL", P_LMBDN = "C_LMBDN", P_LMRCK = "C_LMRCK", F_LBYRN = "C_LMYXA", P_LNGLN = "C_LNGLN", P_LNTCL = "C_LNTCL", P_LOXDS = "C_LOXDS", F_LPTLG = "C_LPTLG", F_LNLLA = "C_LPTLGN", F_LPTMT = "C_LPTMT", P_LRYNG = "C_LRYNG", P_LTCRN = "C_LTCRN", P_LTHPL = "C_LTHPL", P_LTNTS = "C_LTNTS", F_LTRST = "C_LTRST", P_LXPHY = "C_LXPHY", P_MCRTH = "C_MCRTH", P_MELNS = "C_MELNS", P_MSDNM = "C_MESDNM", P_METPS = "C_METPS", P_MIMSN = "C_MIMSN", P_MINCN = "C_MINCN", P_MLLNL = "C_MLLNL", P_MLMMN = "C_MLMMN", F_MNDNL = "C_MNDNL", P_MNLYS = "C_MNLYS", P_MNPSS = "C_MNPSS", P_MRGNL = "C_MRGNL", P_MRGNP = "C_MRGNP", P_MRSPL = "C_MRSPL", P_MRTNT = "C_MRTNT", P_MSSLN = "C_MSSLN", P_MSSSS = "C_MSSSS", P_MTCNT = "C_MTCNT", P_MYCHS = "C_MYCHS", P_MYSCH = "C_MYSCH", F_MYZCY = "C_MYZCY", P_NASSL = "C_NASSL", P_NBCLN = "C_NBCLN", P_NBCLR = "C_NBCLR", P_NCNRB = "C_NCNRB", P_NDBCL = "C_NDBCL", P_NRLLA = "C_NDBCLR", P_NMMLC = "C_NMMLC", F_NMTPH = "C_NMTPH", P_NNNLL = "C_NNNLL", P_NODSR = "C_NODSR", P_NONIN = "C_NONIN", P_NOURI = "C_NOURI", P_OCLNA = "C_OCLNA", P_OGLNA = "C_OGLNA", P_OPHTH = "C_OLMDM", F_OLPDP = "C_OLPDP", P_ONYCH = "C_OMPSS", P_OOLIN = "C_OOLIN", P_OPRCL = "C_OPRCL", P_ORBLN = "C_ORBLN", F_ORCAD = "C_ORCAD", P_ORDRS = "C_ORDRS", P_OPHRY = "C_ORYDM", P_OSNGL = "C_OSNGL", P_OXYTR = "C_OXYTR", P_PARRN = "C_PARRN", P_PATRS = "C_PATRS", P_PAVNN = "C_PAVNN", P_PTYCH = "C_PCYLS", P_PDPHR = "C_PDPHR", P_PELSN = "C_PELSN", F_PHGMY = "C_PHGMY", F_PSDSP = "C_PHRTA", P_PHRYG = "C_PHRYG", P_PHYSL = "C_PHYSL", F_PHYTP = "C_PHYTP", P_PLACS = "C_PLACS", P_PLCPS = "C_PLCPS", P_PLCPSL = "C_PLCPSL", P_PLCTN = "C_PLCTN", P_PLGPH = "C_PLGPH", B_PLGTH = "C_PLGTH", P_PLMRN = "C_PLMRN", P_PLNCT = "C_PLNCT", P_PLNDSC = "C_PLNDSC", P_PLNGY = "C_PLNGY", P_PLNRBL = "C_PLNLLA", P_PLNLN = "C_PLNLN", P_PLNLR = "C_PLNLR", P_PLNRB = "C_PLNRB", P_PLNSP = "C_PLNSPR", P_PLRNM = "C_PLRNM", P_PLRST = "C_PLRST", P_PLRTR = "C_PLRTR", F_PLSMD = "C_PLSMD", P_PLTYC = "C_PLTYC", P_PSDBL = "C_PLVNA", P_PLYMR = "C_PLYMR", P_PLTYN = "C_PNMTM", P_PNRPL = "C_PNRPL", F_PNTSM = "C_PNTSM", P_PRCNT = "C_PRCNT", P_PRFSS = "C_PRFSS", P_PRMCM = "C_PRMCUM", F_PRNSP = "C_PRNSP", P_PRPND = "C_PRPND", P_PRPYX = "C_PRPYX", P_PRRDN = "C_PRRDN", P_PSDDF = "C_PSDDF", P_PSDMC = "C_PSDMC", P_PSDND = "C_PSDND", P_PSDNN = "C_PSDNN", P_PSDPL = "C_PSDPLY", P_PSMMS = "C_PSMMS", P_PTLLN = "C_PTLLN", P_PTLLND = "C_PTLLND", F_PTRSN = "C_PTRSN", P_PULLN = "C_PULLN", P_PUTLN = "C_PUTLN", P_PRTTR = "C_PYMNA", P_PYRGL = "C_PYRGL", P_PYRGO = "C_PYRGO", P_PYRLN = "C_PYRLN", F_PYTHM = "C_PYTHIM", F_PYTHL = "C_PYTHL", P_PYXCL = "C_PYXCL", P_QNQLC = "C_QNQLC", P_RAMLN = "C_RAMLN", P_RBRTN = "C_RBRTN", P_RCRVD = "C_RCRVD", P_RCTBL = "C_RCTBL", P_RCTCB = "C_RCTCB", P_RCTGL = "C_RCTGL", P_RCTVG = "C_RCTVG", P_RDGDR = "C_RDGDR", P_REMNC = "C_REMNC", P_REPHX = "C_REPHX", P_RHBDM = "C_RHBDMM", F_RHBDS = "C_RHBDSP", P_RHPDD = "C_RHPDD", F_RHPDM = "C_RHPDM", F_RHZDMY = "C_RHZDM", P_RHZMM = "C_RHZMM", P_RIVRN = "C_RIVRN", P_ROSLN = "C_ROSLN", P_ROTAL = "C_ROTAL", P_RPHDP = "C_RPHDP", P_RPRTN = "C_RPRTN", P_RSSLL = "C_RSSLL", P_RTLMM = "C_RTLMM", P_RTYLA = "C_RTYLA", P_RUGID = "C_RUGID", F_RZLLP = "C_RZLLP", P_SAGRN = "C_SAGRN", P_SCCMM = "C_SCCMM", P_SCCRH = "C_SCCRH", P_SCHLM = "C_SCHLM", F_SCLRS = "C_SCLRS", P_SCTLR = "C_SCTLR", P_SEBRK = "C_SEBRK", P_SGMLN = "C_SGMLN", P_SGMLP = "C_SGMLP", P_SGMMR = "C_SGMMR", P_SGMVR = "C_SGMVR", F_SMMRS = "C_SMMRS", P_SNNDS = "C_SNNDS", P_SORTS = "C_SORTS", P_SPHGN = "C_SPHGN", P_SPHNN = "C_SPHNN", P_SNLLA = "C_SPHNNL", P_SPHTR = "C_SPHTR", P_SPHTX = "C_SPHTX", P_SPHVG = "C_SPHVG", P_SPRDT = "C_SPRDT", P_SPRLC = "C_SPRLC", F_SPRLG = "C_SPRLG", P_SPRLL = "C_SPRLL", F_SPRMY = "C_SPRMY", P_SPRPL = "C_SPRPL", P_SPRSG = "C_SPRSG", P_SPRST = "C_SPRST", P_SPHNP = "C_SPRTA", P_SPRZN = "C_SPRZN", P_SPHRG = "C_SPSNA", P_STHDM = "C_SPTHD", P_SRCNR = "C_SRCNR", F_SRLPD = "C_SRLPD", F_SPNGS = "C_SSPRA", F_STEIN = "C_STEIN", P_SPTHD = "C_STHDDS", P_STHRP = "C_STHRP", P_STNFR = "C_STNFR", P_STNSM = "C_STNSM", P_STNTR = "C_STNTR", P_STRBL = "C_STRBL", P_STRMB = "C_STRMB", P_STTSN = "C_STTSN", P_STYLN = "C_SYCHA", F_SCHZC = "C_SYTRM", P_TBNLL = "C_TBNLL", P_TRCHL = "C_TCHLS", P_TCHNT = "C_TCHNT", P_THRCL = "C_THRCL", P_THRMM = "C_THRMM", P_TIARN = "C_TIARN", P_TKPHR = "C_TKPHR", P_TLNMA = "C_TLNMA", P_TLYPM = "C_TLYPM", P_TMNDS = "C_TMNDS", P_TMNTA = "C_TMNTA", P_TNTNN = "C_TNNDM", P_TTNNS = "C_TNTNN", P_TNPSS = "C_TNTNNP", P_TONTN = "C_TONTN", P_TOSAI = "C_TOSAI", P_TPHTR = "C_TPHTR", P_TRCHH = "C_TRCHH", P_TRPHS = "C_TRCHLR", P_TMMNA = "C_TRCHM", P_TRCHS = "C_TRCHSP", P_TRFRN = "C_TRFRN", P_TRLCL = "C_TRLCL", P_TRTXL = "C_TRTXL", P_TRTXS = "C_TRTXS", P_TTRHY = "C_TTRHY", F_TTRMY = "C_TTRMY", P_TXTLR = "C_TXTLR", F_THRST = "C_TYTRM", P_URLPT = "C_ULPTS", P_UNGLT = "C_UNGLT", P_URCNT = "C_URCNT", P_URONM = "C_URONM", P_UROSM = "C_UROSM", P_URTRC = "C_URTRC", P_URSTY = "C_UTYLA", P_UVGRN = "C_UVGRN", P_VLVLN = "C_VALVLN", P_VGNLN = "C_VGNLN", P_VGNLNP = "C_VGNLNP", P_VLNRA = "C_VLVLN", P_VGNCL = "C_VNCLA", P_VRGLN = "C_VRGLN", P_VRGLNP = "C_VRGLNP", P_VRTCL = "C_VRTCL", P_WBBNL = "C_WBBNL", P_WEBBN = "C_WEBBN", P_WSNRL = "C_WSNRL", P_ZTHMN = "C_ZHMNM", B_ZOOGL = "C_ZOOGL", F_DDSCS = "F_DPDSC", F_SCCHR = "F_SMYCS", P_AMTRN = "P_ACNTH", F_AMBDM = "P_AMBDM", F_ARCYR = "P_ARCYR", F_BADHM = "P_BADHM", F_BDHMP = "P_BDHMP", F_BRBYL = "P_BRBYL", F_BRFLD = "P_BRFLD", F_CLMYX = "P_CLMYX", F_CLSTD = "P_CLSTD", F_CMTRC = "P_CMTRC", F_CRBRR = "P_CRBRR", F_CRTMY = "P_CRTMY", F_CRTRM = "P_CRTRM", F_DCTYD = "P_DCTYD", F_DDYMM = "P_DDYMM", F_DIACH = "P_DIACH", F_DIANM = "P_DIANM", F_DIDRM = "P_DIDRM", F_ELMYX = "P_ELMYX", F_ESTLM = "P_ESTLM", F_FULIG = "P_FULIG", F_HMTRC = "P_HMTRC", F_LCRPS = "P_LCRPS", F_LICEA = "P_LICEA", F_LMPRD = "P_LMPRD", F_LPTDR = "P_LPTDR", F_LSTRL = "P_LSTRL", F_LYCGL = "P_LYCGL", F_MCBRD = "P_MCBRD", F_MNKTL = "P_MNKTL", F_MTTRC = "P_MTTRC", F_MUCLG = "P_MUCLG", F_PHYSR = "P_PHYSR", F_PRCHN = "P_PRCHN", F_PRMBD = "P_PRMBD", F_PRTPH = "P_PRTPH", F_PSRNA = "P_PSRNA", F_PYSRM = "P_PYSRM", F_RTCLR = "P_RTCLR", F_STMNT = "P_STMNT", F_SYMPH = "P_SYMPH", F_TRBRK = "P_TRBRK", F_TRICH = "P_TRICH", F_TUBFR = "P_TUBFR") assign(x = "mo_codes_v0.5.0", value = mo_codes_v0.5.0, diff --git a/_pkgdown.yml b/_pkgdown.yml index f701779f..fad292db 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -156,7 +156,6 @@ reference: - '`like`' - '`ab_property`' - authors: Matthijs S. Berends: href: https://www.rug.nl/staff/m.s.berends/ diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 96360d80..17046f02 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -192,7 +192,7 @@

How to conduct AMR analysis

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

@@ -201,7 +201,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 20 February 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 21 February 2019.

Introduction

@@ -217,21 +217,21 @@ -2019-02-20 +2019-02-21 abcd Escherichia coli S S -2019-02-20 +2019-02-21 abcd Escherichia coli S R -2019-02-20 +2019-02-21 efgh Escherichia coli R @@ -327,67 +327,67 @@ -2010-03-15 -U2 +2012-08-08 +P2 Hospital B Streptococcus pneumoniae S S -R +S S F -2010-08-09 -Q7 -Hospital B +2011-03-05 +D8 +Hospital A +Escherichia coli +S +S +S +S +M + + +2012-04-03 +D4 +Hospital C Staphylococcus aureus R S +R S -S -F +M - -2012-03-04 -P2 + +2012-10-25 +I1 Hospital B Klebsiella pneumoniae S S S S -F - - -2013-10-19 -K5 -Hospital C -Staphylococcus aureus -R -S -S -S M -2017-10-05 -I7 -Hospital D -Staphylococcus aureus +2017-04-18 +X3 +Hospital B +Streptococcus pneumoniae +S +I +S R -S -S -S -M +F -2017-09-27 -H7 -Hospital C -Staphylococcus aureus -S +2013-03-18 +C4 +Hospital A +Streptococcus pneumoniae S +I S S M @@ -411,8 +411,8 @@ #> #> Item Count Percent Cum. Count Cum. Percent #> --- ----- ------- -------- ----------- ------------- -#> 1 M 10,384 51.9% 10,384 51.9% -#> 2 F 9,616 48.1% 20,000 100.0% +#> 1 M 10,458 52.3% 10,458 52.3% +#> 2 F 9,542 47.7% 20,000 100.0%

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:

data <- data %>%
@@ -443,10 +443,10 @@
 #> Kingella kingae (no changes)
 #> 
 #> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
-#> Table 1:  Intrinsic resistance in Enterobacteriaceae (1261 changes)
+#> Table 1:  Intrinsic resistance in Enterobacteriaceae (1342 changes)
 #> Table 2:  Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)
 #> Table 3:  Intrinsic resistance in other Gram-negative bacteria (no changes)
-#> Table 4:  Intrinsic resistance in Gram-positive bacteria (2655 changes)
+#> Table 4:  Intrinsic resistance in Gram-positive bacteria (2761 changes)
 #> Table 8:  Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)
 #> Table 9:  Interpretive rules for B-lactam agents and Gram-negative rods (no changes)
 #> Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)
@@ -462,9 +462,9 @@
 #> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)
 #> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)
 #> 
-#> => EUCAST rules affected 7,230 out of 20,000 rows
+#> => EUCAST rules affected 7,471 out of 20,000 rows
 #>    -> added 0 test results
-#>    -> changed 3,916 test results (0 to S; 0 to I; 3,916 to R)
+#> -> changed 4,103 test results (0 to S; 0 to I; 4,103 to R)

@@ -489,7 +489,7 @@ #> NOTE: Using column `bacteria` as input for `col_mo`. #> NOTE: Using column `date` as input for `col_date`. #> NOTE: Using column `patient_id` as input for `col_patient_id`. -#> => Found 5,689 first isolates (28.4% of total)

+#> => Found 5,674 first isolates (28.4% of total)

So only 28.4% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

data_1st <- data %>% 
   filter(first == TRUE)
@@ -516,8 +516,8 @@ 1 -2010-01-09 -V4 +2010-01-23 +A4 B_ESCHR_COL S S @@ -527,8 +527,8 @@ 2 -2010-04-24 -V4 +2010-03-13 +A4 B_ESCHR_COL S S @@ -538,32 +538,32 @@ 3 -2010-05-30 -V4 +2010-04-19 +A4 B_ESCHR_COL S -R +S S S FALSE 4 -2010-06-10 -V4 +2010-06-11 +A4 B_ESCHR_COL +S +S R S -S -S FALSE 5 -2010-06-17 -V4 +2010-07-04 +A4 B_ESCHR_COL -S +R S S S @@ -571,8 +571,8 @@ 6 -2010-07-30 -V4 +2010-07-05 +A4 B_ESCHR_COL S S @@ -582,47 +582,47 @@ 7 -2010-09-20 -V4 +2011-03-21 +A4 B_ESCHR_COL +S +S R S -S -S -FALSE +TRUE 8 -2010-10-21 -V4 +2011-04-02 +A4 B_ESCHR_COL R S -S +R S FALSE 9 -2010-11-06 -V4 +2011-04-05 +A4 B_ESCHR_COL +S +S +S R -S -S -S FALSE 10 -2011-05-21 -V4 +2011-04-13 +A4 B_ESCHR_COL -R S S S -TRUE +S +FALSE @@ -637,7 +637,7 @@ #> NOTE: Using column `patient_id` as input for `col_patient_id`. #> NOTE: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this. #> [Criterion] Inclusion based on key antibiotics, ignoring I. -#> => Found 15,871 first weighted isolates (79.4% of total) +#> => Found 15,801 first weighted isolates (79.0% of total) @@ -654,8 +654,8 @@ - - + + @@ -666,8 +666,8 @@ - - + + @@ -678,34 +678,34 @@ - - + + - + - + - - + + + + - - - - + + - + @@ -714,71 +714,71 @@ - - + + - + - - + + + + - - - + - - + + - + - + - - + + + + + - - - - + - - + + - - + +
isolate
12010-01-09V42010-01-23A4 B_ESCHR_COL S S
22010-04-24V42010-03-13A4 B_ESCHR_COL S S
32010-05-30V42010-04-19A4 B_ESCHR_COL SRS S S FALSETRUEFALSE
42010-06-10V42010-06-11A4 B_ESCHR_COLSS R SSS FALSE TRUE
52010-06-17V42010-07-04A4 B_ESCHR_COLSR S S S
62010-07-30V42010-07-05A4 B_ESCHR_COL S S S S FALSEFALSETRUE
72010-09-20V42011-03-21A4 B_ESCHR_COLSS R SSSFALSETRUE TRUE
82010-10-21V42011-04-02A4 B_ESCHR_COL R SSR S FALSEFALSETRUE
92010-11-06V42011-04-05A4 B_ESCHR_COLSSS RSSSFALSE FALSETRUE
102011-05-21V42011-04-13A4 B_ESCHR_COLR S S STRUESFALSE TRUE
-

Instead of 2, now 6 isolates are flagged. In total, 79.4% of all isolates are marked ‘first weighted’ - 50.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 2, now 8 isolates are flagged. In total, 79% of all isolates are marked ‘first weighted’ - 50.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.

As with filter_first_isolate(), there’s a shortcut for this new algorithm too:

data_1st <- data %>% 
   filter_first_weighted_isolate()
-

So we end up with 15,871 isolates for analysis.

+

So we end up with 15,801 isolates for analysis.

We can remove unneeded columns:

data_1st <- data_1st %>% 
   select(-c(first, keyab))
@@ -786,7 +786,6 @@
head(data_1st)
- @@ -803,14 +802,13 @@ - - - + + - + @@ -819,74 +817,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -898,6 +831,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
date patient_id hospital
12010-03-15U22012-08-08P2 Hospital B B_STRPT_PNE S SRS R F Gram positiveTRUE
22010-08-09Q7Hospital BB_STPHY_AURRSSSFGram positiveStaphylococcusaureusTRUE
42013-10-19K5Hospital CB_STPHY_AURRSSSMGram positiveStaphylococcusaureusTRUE
52017-10-05I7Hospital DB_STPHY_AURRSSSMGram positiveStaphylococcusaureusTRUE
62017-09-27H7Hospital CB_STPHY_AURSSSSMGram positiveStaphylococcusaureusTRUE
72016-09-06L9Hospital B2011-03-05D8Hospital A B_ESCHR_COL S Scoli TRUE
2012-04-03D4Hospital CB_STPHY_AURRSRSMGram positiveStaphylococcusaureusTRUE
2012-10-25I1Hospital BB_KLBSL_PNERSSSMGram negativeKlebsiellapneumoniaeTRUE
2017-04-18X3Hospital BB_STRPT_PNESISRFGram positiveStreptococcuspneumoniaeTRUE
2013-03-18C4Hospital AB_STRPT_PNESISRMGram positiveStreptococcuspneumoniaeTRUE

Time for the analysis!

@@ -915,9 +908,9 @@
freq(paste(data_1st$genus, data_1st$species))

Or can be used like the dplyr way, which is easier readable:

data_1st %>% freq(genus, species)
-

Frequency table of genus and species from a data.frame (15,871 x 13)

+

Frequency table of genus and species from a data.frame (15,801 x 13)

Columns: 2
-Length: 15,871 (of which NA: 0 = 0.00%)
+Length: 15,801 (of which NA: 0 = 0.00%)
Unique: 4

Shortest: 16
Longest: 24

@@ -934,33 +927,33 @@ Longest: 24

1 Escherichia coli -7,903 -49.8% -7,903 -49.8% +7,850 +49.7% +7,850 +49.7% 2 Staphylococcus aureus -3,987 -25.1% -11,890 -74.9% +3,918 +24.8% +11,768 +74.5% 3 Streptococcus pneumoniae -2,426 -15.3% -14,316 -90.2% +2,446 +15.5% +14,214 +90.0% 4 Klebsiella pneumoniae -1,555 -9.8% -15,871 +1,587 +10.0% +15,801 100.0% @@ -971,7 +964,7 @@ Longest: 24

Resistance percentages

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:

data_1st %>% portion_IR(amox)
-#> [1] 0.4737572
+#> [1] 0.4747801

Or can be used in conjuction with group_by() and summarise(), both from the dplyr package:

data_1st %>% 
   group_by(hospital) %>% 
@@ -984,19 +977,19 @@ Longest: 24

Hospital A -0.4684758 +0.4696939 Hospital B -0.4675514 +0.4782930 Hospital C -0.4904459 +0.4683438 Hospital D -0.4804110 +0.4815051 @@ -1014,23 +1007,23 @@ Longest: 24

Hospital A -0.4684758 -4901 +0.4696939 +4867 Hospital B -0.4675514 -5501 +0.4782930 +5413 Hospital C -0.4904459 -2355 +0.4683438 +2385 Hospital D -0.4804110 -3114 +0.4815051 +3136 @@ -1050,27 +1043,27 @@ Longest: 24

Escherichia -0.7295964 -0.8977603 -0.9743136 +0.7278981 +0.8996178 +0.9742675 Klebsiella -0.7299035 -0.8958199 -0.9774920 +0.7303088 +0.9004411 +0.9716446 Staphylococcus -0.7281164 -0.9260095 -0.9806872 +0.7304747 +0.9157734 +0.9757529 Streptococcus -0.7353669 +0.7485691 0.0000000 -0.7353669 +0.7485691 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 b139b98b..e304aff8 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 0632ad86..026008e8 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 0981abde..26b9ee11 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 c6eeabef..abb13738 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 8eabbc3a..1ac9719f 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -192,7 +192,7 @@

How to apply EUCAST rules

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/G_test.html b/docs/articles/G_test.html index 304f848b..7298828d 100644 --- a/docs/articles/G_test.html +++ b/docs/articles/G_test.html @@ -192,7 +192,7 @@

How to use the G-test

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/SPSS.html b/docs/articles/SPSS.html index 7d8a8546..09c41dc6 100644 --- a/docs/articles/SPSS.html +++ b/docs/articles/SPSS.html @@ -204,7 +204,7 @@

SPSS / SAS / Stata

-

SPSS (Statistical Package for the Social Sciences) is probably the most well-known software package for statistical analysis. SPSS is easier to learn than R, because in SPSS you only have to click a menu to run parts of your analysis. Because of its user-friendlyness, it is taught at universities and particularly useful for students who are new to statistics. From my experience, I would guess that pretty much all (bio)medical students know it at the time they graduate. SAS and Stata are statistical packages popular in big industries.

+

SPSS (Statistical Package for the Social Sciences) is probably the most well-known software package for statistical analysis. SPSS is easier to learn than R, because in SPSS you only have to click a menu to run parts of your analysis. Because of its user-friendliness, it is taught at universities and particularly useful for students who are new to statistics. From my experience, I would guess that pretty much all (bio)medical students know it at the time they graduate. SAS and Stata are comparable statistical packages popular in big industries.

diff --git a/docs/articles/WHONET.html b/docs/articles/WHONET.html index 52633355..eb202bad 100644 --- a/docs/articles/WHONET.html +++ b/docs/articles/WHONET.html @@ -192,7 +192,7 @@

How to work with WHONET data

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/atc_property.html b/docs/articles/atc_property.html index f9bcbfe3..61e7491b 100644 --- a/docs/articles/atc_property.html +++ b/docs/articles/atc_property.html @@ -192,7 +192,7 @@

How to get properties of an antibiotic

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index 5878fed4..63ca9bff 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -192,7 +192,7 @@

Benchmarks

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

@@ -201,7 +201,7 @@ -

One of the most important features of this package is the complete microbial taxonomic database, supplied by the Catalogue of Life (http://catalogueoflife.org). We created a function as.mo() that transforms any user input value to a valid microbial ID by using AI (Artificial Intelligence) combined with the taxonomic tree of Catalogue of Life.

+

One of the most important features of this package is the complete microbial taxonomic database, supplied by the Catalogue of Life. We created a function as.mo() that transforms any user input value to a valid microbial ID by using AI (Artificial Intelligence) combined with the taxonomic tree of Catalogue of Life.

Using the microbenchmark package, we can review the calculation performance of this function. Its function microbenchmark() runs different input expressions independently of each other and measures their time-to-result.

library(microbenchmark)
 library(AMR)
@@ -216,27 +216,18 @@ as.mo("Staphylococcus aureus"), as.mo("B_STPHY_AUR"), times = 10) -print(S.aureus, unit = "ms", signif = 3) +print(S.aureus, unit = "ms", signif = 2) #> Unit: milliseconds -#> expr min lq mean median uq max -#> as.mo("sau") 42.300 42.500 47.00 43.100 43.200 82.000 -#> as.mo("stau") 75.900 76.100 82.70 76.700 77.900 125.000 -#> as.mo("staaur") 42.400 43.300 53.60 44.600 49.000 98.200 -#> as.mo("S. aureus") 18.400 18.600 20.60 18.700 19.200 34.100 -#> as.mo("S. aureus") 18.400 18.500 18.80 18.600 19.200 19.600 -#> as.mo("STAAUR") 42.300 42.700 43.30 43.000 43.800 45.700 -#> as.mo("Staphylococcus aureus") 11.400 11.500 11.80 11.600 11.800 13.400 -#> as.mo("B_STPHY_AUR") 0.261 0.418 0.44 0.434 0.493 0.542 -#> neval -#> 10 -#> 10 -#> 10 -#> 10 -#> 10 -#> 10 -#> 10 -#> 10
-

In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of as.mo("B_STPHY_AUR"), the input is already a valid MO code, so it only almost takes no time at all (261 millionths of seconds).

+#> expr min lq mean median uq max neval +#> as.mo("sau") 42.00 43.00 47.00 43.00 44.0 81.00 10 +#> as.mo("stau") 86.00 87.00 93.00 88.00 89.0 130.00 10 +#> as.mo("staaur") 43.00 43.00 45.00 43.00 43.0 64.00 10 +#> as.mo("S. aureus") 23.00 23.00 27.00 23.00 24.0 60.00 10 +#> as.mo("S. aureus") 23.00 23.00 29.00 24.00 24.0 73.00 10 +#> as.mo("STAAUR") 43.00 43.00 43.00 43.00 44.0 46.00 10 +#> as.mo("Staphylococcus aureus") 14.00 15.00 19.00 15.00 16.0 53.00 10 +#> as.mo("B_STPHY_AUR") 0.34 0.42 0.47 0.49 0.5 0.58 10 +

In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of as.mo("B_STPHY_AUR"), the input is already a valid MO code, so it only almost takes no time at all (494 millionths of a second).

To achieve this speed, the as.mo function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of Mycoplasma leonicaptivi (B_MYCPL_LEO), a bug probably never found before in humans:

M.leonicaptivi <- microbenchmark(as.mo("myle"),
                                  as.mo("mycleo"),
@@ -246,25 +237,25 @@
                                  as.mo("Mycoplasma leonicaptivi"),
                                  as.mo("B_MYCPL_LEO"),
                                  times = 10)
-print(M.leonicaptivi, unit = "ms", signif = 4)
+print(M.leonicaptivi, unit = "ms", signif = 2)
 #> Unit: milliseconds
-#>                              expr      min       lq     mean   median
-#>                     as.mo("myle") 111.9000 112.1000 121.9000 112.4000
-#>                   as.mo("mycleo") 381.6000 381.9000 397.9000 384.7000
-#>          as.mo("M. leonicaptivi") 202.9000 203.8000 205.5000 204.1000
-#>         as.mo("M.  leonicaptivi") 203.1000 203.3000 208.7000 203.8000
-#>                   as.mo("MYCLEO") 381.5000 381.7000 388.1000 381.9000
-#>  as.mo("Mycoplasma leonicaptivi") 103.0000 103.1000 103.6000 103.3000
-#>              as.mo("B_MYCPL_LEO")   0.3021   0.5631   0.5459   0.5664
-#>        uq      max neval
-#>  113.5000 169.7000    10
-#>  420.5000 420.7000    10
-#>  206.1000 215.4000    10
-#>  204.6000 249.4000    10
-#>  386.0000 433.7000    10
-#>  103.8000 105.4000    10
-#>    0.5712   0.6199    10
-

That takes 5.9 times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance:

+#> expr min lq mean median uq max +#> as.mo("myle") 140.00 140.00 150.0 140.00 140.00 180.00 +#> as.mo("mycleo") 470.00 480.00 500.0 510.00 520.00 560.00 +#> as.mo("M. leonicaptivi") 240.00 240.00 250.0 240.00 280.00 290.00 +#> as.mo("M. leonicaptivi") 240.00 240.00 250.0 240.00 280.00 280.00 +#> as.mo("MYCLEO") 470.00 510.00 510.0 520.00 520.00 540.00 +#> as.mo("Mycoplasma leonicaptivi") 150.00 150.00 170.0 180.00 190.00 200.00 +#> as.mo("B_MYCPL_LEO") 0.32 0.58 0.6 0.59 0.61 0.97 +#> neval +#> 10 +#> 10 +#> 10 +#> 10 +#> 10 +#> 10 +#> 10 +

That takes 6.9 times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance:

par(mar = c(5, 16, 4, 2)) # set more space for left margin text (16)
 
 # highest value on y axis
@@ -272,10 +263,10 @@
 
 boxplot(S.aureus, horizontal = TRUE, las = 1, unit = "ms", log = FALSE, xlab = "", ylim = c(0, max_y_axis),
         main = expression(paste("Benchmark of ", italic("Staphylococcus aureus"))))
-

+

boxplot(M.leonicaptivi, horizontal = TRUE, las = 1, unit = "ms", log = FALSE, xlab = "", ylim = c(0, max_y_axis),
         main = expression(paste("Benchmark of ", italic("Mycoplasma leonicaptivi"))))
-

+

To relieve this pitfall and further improve performance, two important calculations take almost no time at all: repetitive results and already precalculated results.

@@ -301,8 +292,8 @@ print(run_it, unit = "ms", signif = 3) #> Unit: milliseconds #> expr min lq mean median uq max neval -#> mo_fullname(x) 438 448 467 470 476 500 10

-

So transforming 500,000 values (!) of 95 unique values only takes 0.47 seconds (469 ms). You only lose time on your unique input values.

+#> mo_fullname(x) 445 466 497 491 536 543 10 +

So transforming 500,000 values (!) of 95 unique values only takes 0.49 seconds (490 ms). You only lose time on your unique input values.

@@ -314,10 +305,10 @@ times = 10) print(run_it, unit = "ms", signif = 3) #> Unit: milliseconds -#> expr min lq mean median uq max neval -#> A 38.500 38.600 38.700 38.700 38.900 39.100 10 -#> B 19.400 19.500 20.900 19.800 20.100 31.200 10 -#> C 0.256 0.293 0.389 0.395 0.473 0.507 10

+#> expr min lq mean median uq max neval +#> A 38.70 39.100 40.200 40.000 40.100 45.300 10 +#> B 24.50 24.600 24.800 24.700 24.700 25.500 10 +#> C 0.26 0.392 0.434 0.447 0.516 0.561 10

So going from mo_fullname("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0004 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

run_it <- microbenchmark(A = mo_species("aureus"),
                          B = mo_genus("Staphylococcus"),
@@ -331,14 +322,14 @@
 print(run_it, unit = "ms", signif = 3)
 #> Unit: milliseconds
 #>  expr   min    lq  mean median    uq   max neval
-#>     A 0.277 0.328 0.410  0.450 0.467 0.483    10
-#>     B 0.291 0.307 0.363  0.374 0.390 0.467    10
-#>     C 0.299 0.336 0.400  0.400 0.485 0.498    10
-#>     D 0.271 0.288 0.319  0.328 0.346 0.371    10
-#>     E 0.202 0.263 0.288  0.270 0.304 0.405    10
-#>     F 0.241 0.255 0.296  0.283 0.350 0.362    10
-#>     G 0.260 0.264 0.303  0.281 0.312 0.425    10
-#>     H 0.240 0.256 0.310  0.327 0.346 0.378    10
+#> A 0.297 0.329 0.400 0.416 0.453 0.459 10 +#> B 0.277 0.304 0.349 0.363 0.382 0.407 10 +#> C 0.281 0.430 0.436 0.440 0.471 0.493 10 +#> D 0.249 0.277 0.310 0.316 0.337 0.347 10 +#> E 0.214 0.252 0.300 0.306 0.338 0.403 10 +#> F 0.237 0.270 0.300 0.311 0.326 0.335 10 +#> G 0.245 0.282 0.297 0.298 0.314 0.348 10 +#> H 0.241 0.282 0.308 0.312 0.328 0.373 10

Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.

@@ -365,13 +356,13 @@ print(run_it, unit = "ms", signif = 4) #> Unit: milliseconds #> expr min lq mean median uq max neval -#> en 11.01 11.04 11.05 11.06 11.07 11.08 10 -#> de 19.31 19.51 19.79 19.61 19.91 21.00 10 -#> nl 19.13 19.37 26.23 19.59 21.11 52.30 10 -#> es 19.13 19.42 19.51 19.53 19.58 20.00 10 -#> it 19.16 19.34 29.12 19.55 51.61 52.06 10 -#> fr 19.01 19.54 19.84 19.69 20.41 20.46 10 -#> pt 19.00 19.33 19.44 19.49 19.59 19.67 10
+#> en 10.85 10.89 11.10 11.03 11.23 11.83 10 +#> de 19.43 19.50 19.86 19.58 20.35 20.99 10 +#> nl 19.08 19.17 19.40 19.48 19.56 19.63 10 +#> es 19.35 19.44 26.07 19.48 20.06 52.36 10 +#> it 19.23 19.40 22.91 19.49 19.91 52.92 10 +#> fr 19.10 19.22 19.40 19.45 19.54 19.68 10 +#> pt 19.01 19.46 29.32 19.55 52.32 52.50 10

Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.

diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png new file mode 100644 index 00000000..c65eb537 Binary files /dev/null and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-2.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-2.png new file mode 100644 index 00000000..63634790 Binary files /dev/null and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-2.png differ diff --git a/docs/articles/freq.html b/docs/articles/freq.html index f605df37..6ed32991 100644 --- a/docs/articles/freq.html +++ b/docs/articles/freq.html @@ -192,7 +192,7 @@

How to create frequency tables

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/mo_property.html b/docs/articles/mo_property.html index 8f5fb8cb..060e5ade 100644 --- a/docs/articles/mo_property.html +++ b/docs/articles/mo_property.html @@ -192,7 +192,7 @@

How to get properties of a microorganism

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index 5afd65c2..c551ac81 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -192,7 +192,7 @@

How to predict antimicrobial resistance

Matthijs S. Berends

-

20 February 2019

+

21 February 2019

diff --git a/docs/index.html b/docs/index.html index db24ab8f..a59d6d19 100644 --- a/docs/index.html +++ b/docs/index.html @@ -211,7 +211,7 @@
  • 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
  • -
  • Applying EUCAST rules
  • +
  • Applying EUCAST expert rules (not the translation from MIC to RSI values)
  • Determining multi-drug resistant organisms (MDRO)
  • Descriptive statistics: frequency tables, kurtosis and skewness
  • @@ -321,7 +321,7 @@
  • It enhances existing data and adds new data from data sets included in this package.

    diff --git a/docs/reference/atc_property.html b/docs/reference/atc_property.html index cf774c22..40034769 100644 --- a/docs/reference/atc_property.html +++ b/docs/reference/atc_property.html @@ -279,8 +279,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 27692c60..affa0a25 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -256,6 +256,11 @@

    data.frame with column names of tbl as row names and columns: percent_IR, count, percent, visual_availability.

    +

    Read more on our website!

    + + +

    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.

    +

    Examples

    # NOT RUN {
    @@ -280,6 +285,8 @@
           
  • Arguments
  • Value
  • + +
  • Read more on our website!
  • Examples
  • diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 2a0455ad..f29870a8 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -260,8 +260,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 526df903..b9589576 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -258,6 +258,11 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    The Catalogue of Life (http://www.catalogueoflife.org) is the most comprehensive and authoritative global index of species currently available. It holds essential information on the names, relationships and distributions of over 1.6 million species. The Catalogue of Life is used to support the major biodiversity and conservation information services such as the Global Biodiversity Information Facility (GBIF), Encyclopedia of Life (EoL) and the International Union for Conservation of Nature Red List. It is recognised by the Convention on Biological Diversity as a significant component of the Global Taxonomy Initiative and a contribution to Target 1 of the Global Strategy for Plant Conservation.

    The syntax used to transform the original data to a cleansed R format, can be found here: https://gitlab.com/msberends/AMR/blob/master/reproduction_of_microorganisms.R.

    +

    Read more on our website!

    + + +

    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.

    +

    See also

    @@ -270,6 +275,8 @@ This package contains the complete taxonomic tree of almost all microorganisms f
  • Catalogue of Life
  • +
  • Read more on our website!
  • +
  • See also
  • diff --git a/docs/reference/count.html b/docs/reference/count.html index 914666f7..7e6895d6 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -302,8 +302,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 00699728..0018acc8 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -400,8 +400,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 1d8c76ee..462f6069 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -366,8 +366,7 @@ To conduct an analysis of antimicrobial resistance, you should only include the

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/freq.html b/docs/reference/freq.html index 8ec16413..7c2c4748 100644 --- a/docs/reference/freq.html +++ b/docs/reference/freq.html @@ -380,8 +380,7 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index a599f7f5..f57baf1b 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -337,8 +337,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    References

    diff --git a/docs/reference/get_locale.html b/docs/reference/get_locale.html index 722d2934..7baea359 100644 --- a/docs/reference/get_locale.html +++ b/docs/reference/get_locale.html @@ -255,8 +255,7 @@

    Read more on our website!

    -


    -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.

    +

    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/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 9b5f418f..fce27feb 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -338,8 +338,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 834611b5..8fa8e4a6 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -263,8 +263,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/join.html b/docs/reference/join.html index 7759b805..2a864423 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -281,8 +281,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index e1a67f1f..858be017 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -333,8 +333,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 200d8ae2..3aa692ba 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -268,8 +268,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/like.html b/docs/reference/like.html index 4204a218..f6135b1f 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -281,8 +281,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 4788881b..89e04653 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -623,8 +623,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 9e5421c3..8f1d5e9e 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -268,8 +268,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index dd1ba4a0..fdfd2c82 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -292,8 +292,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 840e28b0..65fd7cf6 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -274,8 +274,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 0025ab0e..6bf3ae40 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -348,8 +348,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    @@ -433,7 +432,7 @@ On our website https://msberends.gitla language = "nl") # "Streptococcus groep A" -# Get a list with the complete taxonomy (subkingdom to subspecies) +# Get a list with the complete taxonomy (kingdom to subspecies) mo_taxonomy("E. coli") # }
    diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index ddab3618..af0ac9cc 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -264,8 +264,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    Examples

    diff --git a/docs/reference/p.symbol.html b/docs/reference/p.symbol.html index df30b5e0..4c2550f1 100644 --- a/docs/reference/p.symbol.html +++ b/docs/reference/p.symbol.html @@ -263,8 +263,7 @@

    Read more on our website!

    -


    -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.

    +

    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/portion.html b/docs/reference/portion.html index 392ddc38..25f4214b 100644 --- a/docs/reference/portion.html +++ b/docs/reference/portion.html @@ -325,8 +325,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/read.4D.html b/docs/reference/read.4D.html index d9be3749..5298404d 100644 --- a/docs/reference/read.4D.html +++ b/docs/reference/read.4D.html @@ -388,8 +388,7 @@

    Read more on our website!

    -


    -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.

    +

    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/resistance_predict.html b/docs/reference/resistance_predict.html index 03ab934b..3e2d62ee 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -348,8 +348,7 @@

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/docs/reference/septic_patients.html b/docs/reference/septic_patients.html index 4c05279b..e2c10581 100644 --- a/docs/reference/septic_patients.html +++ b/docs/reference/septic_patients.html @@ -261,8 +261,7 @@

    Read more on our website!

    -


    -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.

    +

    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 223d8b20..eb86b6e2 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -270,8 +270,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr

    Read more on our website!

    -


    -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.

    +

    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.

    See also

    diff --git a/index.md b/index.md index 6c51e461..f5a8bbc9 100644 --- a/index.md +++ b/index.md @@ -23,7 +23,7 @@ This package can be used for: * 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 - * Applying EUCAST rules + * Applying EUCAST expert rules (not the translation from MIC to RSI values) * Determining multi-drug resistant organisms (MDRO) * Descriptive statistics: frequency tables, kurtosis and skewness @@ -137,7 +137,7 @@ The `AMR` package basically does four important things: 2. It **enhances existing data** and **adds new data** from data sets included in this package. - * Use `eucast_rules()` to apply [EUCAST expert rules to isolates](http://www.eucast.org/expert_rules_and_intrinsic_resistance/). + * Use `eucast_rules()` to apply [EUCAST expert rules to isolates](http://www.eucast.org/expert_rules_and_intrinsic_resistance/) (not the translation from MIC to RSI values). * 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. diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd index 7b1d433b..5aa113d4 100644 --- a/man/AMR-deprecated.Rd +++ b/man/AMR-deprecated.Rd @@ -48,7 +48,6 @@ 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 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/AMR.Rd b/man/AMR.Rd index fefe4e95..21f07799 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/zzz.R +% Please edit documentation in R/amr.R \name{AMR} \alias{AMR} \title{The \code{AMR} Package} @@ -13,14 +13,16 @@ We created this package for both academic research and routine analysis at the F This package can be used for: \itemize{ + \item{Reference for microorganisms, since it contains almost all 60,000 microbial (sub)species from the Catalogue of Life} \item{Calculating antimicrobial resistance} - \item{Predicting antimicrobial resistance using regression models} + \item{Calculating empirical susceptibility of both mono therapy and combination therapy} + \item{Predicting future 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{Applying EUCAST expert rules (not the translation from MIC to RSI values)} + \item{Determining multi-drug resistant organisms (MDRO)} \item{Descriptive statistics: frequency tables, kurtosis and skewness} } } @@ -34,7 +36,6 @@ Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Gl \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}. } diff --git a/man/WHOCC.Rd b/man/WHOCC.Rd index 4be99fd9..8e4adc8f 100644 --- a/man/WHOCC.Rd +++ b/man/WHOCC.Rd @@ -18,7 +18,6 @@ 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 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/WHONET.Rd b/man/WHONET.Rd index fb4ca120..e3e9f1d7 100644 --- a/man/WHONET.Rd +++ b/man/WHONET.Rd @@ -41,7 +41,6 @@ This example data set has the exact same structure as an export file from WHONET } \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}. } diff --git a/man/abname.Rd b/man/abname.Rd index f2922eaa..5de0e51b 100644 --- a/man/abname.Rd +++ b/man/abname.Rd @@ -37,7 +37,6 @@ 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 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/age.Rd b/man/age.Rd index e2918fd3..14dd6d0c 100644 --- a/man/age.Rd +++ b/man/age.Rd @@ -19,7 +19,6 @@ 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 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/age_groups.Rd b/man/age_groups.Rd index 7497c0de..477df197 100644 --- a/man/age_groups.Rd +++ b/man/age_groups.Rd @@ -33,7 +33,6 @@ 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 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/antibiotics.Rd b/man/antibiotics.Rd index a41d4e70..ca42d689 100644 --- a/man/antibiotics.Rd +++ b/man/antibiotics.Rd @@ -51,7 +51,6 @@ 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 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/as.atc.Rd b/man/as.atc.Rd index 040c6451..4c260377 100644 --- a/man/as.atc.Rd +++ b/man/as.atc.Rd @@ -37,7 +37,6 @@ 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 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/as.mic.Rd b/man/as.mic.Rd index 39dc9680..d1f361e4 100755 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -22,7 +22,6 @@ 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 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/as.mo.Rd b/man/as.mo.Rd index 08896f4e..99e3005e 100644 --- a/man/as.mo.Rd +++ b/man/as.mo.Rd @@ -131,7 +131,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 0311e8c8..a3b7f536 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -28,7 +28,6 @@ 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 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/atc_online.Rd b/man/atc_online.Rd index 72c39d5d..cf8c8e3b 100644 --- a/man/atc_online.Rd +++ b/man/atc_online.Rd @@ -57,6 +57,11 @@ Abbreviations of return values when using \code{property = "U"} (unit): \item{\code{"ml"}}{ = milliliter (e.g. eyedrops)} } } +\section{Read more on our website!}{ + +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{ \donttest{ # oral DDD (Defined Daily Dose) of amoxicillin diff --git a/man/atc_property.Rd b/man/atc_property.Rd index 2dd7bd76..4f30e135 100755 --- a/man/atc_property.Rd +++ b/man/atc_property.Rd @@ -39,7 +39,6 @@ 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 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/availability.Rd b/man/availability.Rd index ac1b67ee..e6258aae 100644 --- a/man/availability.Rd +++ b/man/availability.Rd @@ -15,6 +15,11 @@ availability(tbl) \description{ Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. \code{\link{portion_IR}}. } +\section{Read more on our website!}{ + +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{ availability(septic_patients) diff --git a/man/catalogue_of_life.Rd b/man/catalogue_of_life.Rd index 44b46808..91b8fb96 100644 --- a/man/catalogue_of_life.Rd +++ b/man/catalogue_of_life.Rd @@ -27,7 +27,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } diff --git a/man/catalogue_of_life_version.Rd b/man/catalogue_of_life_version.Rd index 69291bc0..992798ed 100644 --- a/man/catalogue_of_life_version.Rd +++ b/man/catalogue_of_life_version.Rd @@ -28,6 +28,11 @@ The Catalogue of Life (\url{http://www.catalogueoflife.org}) is the most compreh The syntax used to transform the original data to a cleansed R format, can be found here: \url{https://gitlab.com/msberends/AMR/blob/master/reproduction_of_microorganisms.R}. } +\section{Read more on our website!}{ + +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{ \code{\link{microorganisms}} } diff --git a/man/count.Rd b/man/count.Rd index 85e9e0ce..3ab59c1b 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -60,7 +60,6 @@ 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 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/eucast_rules.Rd b/man/eucast_rules.Rd index e6c4bc34..4ed10b16 100644 --- a/man/eucast_rules.Rd +++ b/man/eucast_rules.Rd @@ -155,7 +155,6 @@ 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 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/first_isolate.Rd b/man/first_isolate.Rd index 1b0072e8..84cdbd4b 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -98,7 +98,6 @@ 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 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/freq.Rd b/man/freq.Rd index 1bb44253..fca5000c 100755 --- a/man/freq.Rd +++ b/man/freq.Rd @@ -109,7 +109,6 @@ 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 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/g.test.Rd b/man/g.test.Rd index 7fea4d71..ff51cfa3 100644 --- a/man/g.test.Rd +++ b/man/g.test.Rd @@ -102,7 +102,6 @@ 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 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/get_locale.Rd b/man/get_locale.Rd index cd93c2f9..3f943dee 100644 --- a/man/get_locale.Rd +++ b/man/get_locale.Rd @@ -19,7 +19,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 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 cb480b0f..709b2bc4 100644 --- a/man/ggplot_rsi.Rd +++ b/man/ggplot_rsi.Rd @@ -83,7 +83,6 @@ 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 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/guess_ab_col.Rd b/man/guess_ab_col.Rd index a4eb521f..831c67d3 100644 --- a/man/guess_ab_col.Rd +++ b/man/guess_ab_col.Rd @@ -18,7 +18,6 @@ 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 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/join.Rd b/man/join.Rd index 18fa8a6d..71cfc374 100755 --- a/man/join.Rd +++ b/man/join.Rd @@ -40,7 +40,6 @@ 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 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/key_antibiotics.Rd b/man/key_antibiotics.Rd index 4515cb26..f9584e64 100755 --- a/man/key_antibiotics.Rd +++ b/man/key_antibiotics.Rd @@ -76,7 +76,6 @@ 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 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/kurtosis.Rd b/man/kurtosis.Rd index dd657b44..0707380a 100644 --- a/man/kurtosis.Rd +++ b/man/kurtosis.Rd @@ -25,7 +25,6 @@ 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 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/like.Rd b/man/like.Rd index 08c17cbb..2f8a5d47 100755 --- a/man/like.Rd +++ b/man/like.Rd @@ -36,7 +36,6 @@ 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 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/mdro.Rd b/man/mdro.Rd index 48314bdc..69b0302f 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -257,7 +257,6 @@ 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 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/microorganisms.Rd b/man/microorganisms.Rd index f5c6a51e..223f2795 100755 --- a/man/microorganisms.Rd +++ b/man/microorganisms.Rd @@ -59,7 +59,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } diff --git a/man/microorganisms.codes.Rd b/man/microorganisms.codes.Rd index 74b8ae4f..ff79772b 100644 --- a/man/microorganisms.codes.Rd +++ b/man/microorganisms.codes.Rd @@ -36,7 +36,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } diff --git a/man/microorganisms.old.Rd b/man/microorganisms.old.Rd index 5fa39b5a..9901406d 100644 --- a/man/microorganisms.old.Rd +++ b/man/microorganisms.old.Rd @@ -41,7 +41,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } diff --git a/man/mo_property.Rd b/man/mo_property.Rd index 9d94efce..db0e42de 100644 --- a/man/mo_property.Rd +++ b/man/mo_property.Rd @@ -123,7 +123,6 @@ The syntax used to transform the original data to a cleansed R format, can be fo \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}. } @@ -203,7 +202,7 @@ mo_fullname("S. pyogenes", language = "nl") # "Streptococcus groep A" -# Get a list with the complete taxonomy (subkingdom to subspecies) +# Get a list with the complete taxonomy (kingdom to subspecies) mo_taxonomy("E. coli") } \seealso{ diff --git a/man/mo_source.Rd b/man/mo_source.Rd index 38c7324b..103bc7d2 100644 --- a/man/mo_source.Rd +++ b/man/mo_source.Rd @@ -27,7 +27,6 @@ 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 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/p.symbol.Rd b/man/p.symbol.Rd index e2beb2e2..0fdcf71c 100644 --- a/man/p.symbol.Rd +++ b/man/p.symbol.Rd @@ -19,7 +19,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 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 51a1bf90..1fbd5296 100644 --- a/man/portion.Rd +++ b/man/portion.Rd @@ -81,7 +81,6 @@ 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 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/read.4D.Rd b/man/read.4D.Rd index 456e297a..c2e0f183 100644 --- a/man/read.4D.Rd +++ b/man/read.4D.Rd @@ -124,7 +124,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 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 9459823f..dae9b797 100644 --- a/man/resistance_predict.Rd +++ b/man/resistance_predict.Rd @@ -82,7 +82,6 @@ Valid options for the statistical model are: } \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}. } diff --git a/man/septic_patients.Rd b/man/septic_patients.Rd index feb248a8..2f91f974 100755 --- a/man/septic_patients.Rd +++ b/man/septic_patients.Rd @@ -25,7 +25,6 @@ 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 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/skewness.Rd b/man/skewness.Rd index 509a5631..4fff5668 100644 --- a/man/skewness.Rd +++ b/man/skewness.Rd @@ -27,7 +27,6 @@ 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 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/tests/testthat/test-data.R b/tests/testthat/test-data.R index 53829a00..de9b2b7a 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -55,3 +55,8 @@ test_that("data sets are valid", { as.data.frame(stringsAsFactors = FALSE)) }) + +test_that("creation of data sets are valid", { + # run the code + .onLoad() +}) diff --git a/vignettes/SPSS.Rmd b/vignettes/SPSS.Rmd index 5eb2fa6a..01e1cd0a 100755 --- a/vignettes/SPSS.Rmd +++ b/vignettes/SPSS.Rmd @@ -24,7 +24,7 @@ Sys.setlocale(locale = "C") ## SPSS / SAS / Stata -SPSS (Statistical Package for the Social Sciences) is probably the most well-known software package for statistical analysis. SPSS is easier to learn than R, because in SPSS you only have to click a menu to run parts of your analysis. Because of its user-friendlyness, it is taught at universities and particularly useful for students who are new to statistics. From my experience, I would guess that pretty much all (bio)medical students know it at the time they graduate. SAS and Stata are statistical packages popular in big industries. +SPSS (Statistical Package for the Social Sciences) is probably the most well-known software package for statistical analysis. SPSS is easier to learn than R, because in SPSS you only have to click a menu to run parts of your analysis. Because of its user-friendliness, it is taught at universities and particularly useful for students who are new to statistics. From my experience, I would guess that pretty much all (bio)medical students know it at the time they graduate. SAS and Stata are comparable statistical packages popular in big industries. ## Compared to R diff --git a/vignettes/benchmarks.Rmd b/vignettes/benchmarks.Rmd index 2042eb9d..8dc398f8 100755 --- a/vignettes/benchmarks.Rmd +++ b/vignettes/benchmarks.Rmd @@ -23,10 +23,14 @@ knitr::opts_chunk$set( ) ``` -One of the most important features of this package is the complete microbial taxonomic database, supplied by the Catalogue of Life (http://catalogueoflife.org). We created a function `as.mo()` that transforms any user input value to a valid microbial ID by using AI (Artificial Intelligence) combined with the taxonomic tree of Catalogue of Life. +One of the most important features of this package is the complete microbial taxonomic database, supplied by the [Catalogue of Life](http://catalogueoflife.org). We created a function `as.mo()` that transforms any user input value to a valid microbial ID by using AI (Artificial Intelligence) combined with the taxonomic tree of Catalogue of Life. Using the `microbenchmark` package, we can review the calculation performance of this function. Its function `microbenchmark()` runs different input expressions independently of each other and measures their time-to-result. +```{r, message = FALSE, echo = FALSE} +library(dplyr) +``` + ```{r, message = FALSE} library(microbenchmark) library(AMR) @@ -46,10 +50,10 @@ S.aureus <- microbenchmark(as.mo("sau"), as.mo("Staphylococcus aureus"), as.mo("B_STPHY_AUR"), times = 10) -print(S.aureus, unit = "ms", signif = 3) +print(S.aureus, unit = "ms", signif = 2) ``` -In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of `as.mo("B_STPHY_AUR")`, the input is already a valid MO code, so it only almost takes no time at all (`r as.integer(min(S.aureus$time, na.rm = TRUE) / 1000)` millionths of seconds). +In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of `as.mo("B_STPHY_AUR")`, the input is already a valid MO code, so it only almost takes no time at all (`r as.integer(S.aureus %>% filter(expr == 'as.mo("B_STPHY_AUR")') %>% pull(time) %>% median(na.rm = TRUE) / 1000)` millionths of a second). To achieve this speed, the `as.mo` function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of *Mycoplasma leonicaptivi* (`B_MYCPL_LEO`), a bug probably never found before in humans: @@ -62,7 +66,7 @@ M.leonicaptivi <- microbenchmark(as.mo("myle"), as.mo("Mycoplasma leonicaptivi"), as.mo("B_MYCPL_LEO"), times = 10) -print(M.leonicaptivi, unit = "ms", signif = 4) +print(M.leonicaptivi, unit = "ms", signif = 2) ``` That takes `r round(mean(M.leonicaptivi$time, na.rm = TRUE) / mean(S.aureus$time, na.rm = TRUE), 1)` times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance: