@ -78,11 +78,18 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
@@ -78,11 +78,18 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
* Functions `atc_ddd()` and `atc_groups()` have been renamed `atc_online_ddd()` and `atc_online_groups()`. The old functions are deprecated and will be removed in a future version.
* Function `guess_mo()` is now deprecated in favour of `as.mo()` and will be removed in future versions
* Function `guess_atc()` is now deprecated in favour of `as.atc()` and will be removed in future versions
* Improvements for `as.mo()`:
* Improvements for `as.mo()`:\
* Incoercible results will now be considered 'unknown', MO code `UNKNOWN`. Properties of these will be translated on foreign systems in all language already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:
```r
mo_genus("qwerty", language = "es")
# Warning:
# one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.
#> [1] "(género desconocido)"
```
* Fix for vector containing only empty values
* Finds better results when input is in other languages
* Better handling for subspecies
* Better handling for *Salmonellae*
* Better handling for *Salmonellae*, especially the 'city like' serovars like *Salmonella London*
* Understanding of highly virulent *E. coli* strains like EIEC, EPEC and STEC
* There will be looked for uncertain results at default - these results will be returned with an informative warning
* Manual (help page) now contains more info about the algorithms
@ -102,7 +109,9 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
@@ -102,7 +109,9 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
* New colours for `scale_rsi_colours()`
* Summaries of class `mo` will now return the top 3 and the unique count, e.g. using `summary(mo)`
* Small text updates to summaries of class `rsi` and `mic`
* Function `as.rsi()` now gives a warning when inputting MIC values
* Function `as.rsi()`:
* Now gives a warning when inputting MIC values
* Now accepts high and low resistance: `"HIGH S"` will return `S`
* Frequency tables (`freq()` function):
* Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:
#' A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by \code{\link{as.mo}}.
#' @inheritSection catalogue_of_life Catalogue of Life
#' @format A \code{\link{data.frame}} with 14,487 observations and 4 variables:
#' @format A \code{\link{data.frame}} with 17,069 observations and 4 variables:
#' \describe{
#' \item{\code{col_id}}{Catalogue of Life ID}
#' \item{\code{tsn_new}}{New Catalogue of Life ID}
<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 01 March 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 02 March 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 (1364 changes)</span></a>
<aclass="sourceLine"id="cb14-22"title="22"><spanclass="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1323 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 (2659 changes)</span></a>
<aclass="sourceLine"id="cb14-25"title="25"><spanclass="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2834 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,366 out of 20,000 rows</span></a>
<aclass="sourceLine"id="cb14-41"title="41"><spanclass="co">#> => EUCAST rules affected 7,524 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,023 test results (0 to S; 0 to I; 4,023 to R)</span></a></code></pre></div>
<aclass="sourceLine"id="cb14-43"title="43"><spanclass="co">#> -> changed 4,157 test results (0 to S; 0 to I; 4,157 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,641 first isolates (28.2% of total)</span></a></code></pre></div>
<p>So only 28.2% 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,698 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><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-14</td>
<tdalign="center">K8</td>
<tdalign="center">2010-01-18</td>
<tdalign="center">C7</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,30 +527,30 @@
@@ -527,30 +527,30 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-02-17</td>
<tdalign="center">K8</td>
<tdalign="center">2010-02-27</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</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="odd">
<tdalign="center">3</td>
<tdalign="center">2010-03-01</td>
<tdalign="center">K8</td>
<tdalign="center">2010-04-22</td>
<tdalign="center">C7</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">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-03-11</td>
<tdalign="center">K8</td>
<tdalign="center">2010-06-09</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -560,54 +560,54 @@
@@ -560,54 +560,54 @@
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-04-13</td>
<tdalign="center">K8</td>
<tdalign="center">2011-04-13</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-08-30</td>
<tdalign="center">K8</td>
<tdalign="center">2011-04-25</td>
<tdalign="center">C7</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">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-11-05</td>
<tdalign="center">K8</td>
<tdalign="center">2011-08-02</td>
<tdalign="center">C7</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="even">
<tdalign="center">8</td>
<tdalign="center">2010-12-21</td>
<tdalign="center">K8</td>
<tdalign="center">2011-10-19</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2010-12-21</td>
<tdalign="center">K8</td>
<tdalign="center">2011-10-23</td>
<tdalign="center">C7</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>
@ -615,14 +615,14 @@
@@ -615,14 +615,14 @@
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-03-20</td>
<tdalign="center">K8</td>
<tdalign="center">2011-11-10</td>
<tdalign="center">C7</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">TRUE</td>
<tdalign="center">FALSE</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,738 first weighted isolates (78.7% of total)</span></a></code></pre></div>
<aclass="sourceLine"id="cb19-10"title="10"><spanclass="co">#> => Found 15,826 first weighted isolates (79.1% 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-14</td>
<tdalign="center">K8</td>
<tdalign="center">2010-01-18</td>
<tdalign="center">C7</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,94 +666,94 @@
@@ -666,94 +666,94 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-02-17</td>
<tdalign="center">K8</td>
<tdalign="center">2010-02-27</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</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="odd">
<tdalign="center">3</td>
<tdalign="center">2010-03-01</td>
<tdalign="center">K8</td>
<tdalign="center">2010-04-22</td>
<tdalign="center">C7</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">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-03-11</td>
<tdalign="center">K8</td>
<tdalign="center">2010-06-09</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</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">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-04-13</td>
<tdalign="center">K8</td>
<tdalign="center">2011-04-13</td>
<tdalign="center">C7</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-08-30</td>
<tdalign="center">K8</td>
<tdalign="center">2011-04-25</td>
<tdalign="center">C7</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">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-11-05</td>
<tdalign="center">K8</td>
<tdalign="center">2011-08-02</td>
<tdalign="center">C7</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="even">
<tdalign="center">8</td>
<tdalign="center">2010-12-21</td>
<tdalign="center">K8</td>
<tdalign="center">2011-10-19</td>
<tdalign="center">C7</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">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2010-12-21</td>
<tdalign="center">K8</td>
<tdalign="center">2011-10-23</td>
<tdalign="center">C7</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>
@ -762,23 +762,23 @@
@@ -762,23 +762,23 @@
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-03-20</td>
<tdalign="center">K8</td>
<tdalign="center">2011-11-10</td>
<tdalign="center">C7</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">TRUE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Instead of 2, now 9 isolates are flagged. In total, 78.7% of all isolates are marked ‘first weighted’ - 50.5% 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, 79.1% of all isolates are marked ‘first weighted’ - 50.6% 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>