1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 06:46:11 +01:00

(v0.9.0.9006) added CITATION file

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-12-22 11:43:38 +01:00
parent ba3ce77f02
commit db5dfff0ca
27 changed files with 425 additions and 395 deletions

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 0.9.0.9005 Version: 0.9.0.9006
Date: 2019-12-21 Date: 2019-12-22
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person(role = c("aut", "cre"), person(role = c("aut", "cre"),

View File

@ -1,10 +1,13 @@
# AMR 0.9.0.9005 # AMR 0.9.0.9006
## <small>Last updated: 21-Dec-2019</small> ## <small>Last updated: 22-Dec-2019</small>
### Changes ### Changes
* Speed improvement for `as.mo()` (and consequently all `mo_*` functions that use `as.mo()` internally), especially for the *G. species* format (G for genus), like *E. coli* and *K penumoniae* * Speed improvement for `as.mo()` (and consequently all `mo_*` functions that use `as.mo()` internally), especially for the *G. species* format (G for genus), like *E. coli* and *K penumoniae*
* Input values for `as.disk()` limited to a maximum of 50 millimeters * Input values for `as.disk()` limited to a maximum of 50 millimeters
### Other
* Add a `CITATION` file
# AMR 0.9.0 # AMR 0.9.0
### Breaking ### Breaking

View File

@ -35,6 +35,7 @@ globalVariables(c(".",
"first_isolate_row_index", "first_isolate_row_index",
"fullname", "fullname",
"fullname_lower", "fullname_lower",
"g_species",
"genus", "genus",
"gramstain", "gramstain",
"group", "group",

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a> <a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>
@ -187,7 +187,7 @@
<h1>How to conduct AMR analysis</h1> <h1>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">21 December 2019</h4> <h4 class="date">22 December 2019</h4>
<div class="hidden name"><code>AMR.Rmd</code></div> <div class="hidden name"><code>AMR.Rmd</code></div>
@ -196,7 +196,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 21 December 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 22 December 2019.</p>
<div id="introduction" class="section level1"> <div id="introduction" class="section level1">
<h1 class="hasAnchor"> <h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1> <a href="#introduction" class="anchor"></a>Introduction</h1>
@ -227,21 +227,21 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2019-12-21</td> <td align="center">2019-12-22</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2019-12-21</td> <td align="center">2019-12-22</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</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">R</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2019-12-21</td> <td align="center">2019-12-22</td>
<td align="center">efgh</td> <td align="center">efgh</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
@ -336,70 +336,70 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2011-10-17</td> <td align="center">2017-03-14</td>
<td align="center">V10</td> <td align="center">J6</td>
<td align="center">Hospital D</td> <td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Staphylococcus aureus</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">M</td>
<td align="center">S</td>
<td align="center">F</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2017-05-17</td> <td align="center">2015-04-15</td>
<td align="center">R1</td> <td align="center">B9</td>
<td align="center">Hospital B</td> <td align="center">Hospital D</td>
<td align="center">Klebsiella pneumoniae</td> <td align="center">Staphylococcus aureus</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>
</tr>
<tr class="odd">
<td align="center">2015-07-05</td>
<td align="center">J5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
</tr> </tr>
<tr class="even">
<td align="center">2012-01-01</td>
<td align="center">R10</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd"> <tr class="odd">
<td align="center">2014-07-18</td> <td align="center">2017-01-04</td>
<td align="center">T6</td> <td align="center">Q9</td>
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2015-05-23</td>
<td align="center">X2</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2017-05-20</td>
<td align="center">X5</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">F</td> <td align="center">F</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2016-07-17</td> <td align="center">2016-09-27</td>
<td align="center">K1</td> <td align="center">N7</td>
<td align="center">Hospital C</td> <td align="center">Hospital A</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">I</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">M</td> <td align="center">S</td>
<td align="center">F</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -421,8 +421,8 @@
# #
# Item Count Percent Cum. Count Cum. Percent # Item Count Percent Cum. Count Cum. Percent
# --- ----- ------- -------- ----------- ------------- # --- ----- ------- -------- ----------- -------------
# 1 M 10,402 52.01% 10,402 52.01% # 1 M 10,464 52.32% 10,464 52.32%
# 2 F 9,598 47.99% 20,000 100.00%</code></pre> # 2 F 9,536 47.68% 20,000 100.00%</code></pre>
<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 didnt already know.</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 didnt 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> <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" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a> <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a>
@ -437,8 +437,8 @@
<a class="sourceLine" id="cb14-3" data-line-number="3"><span class="co"># Other rules by this AMR package</span></a> <a class="sourceLine" id="cb14-3" data-line-number="3"><span class="co"># Other rules by this AMR package</span></a>
<a class="sourceLine" id="cb14-4" data-line-number="4"><span class="co"># Non-EUCAST: inherit amoxicillin results for unavailable ampicillin (no changes)</span></a> <a class="sourceLine" id="cb14-4" data-line-number="4"><span class="co"># Non-EUCAST: inherit amoxicillin results for unavailable ampicillin (no changes)</span></a>
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="co"># Non-EUCAST: inherit ampicillin results for unavailable amoxicillin (no changes)</span></a> <a class="sourceLine" id="cb14-5" data-line-number="5"><span class="co"># Non-EUCAST: inherit ampicillin results for unavailable amoxicillin (no changes)</span></a>
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co"># Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (2,972 values changed)</span></a> <a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co"># Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (3,027 values changed)</span></a>
<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="co"># Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (139 values changed)</span></a> <a class="sourceLine" id="cb14-7" data-line-number="7"><span class="co"># Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (129 values changed)</span></a>
<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="co"># Non-EUCAST: set piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a> <a class="sourceLine" id="cb14-8" data-line-number="8"><span class="co"># Non-EUCAST: set piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a>
<a class="sourceLine" id="cb14-9" data-line-number="9"><span class="co"># Non-EUCAST: set piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a> <a class="sourceLine" id="cb14-9" data-line-number="9"><span class="co"># Non-EUCAST: set piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
<a class="sourceLine" id="cb14-10" data-line-number="10"><span class="co"># Non-EUCAST: set trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a> <a class="sourceLine" id="cb14-10" data-line-number="10"><span class="co"># Non-EUCAST: set trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a>
@ -463,14 +463,14 @@
<a class="sourceLine" id="cb14-29" data-line-number="29"><span class="co"># Pasteurella multocida (no changes)</span></a> <a class="sourceLine" id="cb14-29" data-line-number="29"><span class="co"># Pasteurella multocida (no changes)</span></a>
<a class="sourceLine" id="cb14-30" data-line-number="30"><span class="co"># Staphylococcus (no changes)</span></a> <a class="sourceLine" id="cb14-30" data-line-number="30"><span class="co"># Staphylococcus (no changes)</span></a>
<a class="sourceLine" id="cb14-31" data-line-number="31"><span class="co"># Streptococcus groups A, B, C, G (no changes)</span></a> <a class="sourceLine" id="cb14-31" data-line-number="31"><span class="co"># Streptococcus groups A, B, C, G (no changes)</span></a>
<a class="sourceLine" id="cb14-32" data-line-number="32"><span class="co"># Streptococcus pneumoniae (959 values changed)</span></a> <a class="sourceLine" id="cb14-32" data-line-number="32"><span class="co"># Streptococcus pneumoniae (1,039 values changed)</span></a>
<a class="sourceLine" id="cb14-33" data-line-number="33"><span class="co"># Viridans group streptococci (no changes)</span></a> <a class="sourceLine" id="cb14-33" data-line-number="33"><span class="co"># Viridans group streptococci (no changes)</span></a>
<a class="sourceLine" id="cb14-34" data-line-number="34"><span class="co"># </span></a> <a class="sourceLine" id="cb14-34" data-line-number="34"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-35" data-line-number="35"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a> <a class="sourceLine" id="cb14-35" data-line-number="35"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
<a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,333 values changed)</span></a> <a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,305 values changed)</span></a>
<a class="sourceLine" id="cb14-37" data-line-number="37"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-37" data-line-number="37"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-38" data-line-number="38"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-38" data-line-number="38"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,723 values changed)</span></a> <a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,835 values changed)</span></a>
<a class="sourceLine" id="cb14-40" data-line-number="40"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a> <a class="sourceLine" id="cb14-40" data-line-number="40"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
<a class="sourceLine" id="cb14-41" data-line-number="41"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a> <a class="sourceLine" id="cb14-41" data-line-number="41"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
<a class="sourceLine" id="cb14-42" data-line-number="42"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a> <a class="sourceLine" id="cb14-42" data-line-number="42"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a>
@ -478,15 +478,15 @@
<a class="sourceLine" id="cb14-44" data-line-number="44"><span class="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a> <a class="sourceLine" id="cb14-44" data-line-number="44"><span class="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a>
<a class="sourceLine" id="cb14-45" data-line-number="45"><span class="co"># </span></a> <a class="sourceLine" id="cb14-45" data-line-number="45"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-46" data-line-number="46"><span class="co"># -------------------------------------------------------------------------------</span></a> <a class="sourceLine" id="cb14-46" data-line-number="46"><span class="co"># -------------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># EUCAST rules affected 6,551 out of 20,000 rows, making a total of 8,126 edits</span></a> <a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># EUCAST rules affected 6,667 out of 20,000 rows, making a total of 8,335 edits</span></a>
<a class="sourceLine" id="cb14-48" data-line-number="48"><span class="co"># =&gt; added 0 test results</span></a> <a class="sourceLine" id="cb14-48" data-line-number="48"><span class="co"># =&gt; added 0 test results</span></a>
<a class="sourceLine" id="cb14-49" data-line-number="49"><span class="co"># </span></a> <a class="sourceLine" id="cb14-49" data-line-number="49"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># =&gt; changed 8,126 test results</span></a> <a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># =&gt; changed 8,335 test results</span></a>
<a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 115 test results changed from S to I</span></a> <a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 121 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 4,709 test results changed from S to R</span></a> <a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 4,855 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 1,179 test results changed from I to S</span></a> <a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 1,244 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># - 330 test results changed from I to R</span></a> <a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># - 332 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># - 1,793 test results changed from R to S</span></a> <a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># - 1,783 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-56" data-line-number="56"><span class="co"># -------------------------------------------------------------------------------</span></a> <a class="sourceLine" id="cb14-56" data-line-number="56"><span class="co"># -------------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-57" data-line-number="57"><span class="co"># </span></a> <a class="sourceLine" id="cb14-57" data-line-number="57"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-58" data-line-number="58"><span class="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> <a class="sourceLine" id="cb14-58" data-line-number="58"><span class="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>
@ -514,8 +514,8 @@
<a class="sourceLine" id="cb16-3" data-line-number="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-3" data-line-number="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" data-line-number="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-4" data-line-number="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" data-line-number="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-5" data-line-number="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" data-line-number="6"><span class="co"># =&gt; Found 5,691 first isolates (28.5% of total)</span></a></code></pre></div> <a class="sourceLine" id="cb16-6" data-line-number="6"><span class="co"># =&gt; Found 5,713 first isolates (28.6% 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> <p>So only 28.6% 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" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="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" data-line-number="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> <a class="sourceLine" id="cb17-2" data-line-number="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> <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>
@ -525,7 +525,7 @@
<div id="first-weighted-isolates" class="section level2"> <div id="first-weighted-isolates" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2> <a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient Y10, 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 C4, sorted on date:</p>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -541,21 +541,21 @@
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-06-10</td> <td align="center">2010-02-20</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-09-27</td> <td align="center">2010-03-07</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -563,8 +563,8 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-11-27</td> <td align="center">2010-06-08</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -574,63 +574,19 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-12-06</td> <td align="center">2010-10-24</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">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>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2011-02-18</td> <td align="center">2011-04-27</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-04-05</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-05-29</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2011-06-04</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-06-14</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -639,9 +595,20 @@
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">6</td>
<td align="center">2011-11-02</td> <td align="center">2011-05-13</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">7</td>
<td align="center">2011-12-08</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -649,9 +616,42 @@
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even">
<td align="center">8</td>
<td align="center">2012-05-22</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2012-06-10</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2012-08-14</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
</tbody> </tbody>
</table> </table>
<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>Only 3 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> <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" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb19-2" data-line-number="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> <a class="sourceLine" id="cb19-2" data-line-number="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>
@ -662,7 +662,7 @@
<a class="sourceLine" id="cb19-7" data-line-number="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-7" data-line-number="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" data-line-number="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-8" data-line-number="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" data-line-number="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a> <a class="sourceLine" id="cb19-9" data-line-number="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a>
<a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 15,020 first weighted isolates (75.1% of total)</span></a></code></pre></div> <a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 14,948 first weighted isolates (74.7% of total)</span></a></code></pre></div>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -679,22 +679,22 @@
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-06-10</td> <td align="center">2010-02-20</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-09-27</td> <td align="center">2010-03-07</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -703,8 +703,8 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-11-27</td> <td align="center">2010-06-08</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -715,82 +715,82 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-12-06</td> <td align="center">2010-10-24</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">5</td>
<td align="center">2011-02-18</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="odd">
<td align="center">6</td> <td align="center">5</td>
<td align="center">2011-04-05</td> <td align="center">2011-04-27</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">6</td>
<td align="center">2011-05-13</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-05-29</td> <td align="center">2011-12-08</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">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> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-06-04</td> <td align="center">2012-05-22</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2012-06-10</td>
<td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr>
<tr class="odd">
<td align="center">9</td>
<td align="center">2011-06-14</td>
<td align="center">Y10</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2011-11-02</td> <td align="center">2012-08-14</td>
<td align="center">Y10</td> <td align="center">C4</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -799,11 +799,11 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Instead of 2, now 9 isolates are flagged. In total, 75.1% of all isolates are marked first weighted - 46.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>Instead of 3, now 9 isolates are flagged. In total, 74.7% of all isolates are marked first weighted - 46.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>, theres a shortcut for this new algorithm too:</p> <p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres 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" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="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" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div> <a class="sourceLine" id="cb20-2" data-line-number="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,020 isolates for analysis.</p> <p>So we end up with 14,948 isolates for analysis.</p>
<p>We can remove unneeded columns:</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" data-line-number="1">data_1st &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="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" data-line-number="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://rdrr.io/r/base/c.html">c</a></span>(first, keyab))</a></code></pre></div> <a class="sourceLine" id="cb21-2" data-line-number="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://rdrr.io/r/base/c.html">c</a></span>(first, keyab))</a></code></pre></div>
@ -811,7 +811,6 @@
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(data_1st)</a></code></pre></div> <div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(data_1st)</a></code></pre></div>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th></th>
<th align="center">date</th> <th align="center">date</th>
<th align="center">patient_id</th> <th align="center">patient_id</th>
<th align="center">hospital</th> <th align="center">hospital</th>
@ -828,101 +827,95 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td>2</td> <td align="center">2017-03-14</td>
<td align="center">2017-05-17</td> <td align="center">J6</td>
<td align="center">R1</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td> <td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">M</td>
<td align="center">S</td> <td align="center">Gram-positive</td>
<td align="center">F</td> <td align="center">Staphylococcus</td>
<td align="center">Gram-negative</td> <td align="center">aureus</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>9</td> <td align="center">2015-04-15</td>
<td align="center">2016-05-07</td> <td align="center">B9</td>
<td align="center">N8</td> <td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-01-04</td>
<td align="center">Q9</td>
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram-negative</td> <td align="center">Gram-negative</td>
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">coli</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd">
<td>11</td>
<td align="center">2015-11-13</td>
<td align="center">U7</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</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">TRUE</td>
</tr>
<tr class="even"> <tr class="even">
<td>14</td> <td align="center">2015-05-23</td>
<td align="center">2011-08-27</td> <td align="center">X2</td>
<td align="center">C10</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td>15</td>
<td align="center">2013-10-17</td>
<td align="center">R10</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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">TRUE</td>
</tr>
<tr class="even">
<td>16</td>
<td align="center">2011-10-01</td>
<td align="center">I6</td>
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td> <td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">M</td> <td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td> <td align="center">Gram-positive</td>
<td align="center">Streptococcus</td> <td align="center">Streptococcus</td>
<td align="center">pneumoniae</td> <td align="center">pneumoniae</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd">
<td align="center">2017-05-20</td>
<td align="center">X5</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-09-27</td>
<td align="center">N7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>Time for the analysis!</p> <p>Time for the analysis!</p>
@ -942,7 +935,7 @@
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus, species)</a></code></pre></div> <div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
<p><strong>Frequency table</strong></p> <p><strong>Frequency table</strong></p>
<p>Class: character<br> <p>Class: character<br>
Length: 15,020 (of which NA: 0 = 0%)<br> Length: 14,948 (of which NA: 0 = 0%)<br>
Unique: 4</p> Unique: 4</p>
<p>Shortest: 16<br> <p>Shortest: 16<br>
Longest: 24</p> Longest: 24</p>
@ -959,33 +952,33 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Escherichia coli</td> <td align="left">Escherichia coli</td>
<td align="right">7,478</td> <td align="right">7,408</td>
<td align="right">49.79%</td> <td align="right">49.56%</td>
<td align="right">7,478</td> <td align="right">7,408</td>
<td align="right">49.79%</td> <td align="right">49.56%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Staphylococcus aureus</td> <td align="left">Staphylococcus aureus</td>
<td align="right">3,691</td> <td align="right">3,682</td>
<td align="right">24.57%</td> <td align="right">24.63%</td>
<td align="right">11,169</td> <td align="right">11,090</td>
<td align="right">74.36%</td> <td align="right">74.19%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td> <td align="left">Streptococcus pneumoniae</td>
<td align="right">2,306</td> <td align="right">2,373</td>
<td align="right">15.35%</td> <td align="right">15.88%</td>
<td align="right">13,475</td> <td align="right">13,463</td>
<td align="right">89.71%</td> <td align="right">90.07%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td> <td align="left">Klebsiella pneumoniae</td>
<td align="right">1,545</td> <td align="right">1,485</td>
<td align="right">10.29%</td> <td align="right">9.93%</td>
<td align="right">15,020</td> <td align="right">14,948</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
</tbody> </tbody>
@ -997,7 +990,7 @@ Longest: 24</p>
<p>The functions <code><a href="../reference/proportion.html">resistance()</a></code> and <code><a href="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><a href="../reference/proportion.html">proportion_S()</a></code>, <code><a href="../reference/proportion.html">proportion_SI()</a></code>, <code><a href="../reference/proportion.html">proportion_I()</a></code>, <code><a href="../reference/proportion.html">proportion_IR()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p> <p>The functions <code><a href="../reference/proportion.html">resistance()</a></code> and <code><a href="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><a href="../reference/proportion.html">proportion_S()</a></code>, <code><a href="../reference/proportion.html">proportion_SI()</a></code>, <code><a href="../reference/proportion.html">proportion_I()</a></code>, <code><a href="../reference/proportion.html">proportion_IR()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p> <p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX)</a> <div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX)</a>
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4637816</span></a></code></pre></div> <a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4658817</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> <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" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb26-2" data-line-number="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> <a class="sourceLine" id="cb26-2" data-line-number="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>
@ -1010,19 +1003,19 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4687360</td> <td align="center">0.4639385</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4664905</td> <td align="center">0.4647623</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4576649</td> <td align="center">0.4596631</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4561813</td> <td align="center">0.4755767</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1040,23 +1033,23 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4687360</td> <td align="center">0.4639385</td>
<td align="center">4478</td> <td align="center">4423</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4664905</td> <td align="center">0.4647623</td>
<td align="center">5297</td> <td align="center">5321</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4576649</td> <td align="center">0.4596631</td>
<td align="center">2244</td> <td align="center">2256</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4561813</td> <td align="center">0.4755767</td>
<td align="center">3001</td> <td align="center">2948</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1076,27 +1069,27 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">0.9259160</td> <td align="center">0.9298056</td>
<td align="center">0.8915485</td> <td align="center">0.8983531</td>
<td align="center">0.9933137</td> <td align="center">0.9950054</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Klebsiella</td> <td align="center">Klebsiella</td>
<td align="center">0.9177994</td> <td align="center">0.9313131</td>
<td align="center">0.8990291</td> <td align="center">0.8942761</td>
<td align="center">0.9967638</td> <td align="center">0.9932660</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">0.9244107</td> <td align="center">0.9212385</td>
<td align="center">0.9260363</td> <td align="center">0.9166214</td>
<td align="center">0.9943105</td> <td align="center">0.9934818</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Streptococcus</td> <td align="center">Streptococcus</td>
<td align="center">0.6183868</td> <td align="center">0.6080910</td>
<td align="center">0.0000000</td> <td align="center">0.0000000</td>
<td align="center">0.6183868</td> <td align="center">0.6080910</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9004</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>
@ -187,7 +187,7 @@
<h1>Benchmarks</h1> <h1>Benchmarks</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">20 December 2019</h4> <h4 class="date">22 December 2019</h4>
<div class="hidden name"><code>benchmarks.Rmd</code></div> <div class="hidden name"><code>benchmarks.Rmd</code></div>
@ -221,36 +221,21 @@
<a class="sourceLine" id="cb2-16" data-line-number="16"> <span class="dt">times =</span> <span class="dv">10</span>)</a> <a class="sourceLine" id="cb2-16" data-line-number="16"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
<a class="sourceLine" id="cb2-17" data-line-number="17"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a> <a class="sourceLine" id="cb2-17" data-line-number="17"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
<a class="sourceLine" id="cb2-18" data-line-number="18"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb2-18" data-line-number="18"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb2-19" data-line-number="19"><span class="co"># expr min lq mean median uq max</span></a> <a class="sourceLine" id="cb2-19" data-line-number="19"><span class="co"># expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb2-20" data-line-number="20"><span class="co"># as.mo("sau") 9.7 10.0 33.0 11.0 35.0 110.0</span></a> <a class="sourceLine" id="cb2-20" data-line-number="20"><span class="co"># as.mo("sau") 9.1 9.3 15 9.8 13.0 34 10</span></a>
<a class="sourceLine" id="cb2-21" data-line-number="21"><span class="co"># as.mo("stau") 36.0 36.0 45.0 37.0 60.0 65.0</span></a> <a class="sourceLine" id="cb2-21" data-line-number="21"><span class="co"># as.mo("stau") 33.0 34.0 40 35.0 39.0 60 10</span></a>
<a class="sourceLine" id="cb2-22" data-line-number="22"><span class="co"># as.mo("STAU") 33.0 34.0 41.0 37.0 40.0 61.0</span></a> <a class="sourceLine" id="cb2-22" data-line-number="22"><span class="co"># as.mo("STAU") 33.0 34.0 51 35.0 57.0 150 10</span></a>
<a class="sourceLine" id="cb2-23" data-line-number="23"><span class="co"># as.mo("staaur") 9.6 9.9 13.0 10.0 11.0 33.0</span></a> <a class="sourceLine" id="cb2-23" data-line-number="23"><span class="co"># as.mo("staaur") 8.8 9.2 16 10.0 13.0 43 10</span></a>
<a class="sourceLine" id="cb2-24" data-line-number="24"><span class="co"># as.mo("STAAUR") 9.6 10.0 11.0 11.0 11.0 13.0</span></a> <a class="sourceLine" id="cb2-24" data-line-number="24"><span class="co"># as.mo("STAAUR") 9.3 9.4 23 9.7 10.0 120 10</span></a>
<a class="sourceLine" id="cb2-25" data-line-number="25"><span class="co"># as.mo("S. aureus") 25.0 26.0 32.0 26.0 28.0 59.0</span></a> <a class="sourceLine" id="cb2-25" data-line-number="25"><span class="co"># as.mo("S. aureus") 10.0 10.0 16 11.0 12.0 41 10</span></a>
<a class="sourceLine" id="cb2-26" data-line-number="26"><span class="co"># as.mo("S aureus") 25.0 26.0 33.0 26.0 33.0 55.0</span></a> <a class="sourceLine" id="cb2-26" data-line-number="26"><span class="co"># as.mo("S aureus") 10.0 10.0 28 12.0 35.0 110 10</span></a>
<a class="sourceLine" id="cb2-27" data-line-number="27"><span class="co"># as.mo("Staphylococcus aureus") 4.7 4.8 5.2 5.2 5.5 6.4</span></a> <a class="sourceLine" id="cb2-27" data-line-number="27"><span class="co"># as.mo("Staphylococcus aureus") 4.6 4.8 10 4.9 5.2 56 10</span></a>
<a class="sourceLine" id="cb2-28" data-line-number="28"><span class="co"># as.mo("Staphylococcus aureus (MRSA)") 620.0 640.0 690.0 660.0 680.0 840.0</span></a> <a class="sourceLine" id="cb2-28" data-line-number="28"><span class="co"># as.mo("Staphylococcus aureus (MRSA)") 660.0 670.0 700 680.0 710.0 770 10</span></a>
<a class="sourceLine" id="cb2-29" data-line-number="29"><span class="co"># as.mo("Sthafilokkockus aaureuz") 310.0 340.0 360.0 350.0 370.0 420.0</span></a> <a class="sourceLine" id="cb2-29" data-line-number="29"><span class="co"># as.mo("Sthafilokkockus aaureuz") 330.0 350.0 370 370.0 390.0 430 10</span></a>
<a class="sourceLine" id="cb2-30" data-line-number="30"><span class="co"># as.mo("MRSA") 9.8 10.0 13.0 11.0 12.0 35.0</span></a> <a class="sourceLine" id="cb2-30" data-line-number="30"><span class="co"># as.mo("MRSA") 9.2 9.2 14 9.4 9.5 35 10</span></a>
<a class="sourceLine" id="cb2-31" data-line-number="31"><span class="co"># as.mo("VISA") 21.0 21.0 29.0 22.0 27.0 60.0</span></a> <a class="sourceLine" id="cb2-31" data-line-number="31"><span class="co"># as.mo("VISA") 20.0 20.0 26 21.0 23.0 45 10</span></a>
<a class="sourceLine" id="cb2-32" data-line-number="32"><span class="co"># as.mo("VRSA") 20.0 21.0 31.0 25.0 44.0 47.0</span></a> <a class="sourceLine" id="cb2-32" data-line-number="32"><span class="co"># as.mo("VRSA") 20.0 21.0 30 22.0 44.0 47 10</span></a>
<a class="sourceLine" id="cb2-33" data-line-number="33"><span class="co"># as.mo(22242419) 19.0 19.0 26.0 20.0 25.0 52.0</span></a> <a class="sourceLine" id="cb2-33" data-line-number="33"><span class="co"># as.mo(22242419) 19.0 20.0 43 20.0 28.0 130 10</span></a></code></pre></div>
<a class="sourceLine" id="cb2-34" data-line-number="34"><span class="co"># neval</span></a>
<a class="sourceLine" id="cb2-35" data-line-number="35"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-36" data-line-number="36"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-37" data-line-number="37"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-38" data-line-number="38"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-39" data-line-number="39"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-40" data-line-number="40"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-41" data-line-number="41"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-42" data-line-number="42"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-43" data-line-number="43"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-44" data-line-number="44"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-45" data-line-number="45"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-46" data-line-number="46"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-47" data-line-number="47"><span class="co"># 10</span></a>
<a class="sourceLine" id="cb2-48" data-line-number="48"><span class="co"># 10</span></a></code></pre></div>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="562.5"></p> <p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="562.5"></p>
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</p> <p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</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>Methanosarcina semesiae</em> (<code>B_MTHNSR_SEMS</code>), a bug probably never found before in humans:</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>Methanosarcina semesiae</em> (<code>B_MTHNSR_SEMS</code>), a bug probably never found before in humans:</p>
@ -263,18 +248,18 @@
<a class="sourceLine" id="cb3-7" data-line-number="7"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(M.semesiae, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a> <a class="sourceLine" id="cb3-7" data-line-number="7"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(M.semesiae, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
<a class="sourceLine" id="cb3-8" data-line-number="8"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb3-8" data-line-number="8"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb3-9" data-line-number="9"><span class="co"># expr min lq mean median uq</span></a> <a class="sourceLine" id="cb3-9" data-line-number="9"><span class="co"># expr min lq mean median uq</span></a>
<a class="sourceLine" id="cb3-10" data-line-number="10"><span class="co"># as.mo("metsem") 1435.000 1473.000 1510.00 1500.000 1520.00</span></a> <a class="sourceLine" id="cb3-10" data-line-number="10"><span class="co"># as.mo("metsem") 1469.000 1482.000 1515.000 1507.000 1545.000</span></a>
<a class="sourceLine" id="cb3-11" data-line-number="11"><span class="co"># as.mo("METSEM") 1466.000 1516.000 1542.00 1541.000 1557.00</span></a> <a class="sourceLine" id="cb3-11" data-line-number="11"><span class="co"># as.mo("METSEM") 1435.000 1452.000 1490.000 1479.000 1520.000</span></a>
<a class="sourceLine" id="cb3-12" data-line-number="12"><span class="co"># as.mo("M. semesiae") 2113.000 2173.000 2207.00 2187.000 2243.00</span></a> <a class="sourceLine" id="cb3-12" data-line-number="12"><span class="co"># as.mo("M. semesiae") 10.840 11.090 16.220 11.150 11.600</span></a>
<a class="sourceLine" id="cb3-13" data-line-number="13"><span class="co"># as.mo("M. semesiae") 2154.000 2192.000 2238.00 2215.000 2305.00</span></a> <a class="sourceLine" id="cb3-13" data-line-number="13"><span class="co"># as.mo("M. semesiae") 10.670 10.820 20.140 11.180 38.040</span></a>
<a class="sourceLine" id="cb3-14" data-line-number="14"><span class="co"># as.mo("Methanosarcina semesiae") 5.435 5.508 13.05 5.724 28.23</span></a> <a class="sourceLine" id="cb3-14" data-line-number="14"><span class="co"># as.mo("Methanosarcina semesiae") 5.138 5.185 7.838 5.366 5.493</span></a>
<a class="sourceLine" id="cb3-15" data-line-number="15"><span class="co"># max neval</span></a> <a class="sourceLine" id="cb3-15" data-line-number="15"><span class="co"># max neval</span></a>
<a class="sourceLine" id="cb3-16" data-line-number="16"><span class="co"># 1651.00 10</span></a> <a class="sourceLine" id="cb3-16" data-line-number="16"><span class="co"># 1574.00 10</span></a>
<a class="sourceLine" id="cb3-17" data-line-number="17"><span class="co"># 1632.00 10</span></a> <a class="sourceLine" id="cb3-17" data-line-number="17"><span class="co"># 1563.00 10</span></a>
<a class="sourceLine" id="cb3-18" data-line-number="18"><span class="co"># 2301.00 10</span></a> <a class="sourceLine" id="cb3-18" data-line-number="18"><span class="co"># 36.46 10</span></a>
<a class="sourceLine" id="cb3-19" data-line-number="19"><span class="co"># 2332.00 10</span></a> <a class="sourceLine" id="cb3-19" data-line-number="19"><span class="co"># 44.17 10</span></a>
<a class="sourceLine" id="cb3-20" data-line-number="20"><span class="co"># 32.95 10</span></a></code></pre></div> <a class="sourceLine" id="cb3-20" data-line-number="20"><span class="co"># 30.28 10</span></a></code></pre></div>
<p>That takes 15.5 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Methanosarcina semesiae</em>) are always very fast and only take some thousands of seconds to coerce - they are the most probable input from most data sets.</p> <p>That takes 6.2 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Methanosarcina semesiae</em>) are always very fast and only take some thousands of seconds to coerce - they are the most probable input from most data sets.</p>
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Methanosarcina semesiae</em> (which is uncommon):</p> <p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Methanosarcina semesiae</em> (which is uncommon):</p>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-8-1.png" width="900"></p> <p><img src="benchmarks_files/figure-html/unnamed-chunk-8-1.png" width="900"></p>
<p>The highest outliers are the first times. All next determinations were done in only thousands of seconds, because the <code><a href="../reference/as.mo.html">as.mo()</a></code> function <strong>learns from its own output to speed up determinations for next times</strong>.</p> <p>The highest outliers are the first times. All next determinations were done in only thousands of seconds, because the <code><a href="../reference/as.mo.html">as.mo()</a></code> function <strong>learns from its own output to speed up determinations for next times</strong>.</p>
@ -311,8 +296,8 @@
<a class="sourceLine" id="cb4-24" data-line-number="24"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a> <a class="sourceLine" id="cb4-24" data-line-number="24"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
<a class="sourceLine" id="cb4-25" data-line-number="25"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb4-25" data-line-number="25"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb4-26" data-line-number="26"><span class="co"># expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb4-26" data-line-number="26"><span class="co"># expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb4-27" data-line-number="27"><span class="co"># mo_name(x) 539 576 598 586 610 728 100</span></a></code></pre></div> <a class="sourceLine" id="cb4-27" data-line-number="27"><span class="co"># mo_name(x) 548 581 605 593 611 735 100</span></a></code></pre></div>
<p>So transforming 500,000 values (!!) of 50 unique values only takes 0.59 seconds (586 ms). You only lose time on your unique input values.</p> <p>So transforming 500,000 values (!!) of 50 unique values only takes 0.59 seconds (593 ms). You only lose time on your unique input values.</p>
</div> </div>
<div id="precalculated-results" class="section level3"> <div id="precalculated-results" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -325,9 +310,9 @@
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a> <a class="sourceLine" id="cb5-5" data-line-number="5"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
<a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="co"># expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb5-7" data-line-number="7"><span class="co"># expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="co"># A 6.460 6.61 6.940 6.720 6.940 8.14 10</span></a> <a class="sourceLine" id="cb5-8" data-line-number="8"><span class="co"># A 6.380 6.430 6.800 6.540 6.690 8.94 10</span></a>
<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="co"># B 25.400 25.80 30.700 26.300 27.600 61.60 10</span></a> <a class="sourceLine" id="cb5-9" data-line-number="9"><span class="co"># B 10.900 10.900 14.200 11.100 11.400 37.20 10</span></a>
<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co"># C 0.653 0.67 0.784 0.806 0.842 0.90 10</span></a></code></pre></div> <a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co"># C 0.735 0.772 0.832 0.792 0.875 1.01 10</span></a></code></pre></div>
<p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0008 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p> <p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0008 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">run_it &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a> <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">run_it &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
<a class="sourceLine" id="cb6-2" data-line-number="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a> <a class="sourceLine" id="cb6-2" data-line-number="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
@ -341,14 +326,14 @@
<a class="sourceLine" id="cb6-10" data-line-number="10"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a> <a class="sourceLine" id="cb6-10" data-line-number="10"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
<a class="sourceLine" id="cb6-11" data-line-number="11"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb6-11" data-line-number="11"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb6-12" data-line-number="12"><span class="co"># expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb6-12" data-line-number="12"><span class="co"># expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb6-13" data-line-number="13"><span class="co"># A 0.429 0.450 0.458 0.453 0.469 0.493 10</span></a> <a class="sourceLine" id="cb6-13" data-line-number="13"><span class="co"># A 0.445 0.453 0.463 0.464 0.467 0.492 10</span></a>
<a class="sourceLine" id="cb6-14" data-line-number="14"><span class="co"># B 0.484 0.499 0.519 0.506 0.518 0.646 10</span></a> <a class="sourceLine" id="cb6-14" data-line-number="14"><span class="co"># B 0.484 0.496 0.522 0.502 0.505 0.724 10</span></a>
<a class="sourceLine" id="cb6-15" data-line-number="15"><span class="co"># C 0.674 0.721 0.777 0.796 0.816 0.853 10</span></a> <a class="sourceLine" id="cb6-15" data-line-number="15"><span class="co"># C 0.667 0.746 0.755 0.758 0.786 0.800 10</span></a>
<a class="sourceLine" id="cb6-16" data-line-number="16"><span class="co"># D 0.485 0.490 0.507 0.499 0.518 0.554 10</span></a> <a class="sourceLine" id="cb6-16" data-line-number="16"><span class="co"># D 0.488 0.491 0.507 0.505 0.509 0.558 10</span></a>
<a class="sourceLine" id="cb6-17" data-line-number="17"><span class="co"># E 0.439 0.453 0.462 0.460 0.476 0.482 10</span></a> <a class="sourceLine" id="cb6-17" data-line-number="17"><span class="co"># E 0.454 0.455 0.462 0.461 0.465 0.490 10</span></a>
<a class="sourceLine" id="cb6-18" data-line-number="18"><span class="co"># F 0.425 0.446 0.454 0.455 0.462 0.477 10</span></a> <a class="sourceLine" id="cb6-18" data-line-number="18"><span class="co"># F 0.432 0.447 0.456 0.458 0.459 0.490 10</span></a>
<a class="sourceLine" id="cb6-19" data-line-number="19"><span class="co"># G 0.447 0.450 0.464 0.457 0.471 0.508 10</span></a> <a class="sourceLine" id="cb6-19" data-line-number="19"><span class="co"># G 0.438 0.446 0.456 0.454 0.460 0.486 10</span></a>
<a class="sourceLine" id="cb6-20" data-line-number="20"><span class="co"># H 0.449 0.457 0.477 0.459 0.464 0.641 10</span></a></code></pre></div> <a class="sourceLine" id="cb6-20" data-line-number="20"><span class="co"># H 0.439 0.442 0.454 0.450 0.459 0.501 10</span></a></code></pre></div>
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p> <p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
</div> </div>
<div id="results-in-other-languages" class="section level3"> <div id="results-in-other-languages" class="section level3">
@ -375,13 +360,13 @@
<a class="sourceLine" id="cb7-18" data-line-number="18"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a> <a class="sourceLine" id="cb7-18" data-line-number="18"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
<a class="sourceLine" id="cb7-19" data-line-number="19"><span class="co"># Unit: milliseconds</span></a> <a class="sourceLine" id="cb7-19" data-line-number="19"><span class="co"># Unit: milliseconds</span></a>
<a class="sourceLine" id="cb7-20" data-line-number="20"><span class="co"># expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb7-20" data-line-number="20"><span class="co"># expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb7-21" data-line-number="21"><span class="co"># en 20.68 22.22 25.57 22.81 24.02 58.73 100</span></a> <a class="sourceLine" id="cb7-21" data-line-number="21"><span class="co"># en 21.02 22.35 26.62 22.93 23.58 55.03 100</span></a>
<a class="sourceLine" id="cb7-22" data-line-number="22"><span class="co"># de 21.96 23.63 28.16 24.45 25.50 138.10 100</span></a> <a class="sourceLine" id="cb7-22" data-line-number="22"><span class="co"># de 22.22 23.82 29.38 24.32 25.30 60.12 100</span></a>
<a class="sourceLine" id="cb7-23" data-line-number="23"><span class="co"># nl 27.91 29.85 33.99 31.06 32.41 63.72 100</span></a> <a class="sourceLine" id="cb7-23" data-line-number="23"><span class="co"># nl 27.58 28.91 33.76 30.03 30.78 144.40 100</span></a>
<a class="sourceLine" id="cb7-24" data-line-number="24"><span class="co"># es 22.06 23.81 28.02 24.51 25.63 57.01 100</span></a> <a class="sourceLine" id="cb7-24" data-line-number="24"><span class="co"># es 22.31 23.57 28.23 24.31 25.96 53.68 100</span></a>
<a class="sourceLine" id="cb7-25" data-line-number="25"><span class="co"># it 21.62 23.79 29.36 24.79 27.55 67.42 100</span></a> <a class="sourceLine" id="cb7-25" data-line-number="25"><span class="co"># it 22.02 23.74 30.82 24.32 26.97 158.30 100</span></a>
<a class="sourceLine" id="cb7-26" data-line-number="26"><span class="co"># fr 21.77 23.67 27.02 24.12 25.51 65.44 100</span></a> <a class="sourceLine" id="cb7-26" data-line-number="26"><span class="co"># fr 22.38 23.39 28.85 24.29 25.71 143.30 100</span></a>
<a class="sourceLine" id="cb7-27" data-line-number="27"><span class="co"># pt 21.68 23.59 26.42 24.03 25.23 54.05 100</span></a></code></pre></div> <a class="sourceLine" id="cb7-27" data-line-number="27"><span class="co"># pt 22.14 23.44 27.47 24.17 25.12 56.93 100</span></a></code></pre></div>
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p> <p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors • AMR (for R)</title> <title>Citation and Authors • AMR (for R)</title>
<!-- favicons --> <!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
@ -50,7 +50,7 @@
<link href="extra.css" rel="stylesheet"> <link href="extra.css" rel="stylesheet">
<script src="extra.js"></script> <script src="extra.js"></script>
<meta property="og:title" content="Authors" /> <meta property="og:title" content="Citation and Authors" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
@ -71,7 +71,7 @@
</head> </head>
<body> <body>
<div class="container template-authors"> <div class="container template-citation-authors">
<header> <header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container"> <div class="container">
@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>
@ -226,6 +226,26 @@
<div class="row"> <div class="row">
<div class="contents col-md-9"> <div class="contents col-md-9">
<div class="page-header">
<h1>Citation</h1>
</div>
<p>Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2019).
&ldquo;AMR - An R Package for Working with Antimicrobial Resistance Data.&rdquo;
<em>bioRxiv</em>.
doi: <a href="https://doi.org/10.1101/810622">10.1101/810622</a>, <a href="https://doi.org/10.1101/810622">https://doi.org/10.1101/810622</a>.
</p>
<pre>@Article{,
title = {AMR - An R Package for Working with Antimicrobial Resistance Data},
author = {M S Berends and C F Luz and A W Friedrich and B N M Sinha and C J Albers and C Glasner},
journal = {bioRxiv},
publisher = {Cold Spring Harbor Laboratory},
year = {2019},
doi = {10.1101/810622},
url = {https://doi.org/10.1101/810622},
}</pre>
<div class="page-header"> <div class="page-header">
<h1>Authors</h1> <h1>Authors</h1>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -45,7 +45,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>
@ -205,8 +205,8 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/
<div class="main-content"> <div class="main-content">
<p> <p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a>
<strong>Used in almost 80 countries</strong><br> <strong>Used in 80 countries</strong><br>
Since its first public release in early 2018, this package has been downloaded over 25,000 times from 79 countries <small>(as of December 2019, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p> Since its first public release in early 2018, this package has been downloaded over 25,000 times from 80 countries <small>(as of December 2019, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p>
<br><br> <br><br>
</div> </div>
<div id="partners" class="section level4"> <div id="partners" class="section level4">
@ -410,6 +410,12 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/
</li> </li>
</ul> </ul>
</div> </div>
<div class="citation">
<h2>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html">Citing AMR</a></li>
</ul>
</div>
<div class="developers"> <div class="developers">
<h2>Developers</h2> <h2>Developers</h2>
<ul class="list-unstyled"> <ul class="list-unstyled">

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>
@ -231,13 +231,13 @@
</div> </div>
<div id="amr-0-9-0-9005" class="section level1"> <div id="amr-0-9-0-9006" class="section level1">
<h1 class="page-header"> <h1 class="page-header">
<a href="#amr-0-9-0-9005" class="anchor"></a>AMR 0.9.0.9005<small> Unreleased </small> <a href="#amr-0-9-0-9006" class="anchor"></a>AMR 0.9.0.9006<small> Unreleased </small>
</h1> </h1>
<div id="last-updated-21-dec-2019" class="section level2"> <div id="last-updated-22-dec-2019" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-21-dec-2019" class="anchor"></a><small>Last updated: 21-Dec-2019</small> <a href="#last-updated-22-dec-2019" class="anchor"></a><small>Last updated: 22-Dec-2019</small>
</h2> </h2>
<div id="changes" class="section level3"> <div id="changes" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -248,6 +248,13 @@
<li>Input values for <code><a href="../reference/as.disk.html">as.disk()</a></code> limited to a maximum of 50 millimeters</li> <li>Input values for <code><a href="../reference/as.disk.html">as.disk()</a></code> limited to a maximum of 50 millimeters</li>
</ul> </ul>
</div> </div>
<div id="other" class="section level3">
<h3 class="hasAnchor">
<a href="#other" class="anchor"></a>Other</h3>
<ul>
<li>Add a <code>CITATION</code> file</li>
</ul>
</div>
</div> </div>
</div> </div>
<div id="amr-0-9-0" class="section level1"> <div id="amr-0-9-0" class="section level1">
@ -339,9 +346,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<div id="other" class="section level3"> <div id="other-1" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#other" class="anchor"></a>Other</h3> <a href="#other-1" class="anchor"></a>Other</h3>
<ul> <ul>
<li>Rewrote the complete documentation to markdown format, to be able to use the very latest version of the great <a href="https://roxygen2.r-lib.org/index.html">Roxygen2</a>, released in November 2019. This tremously improved the documentation quality, since the rewrite forced us to go over all texts again and make changes where needed.</li> <li>Rewrote the complete documentation to markdown format, to be able to use the very latest version of the great <a href="https://roxygen2.r-lib.org/index.html">Roxygen2</a>, released in November 2019. This tremously improved the documentation quality, since the rewrite forced us to go over all texts again and make changes where needed.</li>
<li>Change dependency on <code>clean</code> to <code>cleaner</code>, as this package was renamed accordingly upon CRAN request</li> <li>Change dependency on <code>clean</code> to <code>cleaner</code>, as this package was renamed accordingly upon CRAN request</li>
@ -490,9 +497,9 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
</li> </li>
<li>Added more MIC factor levels (<code><a href="../reference/as.mic.html">as.mic()</a></code>)</li> <li>Added more MIC factor levels (<code><a href="../reference/as.mic.html">as.mic()</a></code>)</li>
</ul> </ul>
<div id="other-1" class="section level4"> <div id="other-2" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-1" class="anchor"></a>Other</h4> <a href="#other-2" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Added Prof. Dr. Casper Albers as doctoral advisor and added Dr. Judith Fonville, Eric Hazenberg, Dr. Bart Meijer, Dr. Dennis Souverein and Annick Lenglet as contributors</li> <li>Added Prof. Dr. Casper Albers as doctoral advisor and added Dr. Judith Fonville, Eric Hazenberg, Dr. Bart Meijer, Dr. Dennis Souverein and Annick Lenglet as contributors</li>
<li>Cleaned the coding style of every single syntax line in this package with the help of the <code>lintr</code> package</li> <li>Cleaned the coding style of every single syntax line in this package with the help of the <code>lintr</code> package</li>
@ -573,9 +580,9 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
</li> </li>
</ul> </ul>
</div> </div>
<div id="other-2" class="section level4"> <div id="other-3" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-2" class="anchor"></a>Other</h4> <a href="#other-3" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Fixed a note thrown by CRAN tests</li> <li>Fixed a note thrown by CRAN tests</li>
</ul> </ul>
@ -669,9 +676,9 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=EUC
<li><p>Fix for <code><a href="../reference/mo_property.html">mo_shortname()</a></code> where species would not be determined correctly</p></li> <li><p>Fix for <code><a href="../reference/mo_property.html">mo_shortname()</a></code> where species would not be determined correctly</p></li>
</ul> </ul>
</div> </div>
<div id="other-3" class="section level4"> <div id="other-4" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-3" class="anchor"></a>Other</h4> <a href="#other-4" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Support for R 3.6.0 and later by providing support for <a href="https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html">staged install</a> <li>Support for R 3.6.0 and later by providing support for <a href="https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html">staged install</a>
</li> </li>
@ -917,9 +924,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>if using different lengths of pattern and x in <code><a href="../reference/like.html">%like%</a></code>, it will now return the call</li> <li>if using different lengths of pattern and x in <code><a href="../reference/like.html">%like%</a></code>, it will now return the call</li>
</ul> </ul>
</div> </div>
<div id="other-4" class="section level4"> <div id="other-5" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-4" class="anchor"></a>Other</h4> <a href="#other-5" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Updated licence text to emphasise GPL 2.0 and that this is an R package.</li> <li>Updated licence text to emphasise GPL 2.0 and that this is an R package.</li>
</ul> </ul>
@ -1042,9 +1049,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li><p>Percentages will now will rounded more logically (e.g. in <code>freq</code> function)</p></li> <li><p>Percentages will now will rounded more logically (e.g. in <code>freq</code> function)</p></li>
</ul> </ul>
</div> </div>
<div id="other-5" class="section level4"> <div id="other-6" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-5" class="anchor"></a>Other</h4> <a href="#other-6" class="anchor"></a>Other</h4>
<ul> <ul>
<li>New dependency on package <code>crayon</code>, to support formatted text in the console</li> <li>New dependency on package <code>crayon</code>, to support formatted text in the console</li>
<li>Dependency <code>tidyr</code> is now mandatory (went to <code>Import</code> field) since <code>portion_df</code> and <code>count_df</code> rely on it</li> <li>Dependency <code>tidyr</code> is now mandatory (went to <code>Import</code> field) since <code>portion_df</code> and <code>count_df</code> rely on it</li>
@ -1179,9 +1186,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li> </li>
</ul> </ul>
</div> </div>
<div id="other-6" class="section level4"> <div id="other-7" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-6" class="anchor"></a>Other</h4> <a href="#other-7" class="anchor"></a>Other</h4>
<ul> <ul>
<li>More unit tests to ensure better integrity of functions</li> <li>More unit tests to ensure better integrity of functions</li>
</ul> </ul>
@ -1308,9 +1315,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>Other small fixes</li> <li>Other small fixes</li>
</ul> </ul>
</div> </div>
<div id="other-7" class="section level4"> <div id="other-8" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-7" class="anchor"></a>Other</h4> <a href="#other-8" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher <li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher
<ul> <ul>
@ -1370,9 +1377,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>Functions <code>as.rsi</code> and <code>as.mic</code> now add the package name and version as attributes</li> <li>Functions <code>as.rsi</code> and <code>as.mic</code> now add the package name and version as attributes</li>
</ul> </ul>
</div> </div>
<div id="other-8" class="section level4"> <div id="other-9" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#other-8" class="anchor"></a>Other</h4> <a href="#other-9" class="anchor"></a>Other</h4>
<ul> <ul>
<li>Expanded <code>README.md</code> with more examples</li> <li>Expanded <code>README.md</code> with more examples</li>
<li>Added <a href="https://orcid.org">ORCID</a> of authors to DESCRIPTION file</li> <li>Added <a href="https://orcid.org">ORCID</a> of authors to DESCRIPTION file</li>
@ -1409,7 +1416,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav"> <div id="tocnav">
<h2>Contents</h2> <h2>Contents</h2>
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0-9-0-9005">0.9.0.9005</a></li> <li><a href="#amr-0-9-0-9006">0.9.0.9006</a></li>
<li><a href="#amr-0-9-0">0.9.0</a></li> <li><a href="#amr-0-9-0">0.9.0</a></li>
<li><a href="#amr-0-8-0">0.8.0</a></li> <li><a href="#amr-0-8-0">0.8.0</a></li>
<li><a href="#amr-0-7-1">0.7.1</a></li> <li><a href="#amr-0-7-1">0.7.1</a></li>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9005</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9006</span>
</span> </span>
</div> </div>

View File

@ -17,8 +17,8 @@ We created this package for both routine analysis and academic research (as part
<div class="main-content"> <div class="main-content">
<p> <p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a>
<strong>Used in almost 80 countries</strong><br> <strong>Used in 80 countries</strong><br>
Since its first public release in early 2018, this package has been downloaded over 25,000 times from 79 countries <small>(as of December 2019, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p><br><br> Since its first public release in early 2018, this package has been downloaded over 25,000 times from 80 countries <small>(as of December 2019, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p><br><br>
</div> </div>
#### Partners #### Partners

15
inst/CITATION Normal file
View File

@ -0,0 +1,15 @@
citHeader("To cite our AMR package in publications, please use:")
citEntry(
entry = "Article",
title = "AMR - An R Package for Working with Antimicrobial Resistance Data",
author = "M S Berends and C F Luz and A W Friedrich and B N M Sinha and C J Albers and C Glasner",
journal = "bioRxiv",
publisher = "Cold Spring Harbor Laboratory",
year = 2019,
doi = "10.1101/810622",
url = "https://doi.org/10.1101/810622",
textVersion = "Berends MS, Luz CF et al. (2019). AMR - An R Package for Working with Antimicrobial Resistance Data. bioRxiv, https://doi.org/10.1101/810622"
)
citFooter("Many thanks for using our open-source method to work with microbial and antimicrobial data!")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB