#' \item{\code{"Streptococcus group B (known as S. agalactiae)"}. The text between brackets will be removed and a warning will be thrown that the result \emph{Streptococcus group B} (\code{B_STRPT_GRB}) needs review.}
#' \item{\code{"S. aureus - please mind: MRSA"}. The last word will be stripped, after which the function will try to find a match. If it does not, the second last word will be stripped, etc. Again, a warning will be thrown that the result \emph{Staphylococcus aureus} (\code{B_STPHY_AUR}) needs review.}
#' \item{\code{"D. spartina"}. This is the abbreviation of an old taxonomic name: \emph{Didymosphaeria spartinae} (the last "e" was missing from the input). This fungus was renamed to \emph{Leptosphaeria obiones}, so a warning will be thrown that this result (\code{F_LPTSP_OBI}) needs review.}
#' \item{\code{"Fluoroquinolone-resistant Neisseria gonorrhoeae"}. The first word will be stripped, after which the function will try to find a match. A warning will be thrown that the result \emph{Neisseria gonorrhoeae} (\code{B_NESSR_GON}) needs review.}
<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/">RMarkdown</a>. However, the methodology remains unchanged. This page was generated on 22 February 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/">RMarkdown</a>. However, the methodology remains unchanged. This page was generated on 23 February 2019.</p>
<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><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="cb14-22"title="22"><spanclass="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1284 changes)</span></a>
<aclass="sourceLine"id="cb14-22"title="22"><spanclass="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1334 changes)</span></a>
<aclass="sourceLine"id="cb14-23"title="23"><spanclass="co">#> Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
<aclass="sourceLine"id="cb14-24"title="24"><spanclass="co">#> Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
<aclass="sourceLine"id="cb14-25"title="25"><spanclass="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2790 changes)</span></a>
<aclass="sourceLine"id="cb14-25"title="25"><spanclass="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2731 changes)</span></a>
<aclass="sourceLine"id="cb14-26"title="26"><spanclass="co">#> Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
<aclass="sourceLine"id="cb14-27"title="27"><spanclass="co">#> Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
<aclass="sourceLine"id="cb14-28"title="28"><spanclass="co">#> Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)</span></a>
@ -462,9 +462,9 @@
@@ -462,9 +462,9 @@
<aclass="sourceLine"id="cb14-38"title="38"><spanclass="co">#> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
<aclass="sourceLine"id="cb14-39"title="39"><spanclass="co">#> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
<aclass="sourceLine"id="cb14-41"title="41"><spanclass="co">#> => EUCAST rules affected 7,321 out of 20,000 rows</span></a>
<aclass="sourceLine"id="cb14-41"title="41"><spanclass="co">#> => EUCAST rules affected 7,419 out of 20,000 rows</span></a>
<aclass="sourceLine"id="cb14-42"title="42"><spanclass="co">#> -> added 0 test results</span></a>
<aclass="sourceLine"id="cb14-43"title="43"><spanclass="co">#> -> changed 4,074 test results (0 to S; 0 to I; 4,074 to R)</span></a></code></pre></div>
<aclass="sourceLine"id="cb14-43"title="43"><spanclass="co">#> -> changed 4,065 test results (0 to S; 0 to I; 4,065 to R)</span></a></code></pre></div>
<aclass="sourceLine"id="cb16-3"title="3"><spanclass="co">#></span><spanclass="al">NOTE</span><spanclass="co">: Using column `bacteria` as input for `col_mo`.</span></a>
<aclass="sourceLine"id="cb16-4"title="4"><spanclass="co">#></span><spanclass="al">NOTE</span><spanclass="co">: Using column `date` as input for `col_date`.</span></a>
<aclass="sourceLine"id="cb16-5"title="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="cb16-6"title="6"><spanclass="co">#> => Found 5,680 first isolates (28.4% of total)</span></a></code></pre></div>
<p>So only 28.4% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<aclass="sourceLine"id="cb16-6"title="6"><spanclass="co">#> => Found 5,667 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>For future use, the above two syntaxes can be shortened with the <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
@ -516,10 +516,10 @@
@@ -516,10 +516,10 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-01-10</td>
<tdalign="center">X9</td>
<tdalign="center">2010-02-08</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -527,43 +527,43 @@
@@ -527,43 +527,43 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-04-18</td>
<tdalign="center">X9</td>
<tdalign="center">2010-04-06</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-07-02</td>
<tdalign="center">X9</td>
<tdalign="center">2010-04-25</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-09-21</td>
<tdalign="center">X9</td>
<tdalign="center">2010-10-05</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-09-22</td>
<tdalign="center">X9</td>
<tdalign="center">2010-11-09</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -571,58 +571,58 @@
@@ -571,58 +571,58 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">X9</td>
<tdalign="center">2010-11-23</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-10-14</td>
<tdalign="center">X9</td>
<tdalign="center">2010-12-26</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2011-01-09</td>
<tdalign="center">X9</td>
<tdalign="center">2011-01-01</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-03-31</td>
<tdalign="center">X9</td>
<tdalign="center">2011-01-21</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-03-31</td>
<tdalign="center">X9</td>
<tdalign="center">2011-02-28</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
</tr>
</tbody>
</table>
@ -637,7 +637,7 @@
@@ -637,7 +637,7 @@
<aclass="sourceLine"id="cb19-7"title="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="cb19-8"title="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="cb19-9"title="9"><spanclass="co">#> [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
<aclass="sourceLine"id="cb19-10"title="10"><spanclass="co">#> => Found 15,854 first weighted isolates (79.3% of total)</span></a></code></pre></div>
<aclass="sourceLine"id="cb19-10"title="10"><spanclass="co">#> => Found 15,851 first weighted isolates (79.3% of total)</span></a></code></pre></div>
<tableclass="table">
<thead><trclass="header">
<thalign="center">isolate</th>
@ -654,10 +654,10 @@
@@ -654,10 +654,10 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-01-10</td>
<tdalign="center">X9</td>
<tdalign="center">2010-02-08</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -666,46 +666,46 @@
@@ -666,46 +666,46 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-04-18</td>
<tdalign="center">X9</td>
<tdalign="center">2010-04-06</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-07-02</td>
<tdalign="center">X9</td>
<tdalign="center">2010-04-25</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-09-21</td>
<tdalign="center">X9</td>
<tdalign="center">2010-10-05</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-09-22</td>
<tdalign="center">X9</td>
<tdalign="center">2010-11-09</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -714,23 +714,23 @@
@@ -714,23 +714,23 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">X9</td>
<tdalign="center">2010-11-23</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-10-14</td>
<tdalign="center">X9</td>
<tdalign="center">2010-12-26</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
@ -738,47 +738,47 @@
@@ -738,47 +738,47 @@
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2011-01-09</td>
<tdalign="center">X9</td>
<tdalign="center">2011-01-01</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-03-31</td>
<tdalign="center">X9</td>
<tdalign="center">2011-01-21</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">I</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="even">
<tdalign="center">10</td>
<tdalign="center">2011-03-31</td>
<tdalign="center">X9</td>
<tdalign="center">2011-02-28</td>
<tdalign="center">H1</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Instead of 2, now 8 isolates are flagged. In total, 79.3% of all isolates are marked โfirst weightedโ - 50.9% 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, 79.3% of all isolates are marked โfirst weightedโ - 50.9% 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>portion_R</code>, <code>portion_RI</code>, <code>portion_I</code>, <code>portion_IS</code> and <code>portion_S</code> can be used to determine the portion of a specific antimicrobial outcome. They 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>
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found.</p>
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Mycoplasma leonicaptivi</em> (<code>B_MYCPL_LEO</code>), a bug probably never found before in humans:</p>