* Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`:
* A NOTE for having a data directory over 3 MB. This is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this pacakge. Has been this way since version 0.3.0.
* This package writes lines to `[user library]/AMR/mo_history/mo_history.csv` when using the `as.mo()` function, in the exact same way (and borrowed from) the `extrafont` package on CRAN (version 0.17) writes to their user library package folder. Users are notified about this with a `message()` and staged install on R >= 3.6.0 still works. The CSV file is never newly created or deleted by this package, it only changes this file to improve speed and reliability of the `as.mo()` function. See the source code of `set_mo_history()` and `clear_mo_history()`.
* This package writes lines to `[library path]/AMR/mo_history/mo_history.csv` when using the `as.mo()` function, in the exact same way (and borrowed from) the `extrafont` package on CRAN (version 0.17) writes to the user library path. Users are notified about this with a `message()`, and staged install on R >= 3.6.0 still works. The CSV file is never newly created or deleted by this package, it only changes this file to improve speed and reliability of the `as.mo()` function. See the source code of functions `set_mo_history()` and `clear_mo_history()` in file `R/mo_history.R`.
<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 <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 12 October 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 <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 13 October 2019.</p>
<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><ahref="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
<aclass="sourceLine"id="cb15-25"data-line-number="25"><spanclass="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,325 values changed)</span></a>
<aclass="sourceLine"id="cb15-25"data-line-number="25"><spanclass="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,290 values changed)</span></a>
<aclass="sourceLine"id="cb15-26"data-line-number="26"><spanclass="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
<aclass="sourceLine"id="cb15-27"data-line-number="27"><spanclass="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
<aclass="sourceLine"id="cb15-29"data-line-number="29"><spanclass="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
<aclass="sourceLine"id="cb15-30"data-line-number="30"><spanclass="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
<aclass="sourceLine"id="cb15-31"data-line-number="31"><spanclass="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a>
@ -453,24 +453,24 @@
<aclass="sourceLine"id="cb15-33"data-line-number="33"><spanclass="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a>
<aclass="sourceLine"id="cb15-35"data-line-number="35"><spanclass="co"># Other rules</span></a>
<aclass="sourceLine"id="cb15-36"data-line-number="36"><spanclass="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,240 values changed)</span></a>
<aclass="sourceLine"id="cb15-37"data-line-number="37"><spanclass="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (134 values changed)</span></a>
<aclass="sourceLine"id="cb15-36"data-line-number="36"><spanclass="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,293 values changed)</span></a>
<aclass="sourceLine"id="cb15-37"data-line-number="37"><spanclass="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (126 values changed)</span></a>
<aclass="sourceLine"id="cb15-38"data-line-number="38"><spanclass="co"># Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a>
<aclass="sourceLine"id="cb15-39"data-line-number="39"><spanclass="co"># Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
<aclass="sourceLine"id="cb15-40"data-line-number="40"><spanclass="co"># Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a>
<aclass="sourceLine"id="cb15-41"data-line-number="41"><spanclass="co"># Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
<aclass="sourceLine"id="cb15-44"data-line-number="44"><spanclass="co"># EUCAST rules affected 6,530 out of 20,000 rows, making a total of 7,872 edits</span></a>
<aclass="sourceLine"id="cb15-44"data-line-number="44"><spanclass="co"># EUCAST rules affected 6,534 out of 20,000 rows, making a total of 7,894 edits</span></a>
<aclass="sourceLine"id="cb15-45"data-line-number="45"><spanclass="co"># => added 0 test results</span></a>
<aclass="sourceLine"id="cb15-56"data-line-number="56"><spanclass="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>
@ -498,7 +498,7 @@
<aclass="sourceLine"id="cb17-3"data-line-number="3"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `bacteria` as input for `col_mo`.</span></a>
<aclass="sourceLine"id="cb17-4"data-line-number="4"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `date` as input for `col_date`.</span></a>
<aclass="sourceLine"id="cb17-5"data-line-number="5"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<aclass="sourceLine"id="cb17-6"data-line-number="6"><spanclass="co"># => Found 5,669 first isolates (28.3% of total)</span></a></code></pre></div>
<aclass="sourceLine"id="cb17-6"data-line-number="6"><spanclass="co"># => Found 5,663 first isolates (28.3% of total)</span></a></code></pre></div>
<p>So only 28.3% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</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 H5, 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 X9, sorted on date:</p>
<tableclass="table">
<thead><trclass="header">
<thalign="center">isolate</th>
@ -525,10 +525,10 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-04-02</td>
<tdalign="center">H5</td>
<tdalign="center">2010-01-31</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -536,10 +536,10 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-05-11</td>
<tdalign="center">H5</td>
<tdalign="center">2010-04-03</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -547,21 +547,21 @@
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-08-11</td>
<tdalign="center">H5</td>
<tdalign="center">2010-05-12</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-08-26</td>
<tdalign="center">H5</td>
<tdalign="center">2010-08-29</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -569,10 +569,10 @@
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-11-17</td>
<tdalign="center">H5</td>
<tdalign="center">2011-01-07</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -580,54 +580,54 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-12-20</td>
<tdalign="center">H5</td>
<tdalign="center">2011-04-20</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2011-03-21</td>
<tdalign="center">H5</td>
<tdalign="center">2011-06-24</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2011-04-16</td>
<tdalign="center">H5</td>
<tdalign="center">2011-07-10</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-07-03</td>
<tdalign="center">H5</td>
<tdalign="center">2011-11-07</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-07-07</td>
<tdalign="center">H5</td>
<tdalign="center">2011-12-20</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -646,7 +646,7 @@
<aclass="sourceLine"id="cb20-7"data-line-number="7"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<aclass="sourceLine"id="cb20-8"data-line-number="8"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
<aclass="sourceLine"id="cb20-9"data-line-number="9"><spanclass="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a>
<aclass="sourceLine"id="cb20-10"data-line-number="10"><spanclass="co"># => Found 15,117 first weighted isolates (75.6% of total)</span></a></code></pre></div>
<aclass="sourceLine"id="cb20-10"data-line-number="10"><spanclass="co"># => Found 15,141 first weighted isolates (75.7% of total)</span></a></code></pre></div>
<tableclass="table">
<thead><trclass="header">
<thalign="center">isolate</th>
@ -663,10 +663,10 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-04-02</td>
<tdalign="center">H5</td>
<tdalign="center">2010-01-31</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -675,10 +675,10 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-05-11</td>
<tdalign="center">H5</td>
<tdalign="center">2010-04-03</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -687,22 +687,22 @@
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-08-11</td>
<tdalign="center">H5</td>
<tdalign="center">2010-05-12</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-08-26</td>
<tdalign="center">H5</td>
<tdalign="center">2010-08-29</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -711,10 +711,10 @@
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-11-17</td>
<tdalign="center">H5</td>
<tdalign="center">2011-01-07</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -723,58 +723,58 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-12-20</td>
<tdalign="center">H5</td>
<tdalign="center">2011-04-20</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2011-03-21</td>
<tdalign="center">H5</td>
<tdalign="center">2011-06-24</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2011-04-16</td>
<tdalign="center">H5</td>
<tdalign="center">2011-07-10</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-07-03</td>
<tdalign="center">H5</td>
<tdalign="center">2011-11-07</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-07-07</td>
<tdalign="center">H5</td>
<tdalign="center">2011-12-20</td>
<tdalign="center">X9</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -783,11 +783,11 @@
</tr>
</tbody>
</table>
<p>Instead of 2, now 8 isolates are flagged. In total, 75.6% 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>Instead of 2, now 8 isolates are flagged. In total, 75.7% of all isolates are marked ‘first weighted’ - 47.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>As with <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
<p>The functions <code><ahref="../reference/portion.html">portion_S()</a></code>, <code><ahref="../reference/portion.html">portion_SI()</a></code>, <code><ahref="../reference/portion.html">portion_I()</a></code>, <code><ahref="../reference/portion.html">portion_IR()</a></code> and <code><ahref="../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><ahref="../reference/portion.html">portion_R()</a></code>) and susceptibility as the portion of S and I (<code><ahref="../reference/portion.html">portion_SI()</a></code>). These functions can be used on their own:</p>
<p>Or can be used in conjuction with <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8="crossorigin="anonymous"></script><!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0="crossorigin="anonymous">
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8="crossorigin="anonymous"></script><!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css"integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78="crossorigin="anonymous">
<p>Developed by <ahref="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <ahref="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <ahref="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <ahref="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>, <ahref="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>.</p>
<p>Developed by <ahref="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <ahref="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <ahref="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <ahref="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>, <ahref="https://www.rug.nl/staff/c.j.albers/">Casper J. Albers</a>, <ahref="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>.</p>
</div>
<divclass="pkgdown">
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8="crossorigin="anonymous"></script><!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0="crossorigin="anonymous">