Browse Source

(v1.3.0.9038) prefinal 1.4.0

main
parent
commit
baf510183c
  1. 4
      DESCRIPTION
  2. 4
      NEWS.md
  3. 5
      R/aa_helper_functions.R
  4. 62
      R/eucast_rules.R
  5. 1
      R/mdro.R
  6. 48
      R/mo.R
  7. 2
      R/mo_property.R
  8. 2
      R/mo_source.R
  9. 2
      docs/404.html
  10. 2
      docs/LICENSE-text.html
  11. 473
      docs/articles/AMR.html
  12. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  13. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  14. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  15. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  16. 11
      docs/articles/EUCAST.html
  17. 85
      docs/articles/MDR.html
  18. 18
      docs/articles/PCA.html
  19. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-5-1.png
  20. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-6-1.png
  21. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-7-1.png
  22. 6
      docs/articles/SPSS.html
  23. 4
      docs/articles/WHONET.html
  24. 122
      docs/articles/benchmarks.html
  25. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  26. 2
      docs/articles/datasets.html
  27. 2
      docs/articles/index.html
  28. 6
      docs/articles/resistance_predict.html
  29. 4
      docs/articles/welcome_to_AMR.html
  30. 2
      docs/authors.html
  31. 2
      docs/index.html
  32. 12
      docs/news/index.html
  33. 2
      docs/pkgdown.yml
  34. 4
      docs/reference/AMR.html
  35. 7
      docs/reference/WHOCC.html
  36. 2
      docs/reference/WHONET.html
  37. 2
      docs/reference/ab_from_text.html
  38. 2
      docs/reference/ab_property.html
  39. 7
      docs/reference/age.html
  40. 2
      docs/reference/age_groups.html
  41. 2
      docs/reference/antibiotic_class_selectors.html
  42. 2
      docs/reference/antibiotics.html
  43. 2
      docs/reference/as.ab.html
  44. 2
      docs/reference/as.disk.html
  45. 2
      docs/reference/as.mic.html
  46. 2
      docs/reference/as.mo.html
  47. 2
      docs/reference/as.rsi.html
  48. 2
      docs/reference/atc_online.html
  49. 2
      docs/reference/availability.html
  50. 2
      docs/reference/bug_drug_combinations.html
  51. 7
      docs/reference/catalogue_of_life.html
  52. 2
      docs/reference/catalogue_of_life_version.html
  53. 2
      docs/reference/count.html
  54. 4
      docs/reference/eucast_rules.html
  55. 2
      docs/reference/example_isolates.html
  56. 2
      docs/reference/example_isolates_unclean.html
  57. 2
      docs/reference/filter_ab_class.html
  58. 2
      docs/reference/first_isolate.html
  59. 8
      docs/reference/g.test.html
  60. 2
      docs/reference/ggplot_pca.html
  61. 2
      docs/reference/ggplot_rsi.html
  62. 2
      docs/reference/guess_ab_col.html
  63. 2
      docs/reference/index.html
  64. 2
      docs/reference/intrinsic_resistant.html
  65. 2
      docs/reference/join.html
  66. 2
      docs/reference/key_antibiotics.html
  67. 2
      docs/reference/kurtosis.html
  68. 4
      docs/reference/lifecycle.html
  69. 2
      docs/reference/like.html
  70. 4
      docs/reference/mdro.html
  71. 2
      docs/reference/microorganisms.codes.html
  72. 2
      docs/reference/microorganisms.html
  73. 2
      docs/reference/microorganisms.old.html
  74. 2
      docs/reference/mo_matching_score.html
  75. 2
      docs/reference/mo_property.html
  76. 4
      docs/reference/mo_source.html
  77. 2
      docs/reference/p_symbol.html
  78. 2
      docs/reference/pca.html
  79. 2
      docs/reference/plot.html
  80. 2
      docs/reference/proportion.html
  81. 2
      docs/reference/resistance_predict.html
  82. 2
      docs/reference/rsi_translation.html
  83. 2
      docs/reference/skewness.html
  84. 2
      docs/reference/translate.html
  85. 2
      docs/survey.html
  86. 2
      man/eucast_rules.Rd
  87. 2
      man/mdro.Rd
  88. 2
      man/mo_source.Rd
  89. 10
      vignettes/EUCAST.Rmd

4
DESCRIPTION

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Package: AMR
Version: 1.3.0.9037
Date: 2020-09-30
Version: 1.3.0.9038
Date: 2020-10-04
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(role = c("aut", "cre"),

4
NEWS.md

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
# AMR 1.3.0.9037
## <small>Last updated: 30 September 2020</small>
# AMR 1.3.0.9038
## <small>Last updated: 4 October 2020</small>
Note: some changes in this version were suggested by anonymous reviewers from the journal we submitted our manuscipt about this package to. We are those reviewers very grateful for going through our code so thoroughly!

5
R/aa_helper_functions.R

@ -188,8 +188,9 @@ search_type_in_df <- function(x, type, info = TRUE) { @@ -188,8 +188,9 @@ search_type_in_df <- function(x, type, info = TRUE) {
}
is_possibly_regex <- function(x) {
sapply(strsplit(x, ""),
function(y) any(y %in% c("$", "(", ")", "*", "+", "-", ".", "?", "[", "]", "^", "{", "|", "}", "\\"), na.rm = TRUE))
tryCatch(sapply(strsplit(x, ""),
function(y) any(y %in% c("$", "(", ")", "*", "+", "-", ".", "?", "[", "]", "^", "{", "|", "}", "\\"), na.rm = TRUE)),
error = function(e) rep(TRUE, length(x)))
}
stop_ifnot_installed <- function(package) {

62
R/eucast_rules.R

@ -39,7 +39,7 @@ EUCAST_VERSION_EXPERT_RULES <- list("3.1" = list(version_txt = "v3.1", @@ -39,7 +39,7 @@ EUCAST_VERSION_EXPERT_RULES <- list("3.1" = list(version_txt = "v3.1",
#' To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details.
#' @inheritSection lifecycle Stable lifecycle
#' @param x data with antibiotic columns, such as `amox`, `AMX` and `AMC`
#' @param info print progress
#' @param info a logical to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions
#' @param rules a character vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expert"`, `"other"`, `"all"`, and defaults to `c("breakpoints", "expert")`. The default value can be set to another value, e.g. using `options(AMR_eucastrules = "all")`.
#' @param verbose a [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.
#' @param version_breakpoints the version number to use for the EUCAST Clinical Breakpoints guideline. Currently supported: `r paste0(names(EUCAST_VERSION_BREAKPOINTS), collapse = ", ")`.
@ -132,7 +132,7 @@ eucast_rules <- function(x, @@ -132,7 +132,7 @@ eucast_rules <- function(x,
...) {
x_deparsed <- deparse(substitute(x))
if (length(x_deparsed) > 0 || !all(x_deparsed %like% "[a-z]")) {
if (length(x_deparsed) > 1 || !all(x_deparsed %like% "[a-z]+")) {
x_deparsed <- "your_data"
}
@ -188,7 +188,7 @@ eucast_rules <- function(x, @@ -188,7 +188,7 @@ eucast_rules <- function(x,
}
warned <- FALSE
warn_lacking_rsi_class <- FALSE
warn_lacking_rsi_class <- character(0)
txt_ok <- function(n_added, n_changed, warned = FALSE) {
if (warned == FALSE) {
if (n_added + n_changed == 0) {
@ -447,7 +447,7 @@ eucast_rules <- function(x, @@ -447,7 +447,7 @@ eucast_rules <- function(x,
if (info == TRUE & NROW(x) > 10000) {
message(font_blue("NOTE: Preparing data..."), appendLF = FALSE)
}
# nolint start
# antibiotic classes ----
aminoglycosides <- c(AMK, DKB, GEN, ISE, KAN, NEO, NET, RST, SIS, STR, STR1, TOB)
@ -612,9 +612,7 @@ eucast_rules <- function(x, @@ -612,9 +612,7 @@ eucast_rules <- function(x,
# Set base to R where base + enzyme inhibitor is R
rule_current <- paste0("Set ", ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = R where ",
ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = R")
if (info == TRUE) {
cat(rule_current)
}
cat(rule_current)
run_changes <- edit_rsi(x = x,
col_mo = col_mo,
to = "R",
@ -629,7 +627,7 @@ eucast_rules <- function(x, @@ -629,7 +627,7 @@ eucast_rules <- function(x,
n_changed <- n_changed + run_changes$changed
verbose_info <- run_changes$verbose_info
x <- run_changes$output
warn_lacking_rsi_class <- warn_lacking_rsi_class | run_changes$rsi_warn
warn_lacking_rsi_class <- c(warn_lacking_rsi_class, run_changes$rsi_warn)
# Print number of new changes
if (info == TRUE) {
# print only on last one of rules in this group
@ -659,7 +657,7 @@ eucast_rules <- function(x, @@ -659,7 +657,7 @@ eucast_rules <- function(x,
n_changed <- n_changed + run_changes$changed
verbose_info <- run_changes$verbose_info
x <- run_changes$output
warn_lacking_rsi_class <- warn_lacking_rsi_class | run_changes$rsi_warn
warn_lacking_rsi_class <- c(warn_lacking_rsi_class, run_changes$rsi_warn)
# Print number of new changes
if (info == TRUE) {
# print only on last one of rules in this group
@ -691,7 +689,7 @@ eucast_rules <- function(x, @@ -691,7 +689,7 @@ eucast_rules <- function(x,
if (any(c("all", "breakpoints") %in% rules)) {
eucast_rules_df <- subset(eucast_rules_df,
!reference.rule_group %like% "breakpoint" |
(reference.rule_group %like% "breakpoint" & reference.version == version_breakpoints))
(reference.rule_group %like% "breakpoint" & reference.version == version_breakpoints))
}
if (any(c("all", "expert") %in% rules)) {
eucast_rules_df <- subset(eucast_rules_df,
@ -846,7 +844,7 @@ eucast_rules <- function(x, @@ -846,7 +844,7 @@ eucast_rules <- function(x,
}
cols <- get_antibiotic_columns(target_antibiotics, x)
# Apply rule on data ------------------------------------------------------
# this will return the unique number of changes
run_changes <- edit_rsi(x = x,
@ -866,7 +864,7 @@ eucast_rules <- function(x, @@ -866,7 +864,7 @@ eucast_rules <- function(x,
n_changed <- n_changed + run_changes$changed
verbose_info <- run_changes$verbose_info
x <- run_changes$output
warn_lacking_rsi_class <- warn_lacking_rsi_class | run_changes$rsi_warn
warn_lacking_rsi_class <- c(warn_lacking_rsi_class, run_changes$rsi_warn)
# Print number of new changes ---------------------------------------------
if (info == TRUE & rule_next != rule_current) {
# print only on last one of rules in this group
@ -878,8 +876,7 @@ eucast_rules <- function(x, @@ -878,8 +876,7 @@ eucast_rules <- function(x,
}
# Print overview ----------------------------------------------------------
if (info == TRUE) {
if (info == TRUE | verbose == TRUE) {
verbose_info <- x.bak %pm>%
pm_mutate(row = pm_row_number()) %pm>%
pm_select(`.rowid`, row) %pm>%
@ -890,6 +887,9 @@ eucast_rules <- function(x, @@ -890,6 +887,9 @@ eucast_rules <- function(x,
pm_filter(!is.na(new)) %pm>%
pm_arrange(row, rule_group, rule_name, col)
rownames(verbose_info) <- NULL
}
if (info == TRUE) {
if (verbose == TRUE) {
wouldve <- "would have "
@ -899,16 +899,16 @@ eucast_rules <- function(x, @@ -899,16 +899,16 @@ eucast_rules <- function(x,
cat(paste0("\n", font_grey(strrep("-", 0.95 * options()$width)), "\n"))
cat(paste0("The rules ", paste0(wouldve, "affected "),
font_bold(formatnr(pm_n_distinct(verbose_info$row)),
"out of", formatnr(nrow(x.bak)),
"rows"),
", making a total of ",
font_bold(formatnr(nrow(verbose_info)), "edits\n")))
total_n_added <- verbose_info %pm>% pm_filter(is.na(old)) %pm>% nrow()
total_n_changed <- verbose_info %pm>% pm_filter(!is.na(old)) %pm>% nrow()
# print added values
font_bold(formatnr(pm_n_distinct(verbose_info$row)),
"out of", formatnr(nrow(x.bak)),
"rows"),
", making a total of ",
font_bold(formatnr(nrow(verbose_info)), "edits\n")))
total_n_added <- verbose_info %pm>% pm_filter(is.na(old)) %pm>% nrow()
total_n_changed <- verbose_info %pm>% pm_filter(!is.na(old)) %pm>% nrow()
# print added values
if (total_n_added == 0) {
colour <- cat # is function
} else {
@ -961,12 +961,14 @@ total_n_changed <- verbose_info %pm>% pm_filter(!is.na(old)) %pm>% nrow() @@ -961,12 +961,14 @@ total_n_changed <- verbose_info %pm>% pm_filter(!is.na(old)) %pm>% nrow()
}
}
if (isTRUE(warn_lacking_rsi_class)) {
unique_cols <- colnames(x.bak)[colnames(x.bak) %in% verbose_info$col]
if (length(warn_lacking_rsi_class) > 0) {
warn_lacking_rsi_class <- unique(warn_lacking_rsi_class)
warning("Not all columns with antimicrobial results are of class <rsi>. Transform them on beforehand, with e.g.:\n",
" ", x_deparsed, " %>% mutate_if(is.rsi.eligible, as.rsi)\n",
" ", x_deparsed, " %>% as.rsi(", unique_cols[1], ":", unique_cols[length(unique_cols)], ")",
" ", x_deparsed, " %>% as.rsi(", ifelse(length(warn_lacking_rsi_class) == 1,
warn_lacking_rsi_class,
paste0(warn_lacking_rsi_class[1], ":", warn_lacking_rsi_class[length(warn_lacking_rsi_class)])),
")",
call. = FALSE)
}
@ -1004,7 +1006,7 @@ edit_rsi <- function(x, @@ -1004,7 +1006,7 @@ edit_rsi <- function(x,
changed = 0,
output = x,
verbose_info = last_verbose_info,
rsi_warn = FALSE)
rsi_warn = character(0))
txt_error <- function() {
if (info == TRUE) cat("", font_red_bg(font_white(" ERROR ")), "\n\n")
@ -1019,7 +1021,7 @@ edit_rsi <- function(x, @@ -1019,7 +1021,7 @@ edit_rsi <- function(x,
if (length(rows) > 0 & length(cols) > 0) {
new_edits <- x
if (any(!sapply(x[, cols, drop = FALSE], is.rsi), na.rm = TRUE)) {
track_changes$rsi_warn <- TRUE
track_changes$rsi_warn <- cols[!sapply(x[, cols, drop = FALSE], is.rsi)]
}
tryCatch(
# insert into original table

1
R/mdro.R

@ -24,7 +24,6 @@ @@ -24,7 +24,6 @@
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
#' @inheritSection lifecycle Maturing lifecycle
#' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos *et al.* (2012, Clinical Microbiology and Infection) will be followed, please see *Details*.
#' @param info a logical to indicate whether progress should be printed to the console
#' @inheritParams eucast_rules
#' @param pct_required_classes minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `NA` for that isolate.
#' @param combine_SI a [logical] to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the [mdro()] function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using `combine_SI = FALSE`, resistance is considered when isolates are R or I.

48
R/mo.R

@ -157,7 +157,7 @@ as.mo <- function(x, @@ -157,7 +157,7 @@ as.mo <- function(x,
check_dataset_integrity()
if (tryCatch(all(x %in% MO_lookup$mo, na.rm = TRUE)
if (tryCatch(all(x[!is.na(x)] %in% MO_lookup$mo)
& isFALSE(Becker)
& isFALSE(Lancefield), error = function(e) FALSE)) {
# don't look into valid MO codes, just return them
@ -212,7 +212,7 @@ as.mo <- function(x, @@ -212,7 +212,7 @@ as.mo <- function(x,
pm_pull("mo")
)
} else if (all(x %in% MO_lookup$mo)
} else if (all(x[!is.na(x)] %in% MO_lookup$mo)
& isFALSE(Becker)
& isFALSE(Lancefield)) {
y <- x
@ -1733,7 +1733,9 @@ print.mo_uncertainties <- function(x, ...) { @@ -1733,7 +1733,9 @@ print.mo_uncertainties <- function(x, ...) {
if (NROW(x) == 0) {
return(NULL)
}
cat(font_blue(strwrap(c("Matching scores are based on human pathogenic prevalence and the resemblance between the input and the full taxonomic name. Please see ?mo_matching_score.")), collapse = "\n"))
cat(font_blue(strwrap("Matching scores are based on human pathogenic prevalence and the resemblance between the input and the full taxonomic name. Please see ?mo_matching_score.",
width = 0.98 * getOption("width")),
collapse = "\n"))
cat("\n")
msg <- ""
@ -1745,12 +1747,22 @@ print.mo_uncertainties <- function(x, ...) { @@ -1745,12 +1747,22 @@ print.mo_uncertainties <- function(x, ...) {
candidates <- candidates[order(1 - scores)]
scores_formatted <- trimws(formatC(round(scores, 3), format = "f", digits = 3))
n_candidates <- length(candidates)
candidates <- paste0(font_italic(candidates, collapse = NULL),
" (", scores_formatted[order(1 - scores)], ")")
candidates <- paste(candidates, collapse = ", ")
candidates <- paste0(candidates, " (", scores_formatted[order(1 - scores)], ")", collapse = ", ")
# align with input after arrow
candidates <- paste0("\n", strrep(" ", nchar(x[i, ]$input) + 6),
"Also matched", ifelse(n_candidates == 25, " (max 25)", ""), ": ", candidates)
candidates <- paste0("\n",
strwrap(paste0("Also matched",
ifelse(n_candidates >= 25, " (max 25)", ""), ": ",
candidates), # this is already max 25 due to format_uncertainty_as_df()
indent = nchar(x[i, ]$input) + 6,
exdent = nchar(x[i, ]$input) + 6,
width = 0.98 * getOption("width")),
collapse = "")
# after strwrap, make taxonomic names italic
candidates <- gsub("([A-Za-z]+)", font_italic("\\1"), candidates)
candidates <- gsub(paste(font_italic(c("Also", "matched"), collapse = NULL), collapse = " "),
"Also matched",
candidates, fixed = TRUE)
candidates <- gsub(font_italic("max"), "max", candidates, fixed = TRUE)
} else {
candidates <- ""
}
@ -1759,14 +1771,20 @@ print.mo_uncertainties <- function(x, ...) { @@ -1759,14 +1771,20 @@ print.mo_uncertainties <- function(x, ...) {
3),
format = "f", digits = 3))
msg <- paste(msg,
paste0('"', x[i, ]$input, '" -> ',
paste0(font_bold(font_italic(x[i, ]$fullname)),
ifelse(!is.na(x[i, ]$renamed_to), paste(", renamed to", font_italic(x[i, ]$renamed_to)), ""),
" (", x[i, ]$mo,
", matching score = ", score,
") "),
candidates),
paste0(
strwrap(
paste0('"', x[i, ]$input, '" -> ',
paste0(font_bold(font_italic(x[i, ]$fullname)),
ifelse(!is.na(x[i, ]$renamed_to), paste(", renamed to", font_italic(x[i, ]$renamed_to)), ""),
" (", x[i, ]$mo,
", matching score = ", score,
") ")),
width = 0.98 * getOption("width"),
exdent = nchar(x[i, ]$input) + 6),
collapse = "\n"),
candidates,
sep = "\n")
msg <- paste0(gsub("\n\n", "\n", msg), "\n\n")
}
cat(msg)
}

2
R/mo_property.R

@ -415,7 +415,7 @@ mo_validate <- function(x, property, language, ...) { @@ -415,7 +415,7 @@ mo_validate <- function(x, property, language, ...) {
check_dataset_integrity()
if (tryCatch(all(x %in% MO_lookup$mo) & length(list(...)) == 0, error = function(e) FALSE)) {
if (tryCatch(all(x[!is.na(x)] %in% MO_lookup$mo) & length(list(...)) == 0, error = function(e) FALSE)) {
# special case for mo_* functions where class is already <mo>
return(MO_lookup[match(x, MO_lookup$mo), property, drop = TRUE])
}

2
R/mo_source.R

@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
#' @aliases set_mo_source get_mo_source
#' @details The reference file can be a text file separated with commas (CSV) or tabs or pipes, an Excel file (either 'xls' or 'xlsx' format) or an R object file (extension '.rds'). To use an Excel file, you will need to have the `readxl` package installed.
#'
#' [set_mo_source()] will check the file for validity: it must be a [data.frame], must have a column named `"mo"` which contains values from [`microorganisms$mo`][microorganisms] and must have a reference column with your own defined values. If all tests pass, [set_mo_source()] will read the file into R and export it to `"~/.mo_source.rds"` after the user **specifically confirms and allows** that this file will be created. For this reason, this function only works in interactive sessions.
#' [set_mo_source()] will check the file for validity: it must be a [data.frame], must have a column named `"mo"` which contains values from [`microorganisms$mo`][microorganisms] and must have a reference column with your own defined values. If all tests pass, [set_mo_source()] will read the file into R and will ask to export it to `"~/.mo_source.rds"`. The CRAN policy disallows packages to write to the file system, although '*exceptions may be allowed in interactive sessions if the package obtains confirmation from the user*'. For this reason, this function only works in interactive sessions so that the user can **specifically confirm and allow** that this file will be created.
#'
#' The created compressed data file `"~/.mo_source.rds"` will be used at default for MO determination (function [as.mo()] and consequently all `mo_*` functions like [mo_genus()] and [mo_gramstain()]). The location of the original file will be saved as an R option with `options(mo_source = path)`. Its timestamp will be saved with `options(mo_source_datetime = ...)`.
#'

2
docs/404.html

@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9037</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9038</span>
</span>
</div>

2
docs/LICENSE-text.html

@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9037</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9038</span>
</span>
</div>

473
docs/articles/AMR.html

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script><meta property="og:title" content="How to conduct AMR analysis">
<meta property="og:description" content="AMR">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.svg">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9015</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0</span>
</span>
</div>
@ -193,7 +193,7 @@ @@ -193,7 +193,7 @@
<h1 data-toc-skip>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">03 September 2020</h4>
<h4 class="date">30 September 2020</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -202,7 +202,7 @@ @@ -202,7 +202,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 03 September 2020.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 30 September 2020.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -233,21 +233,21 @@ @@ -233,21 +233,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2020-09-03</td>
<td align="center">2020-09-30</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2020-09-03</td>
<td align="center">2020-09-30</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2020-09-03</td>
<td align="center">2020-09-30</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -361,43 +361,43 @@ @@ -361,43 +361,43 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2014-05-29</td>
<td align="center">B4</td>
<td align="center">Hospital B</td>
<td align="center">2016-08-26</td>
<td align="center">P9</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2017-04-19</td>
<td align="center">S1</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">2016-09-24</td>
<td align="center">T6</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2017-04-21</td>
<td align="center">L3</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">2017-04-02</td>
<td align="center">X1</td>
<td align="center">Hospital D</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-01-19</td>
<td align="center">A7</td>
<td align="center">2016-12-13</td>
<td align="center">F1</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -405,26 +405,26 @@ @@ -405,26 +405,26 @@
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2011-01-24</td>
<td align="center">H10</td>
<td align="center">2012-02-05</td>
<td align="center">O8</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-01-31</td>
<td align="center">T9</td>
<td align="center">Hospital C</td>
<td align="center">2017-06-17</td>
<td align="center">K1</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">M</td>
</tr>
</tbody>
</table>
@ -459,16 +459,16 @@ Longest: 1</p> @@ -459,16 +459,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,409</td>
<td align="right">52.05%</td>
<td align="right">10,409</td>
<td align="right">52.05%</td>
<td align="right">10,232</td>
<td align="right">51.16%</td>
<td align="right">10,232</td>
<td align="right">51.16%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,591</td>
<td align="right">47.96%</td>
<td align="right">9,768</td>
<td align="right">48.84%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -489,6 +489,7 @@ Longest: 1</p> @@ -489,6 +489,7 @@ Longest: 1</p>
<p>Because the amoxicillin (column <code>AMX</code>) and amoxicillin/clavulanic acid (column <code>AMC</code>) in our data were generated randomly, some rows will undoubtedly contain AMX = S and AMC = R, which is technically impossible. The <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> fixes this:</p>
<div class="sourceCode" id="cb13"><pre class="downlit">
<span class="kw">data</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span>(<span class="kw">data</span>, col_mo = <span class="st">"bacteria"</span>, rules = <span class="st">"all"</span>)
<span class="co"># Set amoxicillin (AMX) = R where amoxicillin/clavulanic acid (AMC) = R</span>
</pre></div>
</div>
<div id="adding-new-variables" class="section level1">
@ -518,7 +519,7 @@ Longest: 1</p> @@ -518,7 +519,7 @@ Longest: 1</p>
<span class="co"># NOTE: Using column `date` as input for `col_date`.</span>
<span class="co"># NOTE: Using column `patient_id` as input for `col_patient_id`.</span>
</pre></div>
<p>So only 28.6% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 28.5% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb16"><pre class="downlit">
<span class="kw">data_1st</span> <span class="op">&lt;-</span> <span class="kw">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw">first</span> <span class="op">==</span> <span class="fl">TRUE</span>)
@ -532,7 +533,7 @@ Longest: 1</p> @@ -532,7 +533,7 @@ Longest: 1</p>
<div id="first-weighted-isolates" class="section level2">
<h2 class="hasAnchor">
<a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient M8, sorted on date:</p>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient Z5, sorted on date:</p>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -548,76 +549,76 @@ Longest: 1</p> @@ -548,76 +549,76 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-01-28</td>
<td align="center">M8</td>
<td align="center">2010-02-11</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-05-23</td>
<td align="center">M8</td>
<td align="center">2010-04-11</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-07-11</td>
<td align="center">M8</td>
<td align="center">2010-05-31</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-10-01</td>
<td align="center">M8</td>
<td align="center">2011-03-29</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-12-02</td>
<td align="center">M8</td>
<td align="center">2011-04-23</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-12-23</td>
<td align="center">M8</td>
<td align="center">2011-05-06</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-01-16</td>
<td align="center">M8</td>
<td align="center">2011-09-05</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -625,19 +626,19 @@ Longest: 1</p> @@ -625,19 +626,19 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2011-03-14</td>
<td align="center">M8</td>
<td align="center">2011-09-29</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-04-02</td>
<td align="center">M8</td>
<td align="center">2011-11-16</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -647,13 +648,13 @@ Longest: 1</p> @@ -647,13 +648,13 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-04-05</td>
<td align="center">M8</td>
<td align="center">2011-11-26</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
</tr>
</tbody>
@ -686,35 +687,35 @@ Longest: 1</p> @@ -686,35 +687,35 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-01-28</td>
<td align="center">M8</td>
<td align="center">2010-02-11</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-05-23</td>
<td align="center">M8</td>
<td align="center">2010-04-11</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-07-11</td>
<td align="center">M8</td>
<td align="center">2010-05-31</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
@ -722,97 +723,97 @@ Longest: 1</p> @@ -722,97 +723,97 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-10-01</td>
<td align="center">M8</td>
<td align="center">2011-03-29</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-12-02</td>
<td align="center">M8</td>
<td align="center">2011-04-23</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-12-23</td>
<td align="center">M8</td>
<td align="center">2011-05-06</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-01-16</td>
<td align="center">M8</td>
<td align="center">2011-09-05</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2011-03-14</td>
<td align="center">M8</td>
<td align="center">2011-09-29</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-04-02</td>
<td align="center">M8</td>
<td align="center">2011-11-16</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-04-05</td>
<td align="center">M8</td>
<td align="center">2011-11-26</td>
<td align="center">Z5</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Instead of 2, now 8 isolates are flagged. In total, 79.1% of all isolates are marked ‘first weighted’ - 50.5% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>Instead of 2, now 10 isolates are flagged. In total, 78.6% of all isolates are marked ‘first weighted’ - 50.1% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
<div class="sourceCode" id="cb19"><pre class="downlit">
<span class="kw">data_1st</span> <span class="op">&lt;-</span> <span class="kw">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()
</pre></div>
<p>So we end up with 15,813 isolates for analysis.</p>
<p>So we end up with 15,718 isolates for analysis.</p>
<p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb20"><pre class="downlit">
<span class="kw">data_1st</span> <span class="op">&lt;-</span> <span class="kw">data_1st</span> <span class="op">%&gt;%</span>
@ -857,32 +858,32 @@ Longest: 1</p> @@ -857,32 +858,32 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">2</td>
<td align="center">2017-04-19</td>
<td align="center">S1</td>
<td align="left">1</td>
<td align="center">2016-08-26</td>
<td align="center">P9</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">3</td>
<td align="center">2017-04-21</td>
<td align="center">L3</td>
<td align="left">2</td>
<td align="center">2016-09-24</td>
<td align="center">T6</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
@ -890,27 +891,11 @@ Longest: 1</p> @@ -890,27 +891,11 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="left">4</td>
<td align="center">2011-01-19</td>
<td align="center">A7</td>
<td align="center">2016-12-13</td>
<td align="center">F1</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">5</td>
<td align="center">2011-01-24</td>
<td align="center">H10</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -920,31 +905,31 @@ Longest: 1</p> @@ -920,31 +905,31 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<tr class="even">
<td align="left">6</td>
<td align="center">2011-01-31</td>
<td align="center">T9</td>
<td align="center">Hospital C</td>
<td align="center">2017-06-17</td>
<td align="center">K1</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2012-12-27</td>
<td align="center">Q9</td>
<td align="center">Hospital A</td>
<tr class="odd">
<td align="left">8</td>
<td align="center">2011-02-20</td>
<td align="center">V8</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
@ -952,6 +937,22 @@ Longest: 1</p> @@ -952,6 +937,22 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">9</td>
<td align="center">2016-09-22</td>
<td align="center">D3</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Time for the analysis!</p>
@ -975,8 +976,8 @@ Longest: 1</p> @@ -975,8 +976,8 @@ Longest: 1</p>
</pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 15,813<br>
Available: 15,813 (100%, NA: 0 = 0%)<br>
Length: 15,718<br>
Available: 15,718 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -993,33 +994,33 @@ Longest: 24</p> @@ -993,33 +994,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">7,901</td>
<td align="right">49.97%</td>
<td align="right">7,901</td>
<td align="right">49.97%</td>
<td align="right">7,841</td>
<td align="right">49.89%</td>
<td align="right">7,841</td>
<td align="right">49.89%</td>