Browse Source

(v1.2.0.9030) GitHub Actions

main
parent
commit
7baa9d3658
  1. 4
      DESCRIPTION
  2. 4
      NEWS.md
  3. 2
      docs/404.html
  4. 2
      docs/LICENSE-text.html
  5. 500
      docs/articles/AMR.html
  6. 15
      docs/articles/AMR_files/accessible-code-block-0.0.1/empty-anchor.js
  7. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  8. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  9. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  10. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  11. 14
      docs/articles/EUCAST.html
  12. 15
      docs/articles/EUCAST_files/accessible-code-block-0.0.1/empty-anchor.js
  13. 80
      docs/articles/MDR.html
  14. 15
      docs/articles/MDR_files/accessible-code-block-0.0.1/empty-anchor.js
  15. 14
      docs/articles/PCA.html
  16. 15
      docs/articles/PCA_files/accessible-code-block-0.0.1/empty-anchor.js
  17. 4
      docs/articles/SPSS.html
  18. 14
      docs/articles/WHONET.html
  19. 15
      docs/articles/WHONET_files/accessible-code-block-0.0.1/empty-anchor.js
  20. 123
      docs/articles/benchmarks.html
  21. 15
      docs/articles/benchmarks_files/accessible-code-block-0.0.1/empty-anchor.js
  22. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  23. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-6-1.png
  24. 2
      docs/articles/index.html
  25. 14
      docs/articles/resistance_predict.html
  26. 15
      docs/articles/resistance_predict_files/accessible-code-block-0.0.1/empty-anchor.js
  27. 2
      docs/authors.html
  28. 12
      docs/extra.js
  29. 2
      docs/index.html
  30. 12
      docs/news/index.html
  31. 2
      docs/pkgdown.yml
  32. 2
      docs/reference/AMR-deprecated.html
  33. 2
      docs/reference/AMR.html
  34. 2
      docs/reference/WHOCC.html
  35. 2
      docs/reference/WHONET.html
  36. 2
      docs/reference/ab_from_text.html
  37. 2
      docs/reference/ab_property.html
  38. 2
      docs/reference/age.html
  39. 2
      docs/reference/age_groups.html
  40. 10
      docs/reference/antibiotic_class_selectors.html
  41. 2
      docs/reference/antibiotics.html
  42. 2
      docs/reference/as.ab.html
  43. 2
      docs/reference/as.disk.html
  44. 2
      docs/reference/as.mic.html
  45. 2
      docs/reference/as.mo.html
  46. 2
      docs/reference/as.rsi.html
  47. 2
      docs/reference/atc_online.html
  48. 2
      docs/reference/availability.html
  49. 2
      docs/reference/bug_drug_combinations.html
  50. 2
      docs/reference/catalogue_of_life.html
  51. 2
      docs/reference/catalogue_of_life_version.html
  52. 2
      docs/reference/count.html
  53. 2
      docs/reference/eucast_rules.html
  54. 2
      docs/reference/example_isolates.html
  55. 2
      docs/reference/example_isolates_unclean.html
  56. 2
      docs/reference/filter_ab_class.html
  57. 2
      docs/reference/first_isolate.html
  58. 2
      docs/reference/g.test.html
  59. 2
      docs/reference/ggplot_pca.html
  60. 2
      docs/reference/ggplot_rsi.html
  61. 2
      docs/reference/guess_ab_col.html
  62. 2
      docs/reference/index.html
  63. 2
      docs/reference/join.html
  64. 2
      docs/reference/key_antibiotics.html
  65. 2
      docs/reference/kurtosis.html
  66. 2
      docs/reference/lifecycle.html
  67. 2
      docs/reference/like.html
  68. 2
      docs/reference/mdro.html
  69. 2
      docs/reference/microorganisms.codes.html
  70. 2
      docs/reference/microorganisms.html
  71. 2
      docs/reference/microorganisms.old.html
  72. 2
      docs/reference/mo_property.html
  73. 2
      docs/reference/mo_source.html
  74. 2
      docs/reference/p_symbol.html
  75. 2
      docs/reference/pca.html
  76. 2
      docs/reference/proportion.html
  77. 2
      docs/reference/resistance_predict.html
  78. 2
      docs/reference/rsi_translation.html
  79. 2
      docs/reference/skewness.html
  80. 2
      docs/reference/translate.html
  81. 263
      docs_/404.html
  82. 511
      docs_/LICENSE-text.html
  83. BIN
      docs_/apple-touch-icon-120x120.png
  84. BIN
      docs_/apple-touch-icon-152x152.png
  85. BIN
      docs_/apple-touch-icon-180x180.png
  86. BIN
      docs_/apple-touch-icon-60x60.png
  87. BIN
      docs_/apple-touch-icon-76x76.png
  88. BIN
      docs_/apple-touch-icon.png
  89. 1318
      docs_/articles/AMR.html
  90. BIN
      docs_/articles/AMR_files/figure-html/plot 1-1.png
  91. BIN
      docs_/articles/AMR_files/figure-html/plot 3-1.png
  92. BIN
      docs_/articles/AMR_files/figure-html/plot 4-1.png
  93. BIN
      docs_/articles/AMR_files/figure-html/plot 5-1.png
  94. 398
      docs_/articles/EUCAST.html
  95. 411
      docs_/articles/MDR.html
  96. 337
      docs_/articles/PCA.html
  97. BIN
      docs_/articles/PCA_files/figure-html/unnamed-chunk-5-1.png
  98. BIN
      docs_/articles/PCA_files/figure-html/unnamed-chunk-6-1.png
  99. BIN
      docs_/articles/PCA_files/figure-html/unnamed-chunk-7-1.png
  100. 411
      docs_/articles/SPSS.html
  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.2.0.9029
Date: 2020-07-08
Version: 1.2.0.9030
Date: 2020-07-09
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.2.0.9029
## <small>Last updated: 08-Jul-2020</small>
# AMR 1.2.0.9030
## <small>Last updated: 09-Jul-2020</small>
### New
* Function `ab_from_text()` to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses `as.ab()` internally

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

500
docs/articles/AMR.html

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script><meta property="og:title" content="How to conduct AMR analysis">
<meta property="og:description" content="AMR">
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.svg">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.svg">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9011</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9030</span>
</span>
</div>
@ -157,8 +157,8 @@ @@ -157,8 +157,8 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
<a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span>
Source Code
</a>
@ -180,22 +180,22 @@ @@ -180,22 +180,22 @@
</header><div class="row">
</header><script src="AMR_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
<h1 data-toc-skip>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">22 June 2020</h4>
<h4 class="date">09 July 2020</h4>
<small class="dont-index">Source: <a href="https://gitlab.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<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>
</div>
<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 June 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 09 July 2020.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -226,21 +226,21 @@ @@ -226,21 +226,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2020-06-22</td>
<td align="center">2020-07-09</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-06-22</td>
<td align="center">2020-07-09</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-06-22</td>
<td align="center">2020-07-09</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -336,68 +336,68 @@ @@ -336,68 +336,68 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2014-04-15</td>
<td align="center">I4</td>
<td align="center">Hospital D</td>
<td align="center">2016-01-30</td>
<td align="center">Y5</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia 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">M</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-02-09</td>
<td align="center">D1</td>
<td align="center">Hospital A</td>
<td align="center">2010-11-13</td>
<td align="center">Y1</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2013-12-16</td>
<td align="center">K4</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">2016-07-21</td>
<td align="center">U10</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2017-08-23</td>
<td align="center">Z9</td>
<td align="center">2013-03-14</td>
<td align="center">Q1</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</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">2010-01-14</td>
<td align="center">N4</td>
<td align="center">Hospital A</td>
<td align="center">2013-04-22</td>
<td align="center">O8</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">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-01-31</td>
<td align="center">N1</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">2017-11-14</td>
<td align="center">J4</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
@ -432,18 +432,18 @@ Longest: 1</p> @@ -432,18 +432,18 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,328</td>
<td align="right">51.64%</td>
<td align="right">10,328</td>
<td align="right">51.64%</td>
<td align="right">10,300</td>
<td align="right">51.5%</td>
<td align="right">10,300</td>
<td align="right">51.5%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,672</td>
<td align="right">48.36%</td>
<td align="right">9,700</td>
<td align="right">48.5%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
<td align="right">100.0%</td>
</tr>
</tbody>
</table>
@ -481,7 +481,7 @@ Longest: 1</p> @@ -481,7 +481,7 @@ Longest: 1</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></body></html></div>
<p>So only 28.3% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 28.5% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">&lt;-</span> <span class="no">data</span> <span class="kw">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="no">first</span> <span class="kw">==</span> <span class="fl">TRUE</span>)</pre></body></html></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>
@ -491,7 +491,7 @@ Longest: 1</p> @@ -491,7 +491,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 N3, 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 Y2, sorted on date:</p>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -507,19 +507,19 @@ Longest: 1</p> @@ -507,19 +507,19 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-03-10</td>
<td align="center">N3</td>
<td align="center">2010-03-16</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">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-05-11</td>
<td align="center">N3</td>
<td align="center">2010-08-04</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -529,19 +529,19 @@ Longest: 1</p> @@ -529,19 +529,19 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-05-17</td>
<td align="center">N3</td>
<td align="center">2010-10-06</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_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">FALSE</td>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-05-18</td>
<td align="center">N3</td>
<td align="center">2010-11-11</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
@ -551,43 +551,43 @@ Longest: 1</p> @@ -551,43 +551,43 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-07-30</td>
<td align="center">N3</td>
<td align="center">2010-11-23</td>
<td align="center">Y2</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">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-09-15</td>
<td align="center">N3</td>
<td align="center">2011-04-01</td>
<td align="center">Y2</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">R</td>
<td align="center">FALSE</td>
<td align="center">R</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2010-10-06</td>
<td align="center">N3</td>
<td align="center">2011-04-27</td>
<td align="center">Y2</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="even">
<td align="center">8</td>
<td align="center">2010-11-30</td>
<td align="center">N3</td>
<td align="center">2011-05-27</td>
<td align="center">Y2</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>
@ -595,34 +595,35 @@ Longest: 1</p> @@ -595,34 +595,35 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-01-27</td>
<td align="center">N3</td>
<td align="center">2011-07-05</td>
<td align="center">Y2</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">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-01-30</td>
<td align="center">N3</td>
<td align="center">2011-09-25</td>
<td align="center">Y2</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">FALSE</td>
</tr>
</tbody>
</table>
<p>Only 1 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="cb18"><html><body><pre class="r"><span class="no">data</span> <span class="kw">&lt;-</span> <span class="no">data</span> <span class="kw">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="kw">keyab</span> <span class="kw">=</span> <span class="fu"><a href="../reference/key_antibiotics.html">key_antibiotics</a></span>(<span class="no">.</span>)) <span class="kw">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="kw">first_weighted</span> <span class="kw">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span>(<span class="no">.</span>))
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<span class="co"># NOTE: more than one result was found for item 1: amoxicillin/clavulanic acid, azidocillin</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>
@ -643,35 +644,35 @@ Longest: 1</p> @@ -643,35 +644,35 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-03-10</td>
<td align="center">N3</td>
<td align="center">2010-03-16</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">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-05-11</td>
<td align="center">N3</td>
<td align="center">2010-08-04</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-05-17</td>
<td align="center">N3</td>
<td align="center">2010-10-06</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_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">FALSE</td>
@ -679,23 +680,23 @@ Longest: 1</p> @@ -679,23 +680,23 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-05-18</td>
<td align="center">N3</td>
<td align="center">2010-11-11</td>
<td align="center">Y2</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">FALSE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-07-30</td>
<td align="center">N3</td>
<td align="center">2010-11-23</td>
<td align="center">Y2</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">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
@ -703,34 +704,34 @@ Longest: 1</p> @@ -703,34 +704,34 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-09-15</td>
<td align="center">N3</td>
<td align="center">2011-04-01</td>
<td align="center">Y2</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">R</td>
<td align="center">FALSE</td>
<td align="center">R</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2010-10-06</td>
<td align="center">N3</td>
<td align="center">2011-04-27</td>
<td align="center">Y2</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="even">
<td align="center">8</td>
<td align="center">2010-11-30</td>
<td align="center">N3</td>
<td align="center">2011-05-27</td>
<td align="center">Y2</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>
@ -739,11 +740,11 @@ Longest: 1</p> @@ -739,11 +740,11 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-01-27</td>
<td align="center">N3</td>
<td align="center">2011-07-05</td>
<td align="center">Y2</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">S</td>
<td align="center">FALSE</td>
@ -751,29 +752,44 @@ Longest: 1</p> @@ -751,29 +752,44 @@ Longest: 1</p>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-01-30</td>
<td align="center">N3</td>
<td align="center">2011-09-25</td>
<td align="center">Y2</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Instead of 1, now 7 isolates are flagged. In total, 78.7% of all isolates are marked ‘first weighted’ - 50.4% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>Instead of 2, now 10 isolates are flagged. In total, 78.3% of all isolates are marked ‘first weighted’ - 49.8% 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"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">&lt;-</span> <span class="no">data</span> <span class="kw">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</pre></body></html></div>
<p>So we end up with 15,740 isolates for analysis.</p>
<p>So we end up with 15,664 isolates for analysis.</p>
<p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">&lt;-</span> <span class="no">data_1st</span> <span class="kw">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(-<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">first</span>, <span class="no">keyab</span>))</pre></body></html></div>
<p>Now our data looks like:</p>
<div class="sourceCode" id="cb21"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(<span class="no">data_1st</span>)</pre></body></html></div>
<table class="table">
<colgroup>
<col width="8%">
<col width="8%">
<col width="8%">
<col width="10%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="5%">
<col width="10%">
<col width="11%">
<col width="8%">
<col width="11%">
</colgroup>
<thead><tr class="header">
<th align="center">date</th>
<th align="center">patient_id</th>
@ -791,56 +807,41 @@ Longest: 1</p> @@ -791,56 +807,41 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2014-04-15</td>
<td align="center">I4</td>
<td align="center">Hospital D</td>
<td align="center">2016-01-30</td>
<td align="center">Y5</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</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>
<tr class="even">
<td align="center">2011-02-09</td>
<td align="center">D1</td>
<td align="center">Hospital A</td>
<td align="center">2010-11-13</td>
<td align="center">Y1</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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="odd">
<td align="center">2013-12-16</td>
<td align="center">K4</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-08-23</td>
<td align="center">Z9</td>
<td align="center">2016-07-21</td>
<td align="center">U10</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -850,36 +851,51 @@ Longest: 1</p> @@ -850,36 +851,51 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2010-01-14</td>
<td align="center">N4</td>
<td align="center">Hospital A</td>
<tr class="even">
<td align="center">2013-03-14</td>
<td align="center">Q1</td>
<td align="center">Hospital B</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">M</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="even">
<td align="center">2016-01-31</td>
<td align="center">N1</td>
<td align="center">Hospital D</td>
<tr class="odd">
<td align="center">2013-04-22</td>
<td align="center">O8</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">R</td>
<td align="center">S</td>
<td align="center">M</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="even">
<td align="center">2017-11-14</td>
<td align="center">J4</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">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Time for the analysis!</p>
@ -899,8 +915,8 @@ Longest: 1</p> @@ -899,8 +915,8 @@ Longest: 1</p>
<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(<span class="no">genus</span>, <span class="no">species</span>)</pre></body></html></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 15,740<br>
Available: 15,740 (100%, NA: 0 = 0%)<br>
Length: 15,664<br>
Available: 15,664 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -917,33 +933,33 @@ Longest: 24</p> @@ -917,33 +933,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">7,938</td>
<td align="right">50.43%</td>
<td align="right">7,938</td>
<td align="right">50.43%</td>
<td align="right">7,860</td>
<td align="right">50.18%</td>
<td align="right">7,860</td>
<td align="right">50.18%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">3,883</td>
<td align="right">24.67%</td>
<td align="right">11,821</td>
<td align="right">75.10%</td>
<td align="right">3,867</td>
<td align="right">24.69%</td>
<td align="right">11,727</td>
<td align="right">74.87%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,317</td>
<td align="right">14.72%</td>
<td align="right">14,138</td>
<td align="right">89.82%</td>
<td align="right">2,386</td>
<td align="right">15.23%</td>
<td align="right">14,113</td>
<td align="right">90.10%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,602</td>
<td align="right">10.18%</td>
<td align="right">15,740</td>
<td align="right">1,551</td>
<td align="right">9.90%</td>
<td align="right">15,664</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -970,50 +986,50 @@ Longest: 24</p> @@ -970,50 +986,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">3808</td>
<td align="center">236</td>
<td align="center">3894</td>
<td align="center">7938</td>
<td align="center">3765</td>
<td align="center">268</td>
<td align="center">3827</td>
<td align="center">7860</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">6223</td>
<td align="center">317</td>
<td align="center">1398</td>
<td align="center">7938</td>
<td align="center">6198</td>
<td align="center">319</td>
<td align="center">1343</td>
<td align="center">7860</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">6050</td>
<td align="center">5971</td>
<td align="center">0</td>
<td align="center">1888</td>
<td align="center">7938</td>
<td align="center">1889</td>
<td align="center">7860</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">7130</td>
<td align="center">7088</td>
<td align="center">0</td>
<td align="center">808</td>
<td align="center">7938</td>
<td align="center">772</td>
<td align="center">7860</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">1602</td>
<td align="center">1602</td>
<td align="center">1551</td>
<td align="center">1551</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">1241</td>
<td align="center">61</td>
<td align="center">300</td>
<td align="center">1602</td>
<td align="center">1209</td>
<td align="center">72</td>
<td align="center">270</td>
<td align="center">1551</td>
</tr>
</tbody>
</table>
@ -1036,34 +1052,34 @@ Longest: 24</p> @@ -1036,34 +1052,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">6050</td>
<td align="center">5971</td>
<td align="center">0</td>
<td align="center">1888</td>
<td align="center">7938</td>
<td align="center">1889</td>
<td align="center">7860</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">CIP</td>
<td align="center">1218</td>
<td align="center">1192</td>
<td align="center">0</td>
<td align="center">384</td>
<td align="center">1602</td>
<td align="center">359</td>
<td align="center">1551</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">CIP</td>
<td align="center">2967</td>
<td align="center">2946</td>
<td align="center">0</td>
<td align="center">916</td>
<td align="center">3883</td>
<td align="center">921</td>
<td align="center">3867</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center">CIP</td>
<td align="center">1756</td>
<td align="center">1813</td>
<td align="center">0</td>
<td align="center">561</td>
<td align="center">2317</td>
<td align="center">573</td>
<td align="center">2386</td>
</tr>
</tbody>
</table>
@ -1075,7 +1091,7 @@ Longest: 24</p> @@ -1075,7 +1091,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="cb28"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span>(<span class="no">AMX</span>)
<span class="co"># [1] 0.535324</span></pre></body></html></div>
<span class="co"># [1] 0.5335802</span></pre></body></html></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="cb29"><html><body><pre class="r"><span class="no">data_1st</span> <span class="kw">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(<span class="no">hospital</span>) <span class="kw">%&gt;%</span>
@ -1089,19 +1105,19 @@ Longest: 24</p> @@ -1089,19 +1105,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5322921</td>
<td align="center">0.5286835</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5393839</td>
<td align="center">0.5301545</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5327529</td>
<td align="center">0.5366460</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5348690</td>
<td align="center">0.5447207</td>
</tr>
</tbody>
</table>
@ -1120,23 +1136,23 @@ Longest: 24</p> @@ -1120,23 +1136,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5322921</td>
<td align="center">4738</td>
<td align="center">0.5286835</td>
<td align="center">4846</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5393839</td>
<td align="center">5421</td>
<td align="center">0.5301545</td>
<td align="center">5306</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5327529</td>
<td align="center">2412</td>
<td align="center">0.5366460</td>
<td align="center">2415</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5348690</td>
<td align="center">3169</td>
<td align="center">0.5447207</td>
<td align="center">3097</td>
</tr>
</tbody>
</table>
@ -1157,27 +1173,27 @@ Longest: 24</p> @@ -1157,27 +1173,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.8238851</td>
<td align="center">0.8982111</td>
<td align="center">0.9840010</td>
<td align="center">0.8291349</td>
<td align="center">0.9017812</td>
<td align="center">0.9870229</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8127341</td>
<td align="center">0.8951311</td>
<td align="center">0.9818976</td>
<td align="center">0.8259188</td>
<td align="center">0.8994197</td>
<td align="center">0.9890393</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.8246201</td>
<td align="center">0.9260881</td>
<td align="center">0.9863508</td>
<td align="center">0.8233773</td>
<td align="center">0.9229377</td>
<td align="center">0.9847427</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5463962</td>
<td align="center">0.5481978</td>
<td align="center">0.0000000</td>
<td align="center">0.5463962</td>
<td align="center">0.5481978</td>
</tr>
</tbody>
</table>

15
docs/articles/AMR_files/accessible-code-block-0.0.1/empty-anchor.js

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.