(v0.9.0.9013) Support for LOINC codes

v1.8.2
parent 449d9bde35
commit 423d1d3c41
  1. 20
      DESCRIPTION
  2. 2
      NEWS.md
  3. 2
      R/data.R
  4. 10
      _pkgdown.yml
  5. 4
      docs/404.html
  6. 4
      docs/LICENSE-text.html
  7. 383
      docs/articles/AMR.html
  8. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  9. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  10. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  11. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  12. 6
      docs/articles/EUCAST.html
  13. 60
      docs/articles/MDR.html
  14. 8
      docs/articles/SPSS.html
  15. 6
      docs/articles/WHONET.html
  16. 117
      docs/articles/benchmarks.html
  17. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png
  18. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-8-1.png
  19. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-9-1.png
  20. 4
      docs/articles/index.html
  21. 9
      docs/articles/resistance_predict.html
  22. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-4-1.png
  23. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-5-1.png
  24. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-5-2.png
  25. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-6-1.png
  26. BIN
      docs/articles/resistance_predict_files/figure-html/unnamed-chunk-7-1.png
  27. 22
      docs/authors.html
  28. 14
      docs/index.html
  29. 10
      docs/news/index.html
  30. 4
      docs/reference/AMR-deprecated.html
  31. 4
      docs/reference/AMR.html
  32. 4
      docs/reference/WHOCC.html
  33. 4
      docs/reference/WHONET.html
  34. 4
      docs/reference/ab_property.html
  35. 4
      docs/reference/age.html
  36. 4
      docs/reference/age_groups.html
  37. 6
      docs/reference/antibiotics.html
  38. 4
      docs/reference/as.ab.html
  39. 4
      docs/reference/as.disk.html
  40. 4
      docs/reference/as.mic.html
  41. 4
      docs/reference/as.mo.html
  42. 4
      docs/reference/as.rsi.html
  43. 4
      docs/reference/atc_online.html
  44. 4
      docs/reference/availability.html
  45. 4
      docs/reference/bug_drug_combinations.html
  46. 4
      docs/reference/catalogue_of_life.html
  47. 4
      docs/reference/catalogue_of_life_version.html
  48. 4
      docs/reference/count.html
  49. 4
      docs/reference/eucast_rules.html
  50. 4
      docs/reference/example_isolates.html
  51. 4
      docs/reference/extended-functions.html
  52. 4
      docs/reference/filter_ab_class.html
  53. 4
      docs/reference/first_isolate.html
  54. 4
      docs/reference/g.test.html
  55. 4
      docs/reference/ggplot_rsi.html
  56. 4
      docs/reference/guess_ab_col.html
  57. 4
      docs/reference/index.html
  58. 4
      docs/reference/join.html
  59. 4
      docs/reference/key_antibiotics.html
  60. 4
      docs/reference/kurtosis.html
  61. 4
      docs/reference/lifecycle.html
  62. 4
      docs/reference/like.html
  63. 4
      docs/reference/mdro.html
  64. 4
      docs/reference/microorganisms.codes.html
  65. 4
      docs/reference/microorganisms.html
  66. 4
      docs/reference/microorganisms.old.html
  67. 4
      docs/reference/mo_property.html
  68. 4
      docs/reference/mo_source.html
  69. 4
      docs/reference/p_symbol.html
  70. 4
      docs/reference/proportion.html
  71. 4
      docs/reference/read.4D.html
  72. 4
      docs/reference/reexports.html
  73. 4
      docs/reference/resistance_predict.html
  74. 4
      docs/reference/rsi_translation.html
  75. 4
      docs/reference/skewness.html
  76. 4
      docs/reference/translate.html
  77. 2
      man/antibiotics.Rd

@ -1,30 +1,30 @@
Package: AMR
Version: 0.9.0.9012
Version: 0.9.0.9013
Date: 2020-01-26
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(role = c("aut", "cre"),
family = "Berends", given = c("Matthijs", "S"), email = "m.s.berends@umcg.nl", comment = c(ORCID = "0000-0001-7620-1800")),
family = "Berends", given = c("Matthijs", "S."), email = "m.s.berends@umcg.nl", comment = c(ORCID = "0000-0001-7620-1800")),
person(role = c("aut", "ctb"),
family = "Luz", given = c("Christian", "F"), email = "c.f.luz@umcg.nl", comment = c(ORCID = "0000-0001-5809-5995")),
family = "Luz", given = c("Christian", "F."), email = "c.f.luz@umcg.nl", comment = c(ORCID = "0000-0001-5809-5995")),
person(role = c("aut", "ths"),
family = "Friedrich", given = c("Alexander", "W"), email = "alex.friedrich@umcg.nl", comment = c(ORCID = "0000-0003-4881-038X")),
family = "Friedrich", given = c("Alexander", "W."), email = "alex.friedrich@umcg.nl", comment = c(ORCID = "0000-0003-4881-038X")),
person(role = c("aut", "ths"),
family = "Sinha", given = c("Bhanu", "N", "M"), email = "b.sinha@umcg.nl", comment = c(ORCID = "0000-0003-1634-0010")),
family = "Sinha", given = c("Bhanu", "N.", "M."), email = "b.sinha@umcg.nl", comment = c(ORCID = "0000-0003-1634-0010")),
person(role = c("aut", "ths"),
family = "Albers", given = c("Casper", "J"), email = "c.j.albers@rug.nl", comment = c(ORCID = "0000-0002-9213-6743")),
family = "Albers", given = c("Casper", "J."), email = "c.j.albers@rug.nl", comment = c(ORCID = "0000-0002-9213-6743")),
person(role = c("aut", "ths"),
family = "Glasner", given = "Corinna", email = "c.glasner@umcg.nl", comment = c(ORCID = "0000-0003-1241-1328")),
person(role = "ctb",
family = "Fonville", given = c("Judith", "M"), email = "j.fonville@pamm.nl"),
family = "Fonville", given = c("Judith", "M."), email = "j.fonville@pamm.nl"),
person(role = "ctb",
family = "Hassing", given = c("Erwin", "E", "A"), email = "e.hassing@certe.nl"),
family = "Hassing", given = c("Erwin", "E.", "A."), email = "e.hassing@certe.nl"),
person(role = "ctb",
family = "Hazenberg", given = c("Eric", "H", "L", "C", "M"), email = "e.hazenberg@jbz.nl"),
family = "Hazenberg", given = c("Eric", "H.", "L.", "C", "M"), email = "e.hazenberg@jbz.nl"),
person(role = "ctb",
family = "Lenglet", given = "Annick", email = "annick.lenglet@amsterdam.msf.org"),
person(role = "ctb",
family = "Meijer", given = c("Bart", "C"), email = "b.meijerg@certe.nl"),
family = "Meijer", given = c("Bart", "C."), email = "b.meijerg@certe.nl"),
person(role = "ctb",
family = "Ny", given = "Sofia", email = "sofia.ny@folkhalsomyndigheten.se"),
person(role = "ctb",

@ -1,4 +1,4 @@
# AMR 0.9.0.9012
# AMR 0.9.0.9013
## <small>Last updated: 26-Jan-2020</small>
### New

@ -37,7 +37,7 @@
#' - `oral_units`\cr Units of `oral_ddd`
#' - `iv_ddd`\cr Defined Daily Dose (DDD), parenteral treatment
#' - `iv_units`\cr Units of `iv_ddd`
#' - `loinc`\cr All LOINC codes (Logical Observation Identifiers Names and Codes) associated with the antimicrobial name of the drug. Use [ab_loic()] to retrieve them quickly, see [ab_property()].
#' - `loinc`\cr All LOINC codes (Logical Observation Identifiers Names and Codes) associated with the name of the antimicrobial agent. Use [ab_loinc()] to retrieve them quickly, see [ab_property()].
#'
#' ### For the [antivirals] data set: a [`data.frame`] with 102 observations and 9 variables:
#' - `atc`\cr ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC

@ -168,15 +168,15 @@ reference:
- "`AMR-deprecated`"
authors:
Matthijs S Berends:
Matthijs S. Berends:
href: https://www.rug.nl/staff/m.s.berends/
Christian F Luz:
Christian F. Luz:
href: https://www.rug.nl/staff/c.f.luz/
Alexander W Friedrich:
Alexander W. Friedrich:
href: https://www.rug.nl/staff/a.w.friedrich/
Bhanu N M Sinha:
Bhanu N. M. Sinha:
href: https://www.rug.nl/staff/b.sinha/
Casper J Albers:
Casper J. Albers:
href: https://www.rug.nl/staff/c.j.albers/
Corinna Glasner:
href: https://www.rug.nl/staff/c.glasner/

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9013</span>
</span>
</div>
@ -240,7 +240,7 @@ Content not found. Please use links in the navbar.
<footer>
<div class="copyright">
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N M Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
</div>
<div class="pkgdown">

@ -84,7 +84,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">0.9.0.9012</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9013</span>
</span>
</div>
@ -488,7 +488,7 @@ END OF TERMS AND CONDITIONS
<footer>
<div class="copyright">
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N M Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
</div>
<div class="pkgdown">

@ -41,7 +41,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">0.9.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9013</span>
</span>
</div>
@ -187,7 +187,7 @@
<h1>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">22 December 2019</h4>
<h4 class="date">26 January 2020</h4>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -196,7 +196,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 22 December 2019.</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 26 January 2020.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -227,21 +227,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2019-12-22</td>
<td align="center">2020-01-26</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">2019-12-22</td>
<td align="center">2020-01-26</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">2019-12-22</td>
<td align="center">2020-01-26</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -336,52 +336,52 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2017-03-14</td>
<td align="center">J6</td>
<td align="center">2015-04-08</td>
<td align="center">R6</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">Escherichia coli</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">S</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2015-04-15</td>
<td align="center">B9</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">2012-04-24</td>
<td align="center">M7</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2017-01-04</td>
<td align="center">Q9</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">2017-07-31</td>
<td align="center">U9</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</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">F</td>
</tr>
<tr class="even">
<td align="center">2015-05-23</td>
<td align="center">X2</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">2015-03-11</td>
<td align="center">Q1</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2017-05-20</td>
<td align="center">X5</td>
<td align="center">2014-06-05</td>
<td align="center">S2</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
@ -391,8 +391,8 @@
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-09-27</td>
<td align="center">N7</td>
<td align="center">2017-01-15</td>
<td align="center">Z3</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -421,8 +421,8 @@
#
# Item Count Percent Cum. Count Cum. Percent
# --- ----- ------- -------- ----------- -------------
# 1 M 10,464 52.32% 10,464 52.32%
# 2 F 9,536 47.68% 20,000 100.00%</code></pre>
# 1 M 10,379 51.90% 10,379 51.90%
# 2 F 9,621 48.11% 20,000 100.00%</code></pre>
<p>So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researchers perspective: there are slightly more men. Nothing we didn’t already know.</p>
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a>
@ -437,8 +437,8 @@
<a class="sourceLine" id="cb14-3" data-line-number="3"><span class="co"># Other rules by this AMR package</span></a>
<a class="sourceLine" id="cb14-4" data-line-number="4"><span class="co"># Non-EUCAST: inherit amoxicillin results for unavailable ampicillin (no changes)</span></a>
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="co"># Non-EUCAST: inherit ampicillin results for unavailable amoxicillin (no changes)</span></a>
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co"># Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (3,027 values changed)</span></a>
<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="co"># Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (129 values changed)</span></a>
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co"># Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (3,059 values changed)</span></a>
<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="co"># Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (147 values changed)</span></a>
<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="co"># Non-EUCAST: set piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a>
<a class="sourceLine" id="cb14-9" data-line-number="9"><span class="co"># Non-EUCAST: set piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
<a class="sourceLine" id="cb14-10" data-line-number="10"><span class="co"># Non-EUCAST: set trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a>
@ -463,14 +463,14 @@
<a class="sourceLine" id="cb14-29" data-line-number="29"><span class="co"># Pasteurella multocida (no changes)</span></a>
<a class="sourceLine" id="cb14-30" data-line-number="30"><span class="co"># Staphylococcus (no changes)</span></a>
<a class="sourceLine" id="cb14-31" data-line-number="31"><span class="co"># Streptococcus groups A, B, C, G (no changes)</span></a>
<a class="sourceLine" id="cb14-32" data-line-number="32"><span class="co"># Streptococcus pneumoniae (1,039 values changed)</span></a>
<a class="sourceLine" id="cb14-32" data-line-number="32"><span class="co"># Streptococcus pneumoniae (1,029 values changed)</span></a>
<a class="sourceLine" id="cb14-33" data-line-number="33"><span class="co"># Viridans group streptococci (no changes)</span></a>
<a class="sourceLine" id="cb14-34" data-line-number="34"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-35" data-line-number="35"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
<a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,305 values changed)</span></a>
<a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,260 values changed)</span></a>
<a class="sourceLine" id="cb14-37" data-line-number="37"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-38" data-line-number="38"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,835 values changed)</span></a>
<a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,726 values changed)</span></a>
<a class="sourceLine" id="cb14-40" data-line-number="40"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
<a class="sourceLine" id="cb14-41" data-line-number="41"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
<a class="sourceLine" id="cb14-42" data-line-number="42"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a>
@ -478,15 +478,15 @@
<a class="sourceLine" id="cb14-44" data-line-number="44"><span class="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a>
<a class="sourceLine" id="cb14-45" data-line-number="45"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-46" data-line-number="46"><span class="co"># -------------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># EUCAST rules affected 6,667 out of 20,000 rows, making a total of 8,335 edits</span></a>
<a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># EUCAST rules affected 6,567 out of 20,000 rows, making a total of 8,221 edits</span></a>
<a class="sourceLine" id="cb14-48" data-line-number="48"><span class="co"># =&gt; added 0 test results</span></a>
<a class="sourceLine" id="cb14-49" data-line-number="49"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># =&gt; changed 8,335 test results</span></a>
<a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 121 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 4,855 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 1,244 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># - 332 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># - 1,783 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># =&gt; changed 8,221 test results</span></a>
<a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 111 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 4,703 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 1,216 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># - 348 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># - 1,843 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-56" data-line-number="56"><span class="co"># -------------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-57" data-line-number="57"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-58" data-line-number="58"><span class="co"># Use eucast_rules(..., verbose = TRUE) (on your original data) to get a data.frame with all specified edits instead.</span></a></code></pre></div>
@ -514,8 +514,8 @@
<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a>
<a class="sourceLine" id="cb16-4" data-line-number="4"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a>
<a class="sourceLine" id="cb16-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<a class="sourceLine" id="cb16-6" data-line-number="6"><span class="co"># =&gt; Found 5,713 first isolates (28.6% of total)</span></a></code></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>
<a class="sourceLine" id="cb16-6" data-line-number="6"><span class="co"># =&gt; Found 5,687 first isolates (28.4% of total)</span></a></code></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>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb17-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div>
<p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
@ -525,7 +525,7 @@
<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 C4, 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 S4, sorted on date:</p>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -541,21 +541,21 @@
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-02-20</td>
<td align="center">C4</td>
<td align="center">2010-09-15</td>
<td align="center">S4</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">R</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-03-07</td>
<td align="center">C4</td>
<td align="center">2010-10-03</td>
<td align="center">S4</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>
@ -563,19 +563,19 @@
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-06-08</td>
<td align="center">C4</td>
<td align="center">2010-12-05</td>
<td align="center">S4</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">4</td>
<td align="center">2010-10-24</td>
<td align="center">C4</td>
<td align="center">2011-01-14</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -585,19 +585,19 @@
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2011-04-27</td>
<td align="center">C4</td>
<td align="center">2011-02-04</td>
<td align="center">S4</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">TRUE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-05-13</td>
<td align="center">C4</td>
<td align="center">2011-05-15</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
@ -607,8 +607,8 @@
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-12-08</td>
<td align="center">C4</td>
<td align="center">2011-05-25</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -618,10 +618,10 @@
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2012-05-22</td>
<td align="center">C4</td>
<td align="center">2011-11-30</td>
<td align="center">S4</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">S</td>
<td align="center">S</td>
@ -629,8 +629,8 @@
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2012-06-10</td>
<td align="center">C4</td>
<td align="center">2011-12-08</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -640,8 +640,8 @@
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2012-08-14</td>
<td align="center">C4</td>
<td align="center">2011-12-26</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
@ -651,7 +651,7 @@
</tr>
</tbody>
</table>
<p>Only 3 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>Only 2 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>If a column exists with a name like ‘key(…)ab’ the <code><a href="../reference/first_isolate.html">first_isolate()</a></code> function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb19-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">keyab =</span> <span class="kw"><a href="../reference/key_antibiotics.html">key_antibiotics</a></span>(.)) <span class="op">%&gt;%</span><span class="st"> </span></a>
@ -662,7 +662,7 @@
<a class="sourceLine" id="cb19-7" data-line-number="7"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<a class="sourceLine" id="cb19-8" data-line-number="8"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
<a class="sourceLine" id="cb19-9" data-line-number="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a>
<a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 14,948 first weighted isolates (74.7% of total)</span></a></code></pre></div>
<a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 15,030 first weighted isolates (75.2% of total)</span></a></code></pre></div>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -679,22 +679,22 @@
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-02-20</td>
<td align="center">C4</td>
<td align="center">2010-09-15</td>
<td align="center">S4</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">R</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-03-07</td>
<td align="center">C4</td>
<td align="center">2010-10-03</td>
<td align="center">S4</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>
@ -703,20 +703,20 @@
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-06-08</td>
<td align="center">C4</td>
<td align="center">2010-12-05</td>
<td align="center">S4</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">4</td>
<td align="center">2010-10-24</td>
<td align="center">C4</td>
<td align="center">2011-01-14</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -727,20 +727,20 @@
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2011-04-27</td>
<td align="center">C4</td>
<td align="center">2011-02-04</td>
<td align="center">S4</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">TRUE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-05-13</td>
<td align="center">C4</td>
<td align="center">2011-05-15</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
@ -751,8 +751,8 @@
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-12-08</td>
<td align="center">C4</td>
<td align="center">2011-05-25</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -763,10 +763,10 @@
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2012-05-22</td>
<td align="center">C4</td>
<td align="center">2011-11-30</td>
<td align="center">S4</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">S</td>
<td align="center">S</td>
@ -775,8 +775,8 @@
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2012-06-10</td>
<td align="center">C4</td>
<td align="center">2011-12-08</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -787,8 +787,8 @@
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2012-08-14</td>
<td align="center">C4</td>
<td align="center">2011-12-26</td>
<td align="center">S4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
@ -799,11 +799,11 @@
</tr>
</tbody>
</table>
<p>Instead of 3, now 9 isolates are flagged. In total, 74.7% of all isolates are marked ‘first weighted’ - 46.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 9 isolates are flagged. In total, 75.2% of all isolates are marked ‘first weighted’ - 46.7% 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="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb20-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div>
<p>So we end up with 14,948 isolates for analysis.</p>
<p>So we end up with 15,030 isolates for analysis.</p>
<p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb21-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(first, keyab))</a></code></pre></div>
@ -811,6 +811,7 @@
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(data_1st)</a></code></pre></div>
<table class="table">
<thead><tr class="header">
<th></th>
<th align="center">date</th>
<th align="center">patient_id</th>
<th align="center">hospital</th>
@ -827,43 +828,62 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2017-03-14</td>
<td align="center">J6</td>
<td>1</td>
<td align="center">2015-04-08</td>
<td align="center">R6</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</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">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>2</td>
<td align="center">2012-04-24</td>
<td align="center">M7</td>
<td align="center">Hospital B</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">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="center">2015-04-15</td>
<td align="center">B9</td>
<td align="center">Hospital D</td>
<tr class="odd">
<td>3</td>
<td align="center">2017-07-31</td>
<td align="center">U9</td>
<td align="center">Hospital B</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">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">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-01-04</td>
<td align="center">Q9</td>
<td align="center">Hospital A</td>
<tr class="even">
<td>4</td>
<td align="center">2015-03-11</td>
<td align="center">Q1</td>
<td align="center">Hospital C</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">F</td>
<td align="center">Gram-negative</td>
@ -871,28 +891,30 @@
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2015-05-23</td>
<td align="center">X2</td>
<tr class="odd">
<td>7</td>
<td align="center">2017-05-28</td>
<td align="center">J1</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</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">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="odd">
<td align="center">2017-05-20</td>
<td align="center">X5</td>
<td align="center">Hospital C</td>
<tr class="even">
<td>8</td>
<td align="center">2014-05-21</td>
<td align="center">X8</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">S</td>
<td align="center">S</td>
<td align="center">F</td>
@ -901,21 +923,6 @@
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-09-27</td>
<td align="center">N7</td>
<td align="center">Hospital A</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">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Time for the analysis!</p>
@ -935,7 +942,7 @@
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 14,948 (of which NA: 0 = 0%)<br>
Length: 15,030 (of which NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -952,33 +959,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">7,408</td>
<td align="right">49.56%</td>
<td align="right">7,408</td>
<td align="right">49.56%</td>
<td align="right">7,505</td>
<td align="right">49.93%</td>
<td align="right">7,505</td>
<td align="right">49.93%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">3,682</td>
<td align="right">24.63%</td>
<td align="right">11,090</td>
<td align="right">74.19%</td>
<td align="right">3,726</td>
<td align="right">24.79%</td>
<td align="right">11,231</td>
<td align="right">74.72%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,373</td>
<td align="right">15.88%</td>
<td align="right">13,463</td>
<td align="right">90.07%</td>
<td align="right">2,294</td>
<td align="right">15.26%</td>
<td align="right">13,525</td>
<td align="right">89.99%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,485</td>
<td align="right">9.93%</td>
<td align="right">14,948</td>
<td align="right">1,505</td>
<td align="right">10.01%</td>
<td align="right">15,030</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -990,7 +997,7 @@ Longest: 24</p>
<p>The functions <code><a href="../reference/proportion.html">resistance()</a></code> and <code><a href="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><a href="../reference/proportion.html">proportion_S()</a></code>, <code><a href="../reference/proportion.html">proportion_SI()</a></code>, <code><a href="../reference/proportion.html">proportion_I()</a></code>, <code><a href="../reference/proportion.html">proportion_IR()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX)</a>
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4658817</span></a></code></pre></div>
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4660679</span></a></code></pre></div>
<p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb26-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%&gt;%</span><span class="st"> </span></a>
@ -1003,19 +1010,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.4639385</td>
<td align="center">0.4690974</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.4647623</td>
<td align="center">0.4651074</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.4596631</td>
<td align="center">0.4570674</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.4755767</td>
<td align="center">0.4699507</td>
</tr>
</tbody>
</table>
@ -1033,23 +1040,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.4639385</td>
<td align="center">4423</td>
<td align="center">0.4690974</td>
<td align="center">4498</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.4647623</td>
<td align="center">5321</td>
<td align="center">0.4651074</td>
<td align="center">5216</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.4596631</td>
<td align="center">2256</td>
<td align="center">0.4570674</td>
<td align="center">2271</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.4755767</td>
<td align="center">2948</td>
<td align="center">0.4699507</td>
<td align="center">3045</td>
</tr>
</tbody>
</table>
@ -1069,27 +1076,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.9298056</td>
<td align="center">0.8983531</td>
<td align="center">0.9950054</td>
<td align="center">0.9240506</td>
<td align="center">0.8968688</td>
<td align="center">0.9928048</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.9313131</td>
<td align="center">0.8942761</td>
<td align="center">0.9932660</td>
<td align="center">0.9149502</td>
<td align="center">0.9049834</td>
<td align="center">0.9940199</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.9212385</td>
<td align="center">0.9166214</td>
<td align="center">0.9934818</td>
<td align="center">0.9125067</td>
<td align="center">0.9240472</td>
<td align="center">0.9935588</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.6080910</td>
<td align="center">0.6033130</td>
<td align="center">0.0000000</td>
<td align="center">0.6080910</td>
<td align="center">0.6033130</td>
</tr>
</tbody>
</table>
@ -1246,7 +1253,7 @@ Longest: 24</p>
<footer><div class="copyright">
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F Luz</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alexander W Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N M Sinha</a>, <a href="https://www.rug.nl/staff/c.j.albers/">Casper J Albers</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>.</p>
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alexander W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>, <a href="https://www.rug.nl/staff/c.j.albers/">Casper J. Albers</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>.</p>
</div>
<div class="pkgdown">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB