Browse Source

fixes for microorganisms.codes

new-mo-algorithm
parent
commit
27380fa021
  1. 4
      DESCRIPTION
  2. 4
      NEWS.md
  3. 21
      R/mo.R
  4. 2
      R/mo_property.R
  5. 3
      _pkgdown.yml
  6. BIN
      data/microorganisms.codes.rda
  7. 2
      docs/LICENSE-text.html
  8. 409
      docs/articles/AMR.html
  9. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  10. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  11. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  12. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  13. 4
      docs/articles/EUCAST.html
  14. 4
      docs/articles/G_test.html
  15. 46
      docs/articles/MDR.html
  16. 10
      docs/articles/SPSS.html
  17. 10
      docs/articles/WHONET.html
  18. 4
      docs/articles/ab_property.html
  19. 72
      docs/articles/benchmarks.html
  20. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png
  21. 36
      docs/articles/freq.html
  22. 2
      docs/articles/index.html
  23. 4
      docs/articles/mo_property.html
  24. 4
      docs/articles/resistance_predict.html
  25. 2
      docs/authors.html
  26. 5
      docs/extra.css
  27. 5
      docs/extra.js
  28. 2
      docs/index.html
  29. 8
      docs/news/index.html
  30. 9
      docs/reference/AMR-deprecated.html
  31. 9
      docs/reference/AMR.html
  32. 9
      docs/reference/WHOCC.html
  33. 9
      docs/reference/WHONET.html
  34. 9
      docs/reference/ab_property.html
  35. 9
      docs/reference/age.html
  36. 9
      docs/reference/age_groups.html
  37. 9
      docs/reference/as.atc.html
  38. 9
      docs/reference/as.disk.html
  39. 9
      docs/reference/as.mic.html
  40. 9
      docs/reference/as.mo.html
  41. 9
      docs/reference/atc_online.html
  42. 9
      docs/reference/availability.html
  43. 9
      docs/reference/catalogue_of_life.html
  44. 9
      docs/reference/catalogue_of_life_version.html
  45. 9
      docs/reference/filter_ab_class.html
  46. 9
      docs/reference/first_isolate.html
  47. 9
      docs/reference/freq.html
  48. 9
      docs/reference/g.test.html
  49. 9
      docs/reference/guess_ab_col.html
  50. 2
      docs/reference/index.html
  51. 9
      docs/reference/join.html
  52. 2
      docs/reference/key_antibiotics.html
  53. 9
      docs/reference/kurtosis.html
  54. 9
      docs/reference/like.html
  55. 2
      docs/reference/mdro.html
  56. 9
      docs/reference/microorganisms.codes.html
  57. 9
      docs/reference/microorganisms.html
  58. 9
      docs/reference/microorganisms.old.html
  59. 9
      docs/reference/mo_property.html
  60. 9
      docs/reference/mo_source.html
  61. 9
      docs/reference/p.symbol.html
  62. 2
      docs/reference/portion.html
  63. 9
      docs/reference/read.4D.html
  64. 9
      docs/reference/resistance_predict.html
  65. 9
      docs/reference/rsi_translation.html
  66. 9
      docs/reference/septic_patients.html
  67. 9
      docs/reference/skewness.html
  68. 9
      docs/reference/translate.html
  69. 8
      git_premaster.sh
  70. 5
      pkgdown/extra.css
  71. 5
      pkgdown/extra.js
  72. 3
      tests/testthat/test-data.R
  73. 6
      vignettes/SPSS.Rmd

4
DESCRIPTION

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Package: AMR
Version: 0.6.1.9037
Date: 2019-05-23
Version: 0.6.1.9040
Date: 2019-05-28
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(

4
NEWS.md

@ -28,13 +28,15 @@ @@ -28,13 +28,15 @@
* Frequency tables (`freq()`):
* speed improvement for microbial IDs
* fixed level names in markdown
*
* Removed all hardcoded EUCAST rules and replaced them with a new reference file: `./inst/eucast/eucast.tsv`
* Added ceftazidim intrinsic resistance to *Streptococci*
* Changed default settings for `age_groups()`, to let groups of fives and tens end with 100+ instead of 120+
* Fix for `freq()` for when all values are `NA`
* Fix for `first_isolate()` for when dates are missing
* Improved speed of `guess_ab_col()`
* Function `as.mo()` now gently interprets any number of whitespace characters (like tabs) as one space
* Small algorithm fix for `as.mo()`
* Removed viruses from data set `microorganisms.codes` and cleaned it up
#### Other
* Support for R 3.6.0

21
R/mo.R

@ -456,10 +456,19 @@ exec_as.mo <- function(x, @@ -456,10 +456,19 @@ exec_as.mo <- function(x,
} else if (!all(x %in% AMR::microorganisms[, property])) {
strip_whitespace <- function(x) {
# all whitespaces (tab, new lines, etc.) should be one space
# and spaces before and after should be omitted
trimws(gsub("[\\s]+", " ", x, perl = TRUE), which = "both")
}
x <- strip_whitespace(x)
x_backup <- x
# remove spp and species
x <- trimws(gsub(" +(spp.?|ssp.?|sp.? |ss ?.?|subsp.?|subspecies|biovar |serovar |species)", " ", x_backup, ignore.case = TRUE), which = "both")
x <- gsub(" +(spp.?|ssp.?|sp.? |ss ?.?|subsp.?|subspecies|biovar |serovar |species)", " ", x_backup, ignore.case = TRUE)
x <- strip_whitespace(x)
x_backup_without_spp <- x
x_species <- paste(x, "species")
# translate to English for supported languages of mo_property
@ -487,8 +496,8 @@ exec_as.mo <- function(x, @@ -487,8 +496,8 @@ exec_as.mo <- function(x,
x <- gsub("e+", "e+", x, ignore.case = TRUE)
x <- gsub("o+", "o+", x, ignore.case = TRUE)
# but spaces before and after should be omitted
x <- trimws(x, which = "both")
x <- strip_whitespace(x)
x_trimmed <- x
x_trimmed_species <- paste(x_trimmed, "species")
x_trimmed_without_group <- gsub(" gro.u.p$", "", x_trimmed, ignore.case = TRUE)
@ -1063,7 +1072,7 @@ exec_as.mo <- function(x, @@ -1063,7 +1072,7 @@ exec_as.mo <- function(x,
}
}
}
# (6) try to strip off one element from start and check the remains (only allow 2-part name outcome) ----
# (6) try to strip off one element from start and check the remains (only allow >= 2-part name outcome) ----
x_strip <- a.x_backup %>% strsplit(" ") %>% unlist()
if (length(x_strip) > 1 & nchar(g.x_backup_without_spp) >= 6) {
for (i in 2:(length(x_strip))) {
@ -1072,8 +1081,8 @@ exec_as.mo <- function(x, @@ -1072,8 +1081,8 @@ exec_as.mo <- function(x,
if (!empty_result(found)) {
found_result <- found
found <- microorganismsDT[mo == found_result[1L], ..property][[1]]
# uncertainty level 2 only if the fullname contains a space (otherwise it will be found with lvl 3)
if (microorganismsDT[mo == found_result[1L], fullname][[1]] %like% " ") {
# uncertainty level 2 only if searched part contains a space (otherwise it will be found with lvl 3)
if (x_strip_collapsed %like% " ") {
uncertainties <<- rbind(uncertainties,
data.frame(uncertainty = 2,
input = a.x_backup,

2
R/mo_property.R

@ -396,7 +396,7 @@ mo_validate <- function(x, property, ...) { @@ -396,7 +396,7 @@ mo_validate <- function(x, property, ...) {
tryCatch(x[1L] %in% AMR::microorganisms[1, property],
error = function(e) stop(e$message, call. = FALSE))
if (!all(x %in% AMR::microorganisms[, property])
if (!all(x %in% pull(AMR::microorganisms, property))
| Becker %in% c(TRUE, "all")
| Lancefield %in% c(TRUE, "all")) {
exec_as.mo(x, property = property, ...)

3
_pkgdown.yml

@ -177,6 +177,9 @@ authors: @@ -177,6 +177,9 @@ authors:
Bhanu N. M. Sinha:
href: https://www.rug.nl/staff/b.sinha/
development:
mode: release # improves indexing by search engines
template:
assets: pkgdown/logos # use logos in this folder
params:

BIN
data/microorganisms.codes.rda

Binary file not shown.

2
docs/LICENSE-text.html

@ -78,7 +78,7 @@ @@ -78,7 +78,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="Released version">0.6.1.9037</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9040</span>
</span>
</div>

409
docs/articles/AMR.html

@ -40,7 +40,7 @@ @@ -40,7 +40,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="Released version">0.6.1.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9037</span>
</span>
</div>
@ -199,7 +199,7 @@ @@ -199,7 +199,7 @@
<h1>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">23 May 2019</h4>
<h4 class="date">28 May 2019</h4>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -208,7 +208,7 @@ @@ -208,7 +208,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 23 May 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 28 May 2019.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -224,21 +224,21 @@ @@ -224,21 +224,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2019-05-23</td>
<td align="center">2019-05-28</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-05-23</td>
<td align="center">2019-05-28</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-05-23</td>
<td align="center">2019-05-28</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -334,31 +334,31 @@ @@ -334,31 +334,31 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2012-10-26</td>
<td align="center">T6</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">2016-12-11</td>
<td align="center">T9</td>
<td align="center">Hospital B</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">F</td>
</tr>
<tr class="even">
<td align="center">2011-10-13</td>
<td align="center">Y4</td>
<td align="center">2013-02-14</td>
<td align="center">A3</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">Escherichia 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">F</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2010-02-09</td>
<td align="center">O2</td>
<td align="center">Hospital B</td>
<td align="center">2011-05-14</td>
<td align="center">W4</td>
<td align="center">Hospital D</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
@ -367,37 +367,37 @@ @@ -367,37 +367,37 @@
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2010-09-18</td>
<td align="center">T5</td>
<td align="center">Hospital B</td>
<td align="center">2010-02-09</td>
<td align="center">G3</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">S</td>
<td align="center">F</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2017-07-26</td>
<td align="center">J10</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">2016-04-24</td>
<td align="center">B7</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2015-09-19</td>
<td align="center">P5</td>
<td align="center">Hospital D</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">2010-02-20</td>
<td align="center">L7</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia 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">F</td>
<td align="center">M</td>
</tr>
</tbody>
</table>
@ -418,8 +418,8 @@ @@ -418,8 +418,8 @@
#
# Item Count Percent Cum. Count Cum. Percent
# --- ----- ------- -------- ----------- -------------
# 1 M 10,310 51.6% 10,310 51.6%
# 2 F 9,690 48.4% 20,000 100.0%</code></pre>
# 1 M 10,367 51.8% 10,367 51.8%
# 2 F 9,633 48.2% 20,000 100.0%</code></pre>
<p>So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researcher 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" title="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a>
@ -449,14 +449,14 @@ @@ -449,14 +449,14 @@
<a class="sourceLine" id="cb14-18" title="18"><span class="co"># Pasteurella multocida (no new changes)</span></a>
<a class="sourceLine" id="cb14-19" title="19"><span class="co"># Staphylococcus (no new changes)</span></a>
<a class="sourceLine" id="cb14-20" title="20"><span class="co"># Streptococcus groups A, B, C, G (no new changes)</span></a>
<a class="sourceLine" id="cb14-21" title="21"><span class="co"># Streptococcus pneumoniae (1542 new changes)</span></a>
<a class="sourceLine" id="cb14-21" title="21"><span class="co"># Streptococcus pneumoniae (1390 new changes)</span></a>
<a class="sourceLine" id="cb14-22" title="22"><span class="co"># Viridans group streptococci (no new changes)</span></a>
<a class="sourceLine" id="cb14-23" title="23"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-24" title="24"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
<a class="sourceLine" id="cb14-25" title="25"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1286 new changes)</span></a>
<a class="sourceLine" id="cb14-25" title="25"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1264 new changes)</span></a>
<a class="sourceLine" id="cb14-26" title="26"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no new changes)</span></a>
<a class="sourceLine" id="cb14-27" title="27"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no new changes)</span></a>
<a class="sourceLine" id="cb14-28" title="28"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2788 new changes)</span></a>
<a class="sourceLine" id="cb14-28" title="28"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2725 new changes)</span></a>
<a class="sourceLine" id="cb14-29" title="29"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no new changes)</span></a>
<a class="sourceLine" id="cb14-30" title="30"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no new changes)</span></a>
<a class="sourceLine" id="cb14-31" title="31"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no new changes)</span></a>
@ -464,24 +464,24 @@ @@ -464,24 +464,24 @@
<a class="sourceLine" id="cb14-33" title="33"><span class="co"># Table 13: Interpretive rules for quinolones (no new changes)</span></a>
<a class="sourceLine" id="cb14-34" title="34"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-35" title="35"><span class="co"># Other rules</span></a>
<a class="sourceLine" id="cb14-36" title="36"><span class="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2231 new changes)</span></a>
<a class="sourceLine" id="cb14-37" title="37"><span class="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (126 new changes)</span></a>
<a class="sourceLine" id="cb14-36" title="36"><span class="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2301 new changes)</span></a>
<a class="sourceLine" id="cb14-37" title="37"><span class="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (114 new changes)</span></a>
<a class="sourceLine" id="cb14-38" title="38"><span class="co"># Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no new changes)</span></a>
<a class="sourceLine" id="cb14-39" title="39"><span class="co"># Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no new changes)</span></a>
<a class="sourceLine" id="cb14-40" title="40"><span class="co"># Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no new changes)</span></a>
<a class="sourceLine" id="cb14-41" title="41"><span class="co"># Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no new changes)</span></a>
<a class="sourceLine" id="cb14-42" title="42"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-43" title="43"><span class="co"># --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-44" title="44"><span class="co"># EUCAST rules affected 6,562 out of 20,000 rows, making a total of 7,973 edits</span></a>
<a class="sourceLine" id="cb14-44" title="44"><span class="co"># EUCAST rules affected 6,521 out of 20,000 rows, making a total of 7,794 edits</span></a>
<a class="sourceLine" id="cb14-45" title="45"><span class="co"># =&gt; added 0 test results</span></a>
<a class="sourceLine" id="cb14-46" title="46"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-47" title="47"><span class="co"># =&gt; changed 7,973 test results</span></a>
<a class="sourceLine" id="cb14-48" title="48"><span class="co"># - 114 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-49" title="49"><span class="co"># - 4,779 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-50" title="50"><span class="co"># - 1,118 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-51" title="51"><span class="co"># - 330 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-52" title="52"><span class="co"># - 1,606 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-53" title="53"><span class="co"># - 26 test results changed from R to I</span></a>
<a class="sourceLine" id="cb14-47" title="47"><span class="co"># =&gt; changed 7,794 test results</span></a>
<a class="sourceLine" id="cb14-48" title="48"><span class="co"># - 125 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-49" title="49"><span class="co"># - 4,678 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-50" title="50"><span class="co"># - 1,070 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-51" title="51"><span class="co"># - 286 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-52" title="52"><span class="co"># - 1,620 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-53" title="53"><span class="co"># - 15 test results changed from R to I</span></a>
<a class="sourceLine" id="cb14-54" title="54"><span class="co"># --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-55" title="55"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-56" title="56"><span class="co"># Use verbose = TRUE to get a data.frame with all specified edits instead.</span></a></code></pre></div>
@ -509,8 +509,8 @@ @@ -509,8 +509,8 @@
<a class="sourceLine" id="cb16-3" title="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" title="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" title="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" title="6"><span class="co"># =&gt; Found 5,699 first isolates (28.5% of total)</span></a></code></pre></div>
<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>
<a class="sourceLine" id="cb16-6" title="6"><span class="co"># =&gt; Found 5,627 first isolates (28.1% of total)</span></a></code></pre></div>
<p>So only 28.1% 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" title="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" title="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>
@ -536,8 +536,8 @@ @@ -536,8 +536,8 @@
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-04-13</td>
<td align="center">S1</td>
<td align="center">2010-03-09</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
@ -547,10 +547,10 @@ @@ -547,10 +547,10 @@
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-06-02</td>
<td align="center">S1</td>
<td align="center">2010-03-19</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
@ -558,10 +558,10 @@ @@ -558,10 +558,10 @@
</tr>
<tr class="odd">
<td align="center">3</td>
<td align="center">2010-07-21</td>
<td align="center">S1</td>
<td align="center">2010-03-31</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
@ -569,52 +569,52 @@ @@ -569,52 +569,52 @@
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-09-19</td>
<td align="center">S1</td>
<td align="center">2010-05-07</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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="odd">
<td align="center">5</td>
<td align="center">2010-09-19</td>
<td align="center">S1</td>
<td align="center">2010-06-21</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-10-14</td>
<td align="center">S1</td>
<td align="center">2010-07-10</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2010-10-28</td>
<td align="center">S1</td>
<td align="center">2010-11-26</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2010-12-09</td>
<td align="center">S1</td>
<td align="center">2010-12-04</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">R</td>
<td align="center">S</td>
@ -624,29 +624,29 @@ @@ -624,29 +624,29 @@
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2010-12-15</td>
<td align="center">S1</td>
<td align="center">2011-03-19</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-01-07</td>
<td align="center">S1</td>
<td align="center">2011-05-16</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
</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="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" title="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb19-2" title="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>
@ -657,7 +657,7 @@ @@ -657,7 +657,7 @@
<a class="sourceLine" id="cb19-7" title="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" title="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" title="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
<a class="sourceLine" id="cb19-10" title="10"><span class="co"># =&gt; Found 15,125 first weighted isolates (75.6% of total)</span></a></code></pre></div>
<a class="sourceLine" id="cb19-10" title="10"><span class="co"># =&gt; Found 15,074 first weighted isolates (75.4% of total)</span></a></code></pre></div>
<table class="table">
<thead><tr class="header">
<th align="center">isolate</th>
@ -674,8 +674,8 @@ @@ -674,8 +674,8 @@
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2010-04-13</td>
<td align="center">S1</td>
<td align="center">2010-03-09</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
@ -686,22 +686,22 @@ @@ -686,22 +686,22 @@
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2010-06-02</td>
<td align="center">S1</td>
<td align="center">2010-03-19</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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-07-21</td>
<td align="center">S1</td>
<td align="center">2010-03-31</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
@ -710,56 +710,56 @@ @@ -710,56 +710,56 @@
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-09-19</td>
<td align="center">S1</td>
<td align="center">2010-05-07</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2010-09-19</td>
<td align="center">S1</td>
<td align="center">2010-06-21</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2010-10-14</td>
<td align="center">S1</td>
<td align="center">2010-07-10</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2010-10-28</td>
<td align="center">S1</td>
<td align="center">2010-11-26</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2010-12-09</td>
<td align="center">S1</td>
<td align="center">2010-12-04</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">R</td>
<td align="center">S</td>
@ -770,35 +770,35 @@ @@ -770,35 +770,35 @@
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2010-12-15</td>
<td align="center">S1</td>
<td align="center">2011-03-19</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-01-07</td>
<td align="center">S1</td>
<td align="center">2011-05-16</td>
<td align="center">J4</td>
<td align="center">B_ESCHR_COL</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>
<td align="center">TRUE</td>
<td align="center">FALSE</td>
</tr>
</tbody>
</table>
<p>Instead of 1, now 7 isolates are flagged. In total, 75.6% of all isolates are marked ‘first weighted’ - 47.1% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>Instead of 2, now 7 isolates are flagged. In total, 75.4% of all isolates are marked ‘first weighted’ - 47.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>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" title="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" title="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 15,125 isolates for analysis.</p>
<p>So we end up with 15,074 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" title="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" title="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://www.rdocumentation.org/packages/base/topics/c">c</a></span>(first, keyab))</a></code></pre></div>
@ -806,7 +806,6 @@ @@ -806,7 +806,6 @@
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">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>
@ -823,42 +822,39 @@ @@ -823,42 +822,39 @@
</tr></thead>
<tbody>
<tr class="odd">
<td>1</td>
<td align="center">2012-10-26</td>
<td align="center">T6</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AUR</td>
<td align="center">R</td>
<td align="center">2016-12-11</td>
<td align="center">T9</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COL</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 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>2</td>
<td align="center">2011-10-13</td>
<td align="center">Y4</td>
<td align="center">2013-02-14</td>
<td align="center">A3</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNE</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td>3</td>
<td align="center">2010-02-09</td>
<td align="center">O2</td>
<td align="center">Hospital B</td>
<td align="center">2011-05-14</td>
<td align="center">W4</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNE</td>
<td align="center">R</td>
<td align="center">R</td>
@ -871,48 +867,45 @@ @@ -871,48 +867,45 @@
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td>6</td>
<td align="center">2015-09-19</td>
<td align="center">P5</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNE</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">2010-02-09</td>
<td align="center">G3</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COL</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td>7</td>
<td align="center">2011-05-13</td>
<td align="center">X5</td>
<td align="center">Hospital B</td>
<td align="center">2016-04-24</td>
<td align="center">B7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COL</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">S</td>
<td align="center">M</td>
<td align="center">Gram negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td>8</td>
<td align="center">2015-03-07</td>
<td align="center">Z7</td>
<td align="center">2010-02-20</td>
<td align="center">L7</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COL</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">F</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
@ -935,9 +928,9 @@ @@ -935,9 +928,9 @@
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(data_1st<span class="op">$</span>genus, data_1st<span class="op">$</span>species))</a></code></pre></div>
<p>Or can be used like the <code>dplyr</code> way, which is easier readable:</p>
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,125 x 13)</strong></p>
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,074 x 13)</strong></p>
<p>Columns: 2<br>
Length: 15,125 (of which NA: 0 = 0.00%)<br>
Length: 15,074 (of which NA: 0 = 0.00%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -954,33 +947,33 @@ Longest: 24</p> @@ -954,33 +947,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">7,486</td>
<td align="right">49.5%</td>
<td align="right">7,486</td>
<td align="right">49.5%</td>
<td align="right">7,504</td>
<td align="right">49.8%</td>
<td align="right">7,504</td>
<td align="right">49.8%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">3,731</td>
<td align="right">24.7%</td>
<td align="right">11,217</td>
<td align="right">74.2%</td>
<td align="right">3,702</td>
<td align="right">24.6%</td>
<td align="right">11,206</td>
<td align="right">74.3%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,360</td>
<td align="right">15.6%</td>
<td align="right">13,577</td>
<td align="right">89.8%</td>
<td align="right">2,313</td>
<td align="right">15.3%</td>
<td align="right">13,519</td>
<td align="right">89.7%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,548</td>
<td align="right">10.2%</td>
<td align="right">15,125</td>
<td align="right">1,555</td>
<td align="right">10.3%</td>
<td align="right">15,074</td>
<td align="right">100.0%</td>
</tr>
</tbody>
@ -991,7 +984,7 @@ Longest: 24</p> @@ -991,7 +984,7 @@ Longest: 24</p>
<a href="#resistance-percentages" class="anchor"></a>Resistance percentages</h2>
<p>The functions <code><a href="../reference/portion.html">portion_S()</a></code>, <code><a href="../reference/portion.html">portion_SI()</a></code>, <code><a href="../reference/portion.html">portion_I()</a></code>, <code><a href="../reference/portion.html">portion_IR()</a></code> and <code><a href="../reference/portion.html">portion_R()</a></code> can be used to determine the portion of a specific antimicrobial outcome. As per the EUCAST guideline of 2019, we calculate resistance as the portion of R (<code><a href="../reference/portion.html">portion_R()</a></code>) and susceptibility as the portion of S and I (<code><a href="../reference/portion.html">portion_SI()</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" title="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_R</a></span>(AMX)</a>
<a class="sourceLine" id="cb25-2" title="2"><span class="co"># [1] 0.4628099</span></a></code></pre></div>
<a class="sourceLine" id="cb25-2" title="2"><span class="co"># [1] 0.4647738</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" title="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb26-2" title="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>
@ -1004,19 +997,19 @@ Longest: 24</p> @@ -1004,19 +997,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.4556355</td>
<td align="center">0.4603103</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.4661553</td>
<td align="center">0.4641985</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.4759657</td>
<td align="center">0.4670185</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.4577347</td>
<td align="center">0.4706464</td>
</tr>
</tbody>
</table>
@ -1034,23 +1027,23 @@ Longest: 24</p> @@ -1034,23 +1027,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.4556355</td>
<td align="center">4587</td>
<td align="center">0.4603103</td>
<td align="center">4447</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.4661553</td>
<td align="center">5215</td>
<td align="center">0.4641985</td>
<td align="center">5321</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.4759657</td>
<td align="center">2330</td>
<td align="center">0.4670185</td>
<td align="center">2274</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.4577347</td>
<td align="center">2993</td>
<td align="center">0.4706464</td>
<td align="center">3032</td>
</tr>
</tbody>
</table>
@ -1070,27 +1063,27 @@ Longest: 24</p> @@ -1070,27 +1063,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.9226556</td>
<td align="center">0.8966070</td>
<td align="center">0.9941224</td>
<td align="center">0.9235075</td>
<td align="center">0.8956557</td>
<td align="center">0.9941365</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8113695</td>
<td align="center">0.9102067</td>
<td align="center">0.9909561</td>
<td align="center">0.8135048</td>
<td align="center">0.8926045</td>
<td align="center">0.9858521</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.9187885</td>
<td align="center">0.9193246</td>
<td align="center">0.9949075</td>
<td align="center">0.9240951</td>
<td align="center">0.9289573</td>
<td align="center">0.9972988</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.6152542</td>
<td align="center">0.6182447</td>
<td align="center">0.0000000</td>
<td align="center">0.6152542</td>
<td align="center">0.6182447</td>
</tr>
</tbody>
</table>

BIN
docs/articles/AMR_files/figure-html/plot 1-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
docs/articles/AMR_files/figure-html/plot 3-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/articles/AMR_files/figure-html/plot 4-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

BIN
docs/articles/AMR_files/figure-html/plot 5-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

4
docs/articles/EUCAST.html

@ -40,7 +40,7 @@ @@ -40,7 +40,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="Released version">0.6.1.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9037</span>