Browse Source

(v1.4.0.9033) documentation update

main
parent
commit
2145f1d1ba
  1. 4
      DESCRIPTION
  2. 4
      NEWS.md
  3. 4
      R/ab_class_selectors.R
  4. 42
      R/catalogue_of_life.R
  5. 2
      R/first_isolate.R
  6. 2
      R/is_new_episode.R
  7. 2
      R/mdro.R
  8. 4
      R/mo_property.R
  9. 2
      docs/404.html
  10. 2
      docs/LICENSE-text.html
  11. 499
      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. 56
      docs/articles/MDR.html
  17. 9
      docs/articles/PCA.html
  18. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-5-1.png
  19. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-6-1.png
  20. BIN
      docs/articles/PCA_files/figure-html/unnamed-chunk-7-1.png
  21. 12
      docs/articles/PCA_files/header-attrs-2.4/header-attrs.js
  22. 37
      docs/articles/SPSS.html
  23. 12
      docs/articles/SPSS_files/header-attrs-2.4/header-attrs.js
  24. 5
      docs/articles/WHONET.html
  25. BIN
      docs/articles/WHONET_files/figure-html/unnamed-chunk-7-1.png
  26. 12
      docs/articles/WHONET_files/header-attrs-2.4/header-attrs.js
  27. 72
      docs/articles/benchmarks.html
  28. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  29. 4
      docs/articles/datasets.html
  30. 2
      docs/articles/index.html
  31. 11
      docs/articles/resistance_predict.html
  32. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-4-1.png
  33. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-5-1.png
  34. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-5-2.png
  35. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-6-1.png
  36. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-7-1.png
  37. 12
      docs/articles/resistance_predict_files/header-attrs-2.4/header-attrs.js
  38. 5
      docs/articles/welcome_to_AMR.html
  39. 12
      docs/articles/welcome_to_AMR_files/header-attrs-2.4/header-attrs.js
  40. 2
      docs/authors.html
  41. 5
      docs/extra.css
  42. 121
      docs/index.html
  43. 50
      docs/news/index.html
  44. 2
      docs/pkgdown.yml
  45. 2
      docs/reference/AMR-deprecated.html
  46. 2
      docs/reference/AMR.html
  47. 2
      docs/reference/WHOCC.html
  48. 2
      docs/reference/WHONET.html
  49. 2
      docs/reference/ab_from_text.html
  50. 2
      docs/reference/ab_property.html
  51. 2
      docs/reference/age.html
  52. 2
      docs/reference/age_groups.html
  53. 8
      docs/reference/antibiotic_class_selectors.html
  54. 2
      docs/reference/antibiotics.html
  55. 2
      docs/reference/as.ab.html
  56. 2
      docs/reference/as.disk.html
  57. 2
      docs/reference/as.mic.html
  58. 6
      docs/reference/as.mo.html
  59. 2
      docs/reference/as.rsi.html
  60. 2
      docs/reference/atc_online.html
  61. 2
      docs/reference/availability.html
  62. 2
      docs/reference/bug_drug_combinations.html
  63. 28
      docs/reference/catalogue_of_life.html
  64. 6
      docs/reference/catalogue_of_life_version.html
  65. 2
      docs/reference/count.html
  66. 2
      docs/reference/eucast_rules.html
  67. 2
      docs/reference/example_isolates.html
  68. 2
      docs/reference/example_isolates_unclean.html
  69. 2
      docs/reference/filter_ab_class.html
  70. 2
      docs/reference/first_isolate.html
  71. 2
      docs/reference/g.test.html
  72. 2
      docs/reference/ggplot_pca.html
  73. 2
      docs/reference/ggplot_rsi.html
  74. 2
      docs/reference/guess_ab_col.html
  75. 2
      docs/reference/index.html
  76. 2
      docs/reference/intrinsic_resistant.html
  77. 44
      docs/reference/is_new_episode.html
  78. 2
      docs/reference/join.html
  79. 2
      docs/reference/kurtosis.html
  80. 2
      docs/reference/lifecycle.html
  81. 2
      docs/reference/like.html
  82. 2
      docs/reference/mdro.html
  83. 6
      docs/reference/microorganisms.codes.html
  84. 6
      docs/reference/microorganisms.html
  85. 6
      docs/reference/microorganisms.old.html
  86. 2
      docs/reference/mo_matching_score.html
  87. 10
      docs/reference/mo_property.html
  88. 2
      docs/reference/mo_source.html
  89. 2
      docs/reference/pca.html
  90. 2
      docs/reference/plot.html
  91. 2
      docs/reference/proportion.html
  92. 2
      docs/reference/resistance_predict.html
  93. 2
      docs/reference/rsi_translation.html
  94. 2
      docs/reference/skewness.html
  95. 2
      docs/reference/translate.html
  96. 2
      docs/survey.html
  97. 34
      index.md
  98. 4
      man/antibiotic_class_selectors.Rd
  99. 4
      man/as.mo.Rd
  100. 26
      man/catalogue_of_life.Rd
  101. Some files were not shown because too many files have changed in this diff Show More

4
DESCRIPTION

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Package: AMR
Version: 1.4.0.9032
Date: 2020-12-07
Version: 1.4.0.9033
Date: 2020-12-08
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.4.0.9032
## <small>Last updated: 7 December 2020</small>
# AMR 1.4.0.9033
## <small>Last updated: 8 December 2020</small>
### New
* Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package:

4
R/ab_class_selectors.R

@ -25,11 +25,11 @@ @@ -25,11 +25,11 @@
#' Antibiotic class selectors
#'
#' Use these selection helpers inside any function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html), like `dplyr::select()` or `tidyr::pivot_longer()`. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.
#' Use these selection helpers inside any function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html), such as [`select()`][dplyr::select()] and [`pivot_longer()`][tidyr::pivot_longer()]. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.
#' @inheritParams filter_ab_class
#' @details All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the [antibiotics] data set. This means that a selector like e.g. [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
#'
#' **N.B. These functions only work if the `tidyselect` package is installed**, that comes with the `dplyr` package. An error will be thrown if the `tidyselect` package is not installed, or if the functions are used outside a function that allows Tidyverse selections like `select()` or `pivot_longer()`.
#' **N.B. These functions require the `tidyselect` package to be installed**, that comes with the `dplyr` package. An error will be thrown if the `tidyselect` package is not installed, or if the functions are used outside a function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html) such as [`select()`][dplyr::select()] and [`pivot_longer()`][tidyr::pivot_longer()]`.
#' @rdname antibiotic_class_selectors
#' @seealso [filter_ab_class()] for the `filter()` equivalent.
#' @name antibiotic_class_selectors

42
R/catalogue_of_life.R

@ -23,20 +23,36 @@ @@ -23,20 +23,36 @@
# how to conduct AMR analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
format_included_data_number <- function(data) {
if (is.data.frame(data)) {
n <- nrow(data)
} else {
n <- length(unique(data))
}
if (n > 10000) {
rounder <- -3 # round on thousands
} else if (n > 1000) {
rounder <- -2 # round on hundreds
} else {
rounder <- -1 # round on tens
}
paste0("~", format(round(n, rounder), decimal.mark = ".", big.mark = ","))
}
#' The Catalogue of Life
#'
#' This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life.
#' @section Catalogue of Life:
#' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
#' This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<http://www.catalogueoflife.org>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.
#' This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <http://www.catalogueoflife.org>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/Sp2000/colplus) is finished, which we await.
#'
#' [Click here][catalogue_of_life] for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with [catalogue_of_life_version()].
#' [Click here][catalogue_of_life] for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with [catalogue_of_life_version()].
#' @section Included taxa:
#' Included are:
#' - All ~61,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
#' - All ~8,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
#' - All ~150 (sub)species from ~100 other relevant genera from the kingdom of Animalia (like *Strongyloides* and *Taenia*)
#' - All ~23,000 previously accepted names of all included (sub)species (these were taxonomically renamed)
#' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom %in% c("Archeae", "Bacteria", "Chromista", "Protozoa")), ])` (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
#' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Fungi" & microorganisms$order %in% c("Eurotiales", "Microascales", "Mucorales", "Onygenales", "Pneumocystales", "Saccharomycetales", "Schizosaccharomycetales", "Tremellales")), ])` (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Fungi" & !microorganisms$order %in% c("Eurotiales", "Microascales", "Mucorales", "Onygenales", "Pneumocystales", "Saccharomycetales", "Schizosaccharomycetales", "Tremellales")), ])` other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
#' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Animalia"), ])` (sub)species from `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Animalia"), "genus"])` other relevant genera from the kingdom of Animalia (like *Strongyloides* and *Taenia*)
#' - All `r format_included_data_number(microorganisms.old)` previously accepted names of all included (sub)species (these were taxonomically renamed)
#' - The complete taxonomic tree of all included (sub)species: from kingdom to subspecies
#' - The responsible author(s) and year of scientific publication
#'
@ -57,26 +73,26 @@ @@ -57,26 +73,26 @@
#' mo_shortname("Chlamydophila psittaci")
#' # Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to
#' # 'Chlamydia psittaci' (Page, 1968)
#' # [1] "C. psittaci"
#' #> [1] "C. psittaci"
#'
#' # Get any property from the entire taxonomic tree for all included species
#' mo_class("E. coli")
#' # [1] "Gammaproteobacteria"
#' #> [1] "Gammaproteobacteria"
#'
#' mo_family("E. coli")
#' # [1] "Enterobacteriaceae"
#' #> [1] "Enterobacteriaceae"
#'
#' mo_gramstain("E. coli") # based on kingdom and phylum, see ?mo_gramstain
#' # [1] "Gram negative"
#' #> [1] "Gram-negative"
#'
#' mo_ref("E. coli")
#' # [1] "Castellani et al., 1919"
#' #> [1] "Castellani et al., 1919"
#'
#' # Do not get mistaken - this package is about microorganisms
#' mo_kingdom("C. elegans")
#' # [1] "Fungi" # Fungi?!
#' #> [1] "Fungi" # Fungi?!
#' mo_name("C. elegans")
#' # [1] "Cladosporium elegans" # Because a microorganism was found
#' #> [1] "Cladosporium elegans" # Because a microorganism was found
NULL
#' Version info of included Catalogue of Life

2
R/first_isolate.R

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#'
#' Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use [is_new_episode()] that also supports grouping with the `dplyr` package.
#' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] containing isolates. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`.
#' @param x a [data.frame] containing isolates. Can be omitted when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
#' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column with a date class
#' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)
#' @param col_mo column name of the IDs of the microorganisms (see [as.mo()]), defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].

2
R/is_new_episode.R

@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
#'
#' is_new_episode(example_isolates$date)
#' is_new_episode(example_isolates$date, episode_days = 60)
#' #' \donttest{
#' \donttest{
#' if (require("dplyr")) {
#' # is_new_episode() can also be used in dplyr verbs to determine patient
#' # episodes based on any (combination of) grouping variables:

2
R/mdro.R

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#'
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
#' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`.
#' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
#' @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*.
#' @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.

4
R/mo_property.R

@ -27,8 +27,8 @@ @@ -27,8 +27,8 @@
#'
#' Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with [as.mo()], which makes it possible to use microbial abbreviations, codes and names as input. Please see *Examples*.
#' @inheritSection lifecycle Stable lifecycle
#' @param x any character (vector) that can be coerced to a valid microorganism code with [as.mo()]
#' @param property one of the column names of the [microorganisms] data set or `"shortname"`
#' @param x any character (vector) that can be coerced to a valid microorganism code with [as.mo()]. Can be omitted for auto-guessing in `mo_is_*()` functions when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()], please see *Examples*.
#' @param property one of the column names of the [microorganisms] data set: `r paste0('"``', colnames(microorganisms), '\``"', collapse = ", ")`, or must be `"shortname"`
#' @param language language of the returned text, defaults to system language (see [get_locale()]) and can be overwritten by setting the option `AMR_locale`, e.g. `options(AMR_locale = "de")`, see [translate]. Also used to translate text like "no growth". Use `language = NULL` or `language = ""` to prevent translation.
#' @param ... other parameters passed on to [as.mo()], such as 'allow_uncertain' and 'ignore_pattern'
#' @param ab any (vector of) text that can be coerced to a valid antibiotic code with [as.ab()]

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.4.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</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.4.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span>
</div>

499
docs/articles/AMR.html

@ -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.4.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</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">15 October 2020</h4>
<h4 class="date">08 December 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 15 October 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 08 December 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-10-15</td>
<td align="center">2020-12-08</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-10-15</td>
<td align="center">2020-12-08</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-10-15</td>
<td align="center">2020-12-08</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -352,70 +352,70 @@ @@ -352,70 +352,70 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2011-04-04</td>
<td align="center">A3</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">2015-10-08</td>
<td align="center">Y10</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-10-13</td>
<td align="center">I4</td>
<td align="center">Hospital B</td>
<td align="center">2014-04-05</td>
<td align="center">O10</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">R</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">F</td>
</tr>
<tr class="odd">
<td align="center">2015-11-20</td>
<td align="center">J6</td>
<td align="center">2012-07-06</td>
<td align="center">H9</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">I</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>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2017-02-04</td>
<td align="center">X3</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">2016-09-05</td>
<td align="center">U3</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</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">2010-10-17</td>
<td align="center">N9</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">2017-05-23</td>
<td align="center">S5</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-06-04</td>
<td align="center">X3</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">2013-11-30</td>
<td align="center">J2</td>
<td align="center">Hospital C</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">M</td>
</tr>
</tbody>
</table>
@ -449,16 +449,16 @@ Longest: 1</p> @@ -449,16 +449,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,412</td>
<td align="right">52.06%</td>
<td align="right">10,412</td>
<td align="right">52.06%</td>
<td align="right">10,384</td>
<td align="right">51.92%</td>
<td align="right">10,384</td>
<td align="right">51.92%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,588</td>
<td align="right">47.94%</td>
<td align="right">9,616</td>
<td align="right">48.08%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -501,10 +501,10 @@ Longest: 1</p> @@ -501,10 +501,10 @@ Longest: 1</p>
<div class="sourceCode" id="cb15"><pre class="downlit">
<span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<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.4% 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>
<span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<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>
<div class="sourceCode" id="cb16"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div>
@ -516,7 +516,7 @@ Longest: 1</p> @@ -516,7 +516,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 Z7, 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 A3, sorted on date:</p>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -532,21 +532,21 @@ Longest: 1</p> @@ -532,21 +532,21 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-03-27</td>
<td align="center">Z7</td>
<td align="center">2010-01-04</td>
<td align="center">A3</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">R</td>
<td align="center">S</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-06-10</td>
<td align="center">Z7</td>
<td align="center">2010-01-05</td>
<td align="center">A3</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>
@ -554,30 +554,30 @@ Longest: 1</p> @@ -554,30 +554,30 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-06-25</td>
<td align="center">Z7</td>
<td align="center">2010-02-07</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</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>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-11-05</td>
<td align="center">Z7</td>
<td align="center">2010-06-17</td>
<td align="center">A3</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">FALSE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-11-22</td>
<td align="center">Z7</td>
<td align="center">2010-07-23</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -587,8 +587,8 @@ Longest: 1</p> @@ -587,8 +587,8 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-02-06</td>
<td align="center">Z7</td>
<td align="center">2010-11-16</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -598,45 +598,45 @@ Longest: 1</p> @@ -598,45 +598,45 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-03-19</td>
<td align="center">Z7</td>
<td align="center">2010-12-05</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">I</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">8</td>
<td align="center">2011-07-19</td>
<td align="center">Z7</td>
<td align="center">2011-01-17</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-08-15</td>
<td align="center">Z7</td>
<td align="center">2011-01-26</td>
<td align="center">A3</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">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-09-22</td>
<td align="center">Z7</td>
<td align="center">2011-02-12</td>
<td align="center">A3</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">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
@ -648,11 +648,12 @@ Longest: 1</p> @@ -648,11 +648,12 @@ Longest: 1</p>
<span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>keyab <span class="op">=</span> <span class="fu"><a href="../reference/key_antibiotics.html">key_antibiotics</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first_weighted <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<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>
<span class="co"># NOTE: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></pre></div>
<span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<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>
<span class="co"># NOTE: Using column 'keyab' as input for `col_keyantibiotics`. Use</span>
<span class="co"># col_keyantibiotics = FALSE to prevent this.</span></pre></div>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -669,22 +670,22 @@ Longest: 1</p> @@ -669,22 +670,22 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-03-27</td>
<td align="center">Z7</td>
<td align="center">2010-01-04</td>
<td align="center">A3</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">R</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-06-10</td>
<td align="center">Z7</td>
<td align="center">2010-01-05</td>
<td align="center">A3</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>
@ -693,44 +694,44 @@ Longest: 1</p> @@ -693,44 +694,44 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-06-25</td>
<td align="center">Z7</td>
<td align="center">2010-02-07</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</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">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-11-05</td>
<td align="center">Z7</td>
<td align="center">2010-06-17</td>
<td align="center">A3</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">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-11-22</td>
<td align="center">Z7</td>
<td align="center">2010-07-23</td>
<td align="center">A3</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">TRUE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-02-06</td>
<td align="center">Z7</td>
<td align="center">2010-11-16</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -741,60 +742,60 @@ Longest: 1</p> @@ -741,60 +742,60 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-03-19</td>
<td align="center">Z7</td>
<td align="center">2010-12-05</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">I</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">FALSE</td>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2011-07-19</td>
<td align="center">Z7</td>
<td align="center">2011-01-17</td>
<td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-08-15</td>
<td align="center">Z7</td>
<td align="center">2011-01-26</td>
<td align="center">A3</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">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-09-22</td>
<td align="center">Z7</td>
<td align="center">2011-02-12</td>
<td align="center">A3</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">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</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, 78.6% of all isolates are marked ‘first weighted’ - 50.2% 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 7 isolates are flagged. In total, 79.1% 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.</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="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span><span class="op">(</span><span class="op">)</span></pre></div>
<p>So we end up with 15,713 isolates for analysis.</p>
<p>So we end up with 15,822 isolates for analysis.</p>
<p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb20"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -837,94 +838,94 @@ Longest: 1</p> @@ -837,94 +838,94 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2011-04-04</td>
<td align="center">A3</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="left">3</td>
<td align="center">2012-07-06</td>
<td align="center">H9</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</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">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">2</td>
<td align="center">2011-10-13</td>
<td align="center">I4</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="left">4</td>
<td align="center">2016-09-05</td>
<td align="center">U3</td>
<td align="center">Hospital C</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">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</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">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="center">2015-11-20</td>
<td align="center">J6</td>
<td align="center">Hospital A</td>
<td align="left">5</td>
<td align="center">2017-05-23</td>
<td align="center">S5</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</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">4</td>
<td align="center">2017-02-04</td>
<td align="center">X3</td>
<td align="left">8</td>
<td align="center">2016-07-20</td>
<td align="center">D2</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</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>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="center">2010-10-17</td>
<td align="center">N9</td>
<td align="left">9</td>
<td align="center">2010-09-20</td>
<td align="center">H10</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</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">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">7</td>
<td align="center">2011-06-10</td>
<td align="center">P2</td>
<td align="left">10</td>
<td align="center">2012-03-30</td>
<td align="center">Y4</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
@ -953,8 +954,8 @@ Longest: 1</p> @@ -953,8 +954,8 @@ Longest: 1</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 15,713<br>
Available: 15,713 (100%, NA: 0 = 0%)<br>
Length: 15,822<br>
Available: 15,822 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -971,33 +972,33 @@ Longest: 24</p> @@ -971,33 +972,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">7,867</td>
<td align="right">50.07%</td>
<td align="right">7,867</td>
<td align="right">50.07%</td>
<td align="right">7,935</td>
<td align="right">50.15%</td>
<td align="right">7,935</td>
<td align="right">50.15%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">3,842</td>
<td align="right">24.45%</td>
<td align="right">11,709</td>
<td align="right">74.52%</td>
<td align="right">3,933</td>
<td align="right">24.86%</td>
<td align="right">11,868</td>
<td align="right">75.01%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,346</td>
<td align="right">14.93%</td>
<td align="right">14,055</td>
<td align="right">89.45%</td>
<td align="right">2,376</td>
<td align="right">15.02%</td>
<td align="right">14,244</td>
<td align="right">90.03%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,658</td>
<td align="right">10.55%</td>
<td align="right">15,713</td>
<td align="right">1,578</td>
<td align="right">9.97%</td>
<td align="right">15,822</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -1011,7 +1012,7 @@ Longest: 24</p> @@ -1011,7 +1012,7 @@ Longest: 24</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show first 6 rows</span></pre></div>
<pre><code># NOTE: Using column `bacteria` as input for `col_mo`.</code></pre>
<pre><code># NOTE: Using column 'bacteria' as input for `col_mo`.</code></pre>
<table class="table">
<thead><tr class="header">
<th align="center">mo</th>
@ -1025,50 +1026,50 @@ Longest: 24</p> @@ -1025,50 +1026,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">3806</td>
<td align="center">262</td>
<td align="center">3799</td>
<td align="center">7867</td>
<td align="center">3811</td>
<td align="center">259</td>
<td align="center">3865</td>
<td align="center">7935</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">6223</td>
<td align="center">321</td>
<td align="center">1323</td>
<td align="center">7867</td>
<td align="center">6278</td>
<td align="center">298</td>
<td align="center">1359</td>
<td align="center">7935</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">6006</td>
<td align="center">6070</td>
<td align="center">0</td>
<td align="center">1861</td>
<td align="center">7867</td>
<td align="center">1865</td>
<td align="center">7935</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">7072</td>
<td align="center">7138</td>
<td align="center">0</td>
<td align="center">795</td>
<td align="center">7867</td>
<td align="center">797</td>
<td align="center">7935</td>
</tr>
<tr class="odd">
<td align="center">K. pneumoniae</td>
<td align="center">AMX</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">1658</td>
<td align="center">1658</td>
<td align="center">1578</td>
<td align="center">1578</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">1298</td>
<td align="center">56</td>
<td align="center">304</td>
<td align="center">1658</td>
<td align="center">1248</td>
<td align="center">57</td>
<td align="center">273</td>
<td align="center">1578</td>
</tr>
</tbody>
</table>
@ -1077,8 +1078,8 @@ Longest: 24</p> @@ -1077,8 +1078,8 @@ Longest: 24</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">bacteria</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">fluoroquinolones</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span></pre></div>
<pre><code># Selecting fluoroquinolones: `CIP` (ciprofloxacin)
# NOTE: Using column `bacteria` as input for `col_mo`.</code></pre>
<pre><code># Selecting fluoroquinolones: 'CIP' (ciprofloxacin)
# NOTE: Using column 'bacteria' as input for `col_mo`.</code></pre>
<table class="table">
<thead><tr class="header">
<th align="center">mo</th>
@ -1092,34 +1093,34 @@ Longest: 24</p> @@ -1092,34 +1093,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">6006</td>
<td align="center">6070</td>
<td align="center">0</td>
<td align="center">1861</td>
<td align="center">7867</td>
<td align="center">1865</td>
<td align="center">7935</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">CIP</td>
<td align="center">1257</td>
<td align="center">1219</td>
<td align="center">0</td>
<td align="center">401</td>
<td align="center">1658</td>
<td align="center">359</td>
<td align="center">1578</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">CIP</td>
<td align="center">2963</td>
<td align="center">3015</td>
<td align="center">0</td>
<td align="center">879</td>
<td align="center">3842</td>
<td align="center">918</td>
<td align="center">3933</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center">CIP</td>
<td align="center">1785</td>
<td align="center">1798</td>
<td align="center">0</td>
<td align="center">561</td>
<td align="center">2346</td>
<td align="center">578</