Browse Source

(v1.7.0) unit tests

main v1.7.0
parent
commit
f1d9b489c5
  1. 2
      .github/workflows/codecovr.yaml
  2. 4
      README.md
  3. BIN
      data-raw/AMR_latest.tar.gz
  4. 1
      data-raw/_install_deps.R
  5. 437
      docs/articles/AMR.html
  6. BIN
      docs/articles/AMR_files/figure-html/disk_plots-1.png
  7. BIN
      docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png
  8. BIN
      docs/articles/AMR_files/figure-html/mic_plots-1.png
  9. BIN
      docs/articles/AMR_files/figure-html/mic_plots-2.png
  10. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png
  11. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png
  12. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  13. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  14. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  15. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  16. 52
      docs/articles/MDR.html
  17. 2
      docs/articles/SPSS.html
  18. 2
      docs/articles/WHONET.html
  19. 85
      docs/articles/benchmarks.html
  20. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  21. 4
      docs/index.html
  22. 2
      docs/news/index.html
  23. 2
      docs/pkgdown.yml
  24. 2
      docs/reference/resistance_predict.html
  25. 9
      index.md
  26. 2
      inst/tinytest/test-zzz.R

2
.github/workflows/codecovr.yaml

@ -91,5 +91,3 @@ jobs: @@ -91,5 +91,3 @@ jobs:
library(tinytest)
covr::codecov(line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R"))
shell: Rscript {0}

4
README.md

@ -2,8 +2,6 @@ @@ -2,8 +2,6 @@
# `AMR` (for R)
[![CRAN](https://www.r-pkg.org/badges/version-ago/AMR)](https://cran.r-project.org/package=AMR)
[![CRANlogs](https://cranlogs.r-pkg.org/badges/grand-total/AMR)](https://cran.r-project.org/package=AMR)
![R-code-check](https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=master)
[![CodeFactor](https://www.codefactor.io/repository/github/msberends/amr/badge)](https://www.codefactor.io/repository/github/msberends/amr)
[![Codecov](https://codecov.io/gh/msberends/AMR/branch/master/graph/badge.svg)](https://codecov.io/gh/msberends/AMR?branch=master)
@ -25,7 +23,7 @@ This is the development source of the `AMR` package for R. Not a developer? Then @@ -25,7 +23,7 @@ This is the development source of the `AMR` package for R. Not a developer? Then
### How to get this package
Please see [our website](https://msberends.github.io/AMR/#get-this-package).
Bottom line: `install.packages("AMR")`
Bottom line: `install.packages("AMR", repos = "https://msberends.r-universe.dev")`
### Copyright

BIN
data-raw/AMR_latest.tar.gz

Binary file not shown.

1
data-raw/_install_deps.R

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
# some old R instances have trouble installing tinytest, so we ship it too
install.packages("data-raw/tinytest_1.2.4.10.tar.gz")
install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE)
install.packages("covr")
pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?")))
cat("Packages listed in Suggests:", paste(pkg_suggests, collapse = ", "), "\n")

437
docs/articles/AMR.html

@ -344,67 +344,67 @@ @@ -344,67 +344,67 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2013-01-28</td>
<td align="center">G4</td>
<td align="center">2013-04-02</td>
<td align="center">X1</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia 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">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-08-13</td>
<td align="center">O10</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">2015-07-17</td>
<td align="center">X6</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2011-10-06</td>
<td align="center">N1</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">2012-09-03</td>
<td align="center">C4</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2016-08-07</td>
<td align="center">J6</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">2010-02-11</td>
<td align="center">D2</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">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2010-06-21</td>
<td align="center">Q4</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">2012-12-14</td>
<td align="center">L5</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">F</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2016-04-25</td>
<td align="center">R4</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">2016-01-30</td>
<td align="center">S3</td>
<td align="center">Hospital D</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
@ -441,16 +441,16 @@ Longest: 1</p> @@ -441,16 +441,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,403</td>
<td align="right">52.02%</td>
<td align="right">10,403</td>
<td align="right">52.02%</td>
<td align="right">10,375</td>
<td align="right">51.88%</td>
<td align="right">10,375</td>
<td align="right">51.88%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,597</td>
<td align="right">47.99%</td>
<td align="right">9,625</td>
<td align="right">48.13%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -505,9 +505,9 @@ Longest: 1</p> @@ -505,9 +505,9 @@ Longest: 1</p>
<span class="co"># ℹ Using column 'patient_id' as input for `col_patient_id`.</span>
<span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span>
<span class="co"># 2</span>
<span class="co"># =&gt; Found 10,682 first weighted isolates (phenotype-based, 53.4% of total</span>
<span class="co"># =&gt; Found 10,550 first weighted isolates (phenotype-based, 52.8% of total</span>
<span class="co"># where a microbial ID was available)</span></code></pre></div>
<p>So only 53.4% 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 52.8% 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="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
@ -515,7 +515,7 @@ Longest: 1</p> @@ -515,7 +515,7 @@ Longest: 1</p>
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>So we end up with 10,682 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,550 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></code></pre></div>
<table class="table">
@ -531,7 +531,7 @@ Longest: 1</p> @@ -531,7 +531,7 @@ Longest: 1</p>
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="5%">
</colgroup>
@ -553,29 +553,13 @@ Longest: 1</p> @@ -553,29 +553,13 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">4</td>
<td align="center">2016-08-07</td>
<td align="center">J6</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">6</td>
<td align="center">2016-04-25</td>
<td align="center">R4</td>
<td align="center">Hospital A</td>
<td align="left">1</td>
<td align="center">2013-04-02</td>
<td align="center">X1</td>
<td align="center">Hospital D</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">F</td>
@ -584,63 +568,79 @@ Longest: 1</p> @@ -584,63 +568,79 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">10</td>
<td align="center">2016-01-17</td>
<td align="center">R3</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<tr class="even">
<td align="left">2</td>
<td align="center">2015-07-17</td>
<td align="center">X6</td>
<td align="center">Hospital A</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">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">11</td>
<td align="center">2013-01-18</td>
<td align="center">S1</td>
<tr class="odd">
<td align="left">4</td>
<td align="center">2010-02-11</td>
<td align="center">D2</td>
<td align="center">Hospital B</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">S</td>
<td align="center">F</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">16</td>
<td align="center">2017-07-05</td>
<td align="center">X9</td>
<tr class="even">
<td align="left">6</td>
<td align="center">2016-01-30</td>
<td align="center">S3</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">19</td>
<td align="center">2013-10-30</td>
<td align="center">D4</td>
<tr class="odd">
<td align="left">7</td>
<td align="center">2012-10-20</td>
<td align="center">D10</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</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="even">
<td align="left">8</td>
<td align="center">2016-03-28</td>
<td align="center">K7</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
@ -669,8 +669,8 @@ Longest: 1</p> @@ -669,8 +669,8 @@ Longest: 1</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,682<br>
Available: 10,682 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,550<br>
Available: 10,550 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -687,33 +687,33 @@ Longest: 24</p> @@ -687,33 +687,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,559</td>
<td align="right">42.68%</td>
<td align="right">4,559</td>
<td align="right">42.68%</td>
<td align="right">4,566</td>
<td align="right">43.28%</td>
<td align="right">4,566</td>
<td align="right">43.28%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,844</td>
<td align="right">26.62%</td>
<td align="right">7,403</td>
<td align="right">69.30%</td>
<td align="right">2,786</td>
<td align="right">26.41%</td>
<td align="right">7,352</td>
<td align="right">69.69%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,082</td>
<td align="right">19.49%</td>
<td align="right">9,485</td>
<td align="right">88.79%</td>
<td align="right">2,025</td>
<td align="right">19.19%</td>
<td align="right">9,377</td>
<td align="right">88.88%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,197</td>
<td align="right">11.21%</td>
<td align="right">10,682</td>
<td align="right">1,173</td>
<td align="right">11.12%</td>
<td align="right">10,550</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -760,12 +760,12 @@ Longest: 24</p> @@ -760,12 +760,12 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-08-07</td>
<td align="center">J6</td>
<td align="center">Hospital A</td>
<td align="center">2016-03-28</td>
<td align="center">K7</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</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">R</td>
<td align="center">M</td>
@ -775,58 +775,58 @@ Longest: 24</p> @@ -775,58 +775,58 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-01-17</td>
<td align="center">R3</td>
<td align="center">Hospital D</td>
<td align="center">2010-01-30</td>
<td align="center">A1</td>
<td align="center">Hospital A</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">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-07-05</td>
<td align="center">X9</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">2012-12-10</td>
<td align="center">M7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2013-10-30</td>
<td align="center">D4</td>
<td align="center">2012-08-04</td>
<td align="center">Y7</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</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">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</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>
<tr class="odd">
<td align="center">2012-02-20</td>
<td align="center">M7</td>
<td align="center">Hospital B</td>
<td align="center">2016-08-05</td>
<td align="center">I4</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">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
@ -835,13 +835,13 @@ Longest: 24</p> @@ -835,13 +835,13 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-02-18</td>
<td align="center">F5</td>
<td align="center">Hospital C</td>
<td align="center">2011-05-15</td>
<td align="center">H2</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</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>
@ -870,50 +870,50 @@ Longest: 24</p> @@ -870,50 +870,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2129</td>
<td align="center">151</td>
<td align="center">2279</td>
<td align="center">4559</td>
<td align="center">2148</td>
<td align="center">153</td>
<td align="center">2265</td>
<td align="center">4566</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3355</td>
<td align="center">151</td>
<td align="center">1053</td>
<td align="center">4559</td>
<td align="center">3344</td>
<td align="center">157</td>
<td align="center">1065</td>
<td align="center">4566</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3320</td>
<td align="center">3356</td>
<td align="center">0</td>
<td align="center">1239</td>
<td align="center">4559</td>
<td align="center">1210</td>
<td align="center">4566</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">3995</td>
<td align="center">3983</td>
<td align="center">0</td>
<td align="center">564</td>
<td align="center">4559</td>
<td align="center">583</td>
<td align="center">4566</td>
</tr>
<tr class="odd">
<td align="center">K. pneumoniae</td>
<td align="center">AMX</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">1197</td>
<td align="center">1197</td>
<td align="center">1173</td>
<td align="center">1173</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">949</td>
<td align="center">46</td>
<td align="center">202</td>
<td align="center">1197</td>
<td align="center">930</td>
<td align="center">43</td>
<td align="center">200</td>
<td align="center">1173</td>
</tr>
</tbody>
</table>
@ -936,34 +936,34 @@ Longest: 24</p> @@ -936,34 +936,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">3995</td>
<td align="center">3983</td>
<td align="center">0</td>
<td align="center">564</td>
<td align="center">4559</td>
<td align="center">583</td>
<td align="center">4566</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1077</td>
<td align="center">1063</td>
<td align="center">0</td>
<td align="center">120</td>
<td align="center">1197</td>
<td align="center">110</td>
<td align="center">1173</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2523</td>
<td align="center">2490</td>
<td align="center">0</td>
<td align="center">321</td>
<td align="center">2844</td>
<td align="center">296</td>
<td align="center">2786</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">2082</td>
<td align="center">2082</td>
<td align="center">2025</td>
<td align="center">2025</td>
</tr>
</tbody>
</table>
@ -977,7 +977,7 @@ Longest: 24</p> @@ -977,7 +977,7 @@ Longest: 24</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="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>
<span class="co"># [1] 0.5449354</span></code></pre></div>
<span class="co"># [1] 0.5443602</span></code></pre></div>
<p>Or can be used in conjunction 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="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -991,19 +991,19 @@ Longest: 24</p> @@ -991,19 +991,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5437286</td>
<td align="center">0.5542598</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5478284</td>
<td align="center">0.5400160</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5407268</td>
<td align="center">0.5508217</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5448113</td>
<td align="center">0.5322972</td>
</tr>
</tbody>
</table>
@ -1022,23 +1022,23 @@ Longest: 24</p> @@ -1022,23 +1022,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5437286</td>
<td align="center">3213</td>
<td align="center">0.5542598</td>
<td align="center">3087</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5478284</td>
<td align="center">3753</td>
<td align="center">0.5400160</td>
<td align="center">3761</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5407268</td>
<td align="center">1596</td>
<td align="center">0.5508217</td>
<td align="center">1643</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5448113</td>
<td align="center">2120</td>
<td align="center">0.5322972</td>
<td align="center">2059</td>
</tr>
</tbody>
</table>
@ -1059,27 +1059,27 @@ Longest: 24</p> @@ -1059,27 +1059,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7690283</td>
<td align="center">0.8762887</td>
<td align="center">0.9782847</td>
<td align="center">0.7667543</td>
<td align="center">0.8723171</td>
<td align="center">0.9770039</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8312448</td>
<td align="center">0.8997494</td>
<td align="center">0.9874687</td>
<td align="center">0.8294970</td>
<td align="center">0.9062234</td>
<td align="center">0.9795396</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7960619</td>
<td align="center">0.8871308</td>
<td align="center">0.9820675</td>
<td align="center">0.7910983</td>
<td align="center">0.8937545</td>
<td align="center">0.9852836</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5249760</td>
<td align="center">0.5387654</td>
<td align="center">0.0000000</td>
<td align="center">0.5249760</td>
<td align="center">0.5387654</td>
</tr>
</tbody>
</table>
@ -1163,19 +1163,16 @@ Longest: 24</p> @@ -1163,19 +1163,16 @@ Longest: 24</p>
<code class="sourceCode R"><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>
<span class="va">mic_values</span>
<span class="co"># Class &lt;mic&gt;</span>
<span class="co"># [1] 4 &lt;=0.0625 64 0.5 0.5 0.125 128 128 </span>
<span class="co"># [9] 0.5 &lt;=0.0625 4 32 256 0.25 64 8 </span>
<span class="co"># [17] 32 64 4 2 1 4 16 128 </span>
<span class="co"># [25] 128 32 &lt;=0.0625 32 2 4 16 0.125 </span>
<span class="co"># [33] 0.25 0.5 32 128 64 128 0.125 256 </span>
<span class="co"># [41] 1 &lt;=0.0625 64 1 0.25 0.5 &lt;=0.0625 64 </span>
<span class="co"># [49] 8 1 4 2 32 &lt;=0.0625 &lt;=0.0625 4 </span>
<span class="co"># [57] 128 4 32 128 128 32 0.25 64 </span>
<span class="co"># [65] 16 0.5 4 0.5 0.25 4 &lt;=0.0625 2 </span>
<span class="co"># [73] 0.125 0.5 256 &lt;=0.0625 0.5 1 256 0.25 </span>
<span class="co"># [81] 64 64 8 256 16 256 64 16 </span>
<span class="co"># [89] 128 0.125 8 &lt;=0.0625 4 16 128 128 </span>
<span class="co"># [97] 16 128 0.5 1</span></code></pre></div>
<span class="co"># [1] 2 2 16 4 0.125 0.5 64 16 128 32 </span>
<span class="co"># [11] 4 32 1 0.125 128 2 8 64 64 2 </span>
<span class="co"># [21] 8 0.125 0.25 1 16 64 0.25 0.5 0.25 4 </span>
<span class="co"># [31] 16 32 0.25 1 0.5 8 64 2 0.25 0.0625</span>
<span class="co"># [41] 128 1 2 2 0.0625 0.125 64 8 8 8 </span>
<span class="co"># [51] 4 8 0.125 1 128 1 128 2 2 0.5 </span>
<span class="co"># [61] 32 64 16 32 32 16 4 1 16 2 </span>
<span class="co"># [71] 1 0.125 2 4 0.125 32 2 0.125 8 0.25 </span>
<span class="co"># [81] 0.0625 4 0.5 16 128 8 128 0.125 0.0625 1 </span>
<span class="co"># [91] 1 0.25 0.0625 128 128 8 0.0625 32 128 0.25</span></code></pre></div>
<div class="sourceCode" id="cb36"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">mic_values</span><span class="op">)</span></code></pre></div>
@ -1204,10 +1201,10 @@ Longest: 24</p> @@ -1204,10 +1201,10 @@ Longest: 24</p>
<span class="co"># to review it.</span>
<span class="va">disk_values</span>
<span class="co"># Class &lt;disk&gt;</span>
<span class="co"># [1] 22 19 28 26 29 31 30 27 29 17 20 21 19 28 28 24 30 31 17 26 19 30 31 29 24</span>
<span class="co"># [26] 18 22 25 26 25 26 21 25 25 21 29 29 22 30 25 30 28 29 29 21 20 22 18 20 25</span>
<span class="co"># [51] 25 21 27 31 26 17 23 28 21 22 24 25 30 18 26 24 22 22 18 31 20 21 25 22 26</span>
<span class="co"># [76] 31 30 23 18 31 20 24 21 28 31 18 24 27 28 30 28 29 29 22 28 30 30 25 24 31</span></code></pre></div>
<span class="co"># [1] 31 27 25 19 19 17 23 24 30 28 22 26 18 29 25 24 22 30 17 20 23 24 26 24 27</span>
<span class="co"># [26] 22 27 22 17 26 22 31 27 31 31 25 21 18 26 22 21 25 21 26 22 21 20 20 24 19</span>
<span class="co"># [51] 25 17 29 26 28 30 30 29 30 28 19 28 22 21 26 25 24 23 21 18 27 20 17 29 30</span>
<span class="co"># [76] 17 25 19 30 22 26 22 31 18 19 26 20 18 23 17 30 30 22 21 25 21 17 30 30 24</span></code></pre></div>
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></code></pre></div>

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 51 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 29 KiB

BIN
docs/articles/AMR_files/figure-html/mic_plots-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 36 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

52
docs/articles/MDR.html

@ -339,17 +339,17 @@ Unique: 2</p> @@ -339,17 +339,17 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span>
<span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
<span class="co"># 1 R I I I S R</span>
<span class="co"># 2 R R S R S S</span>
<span class="co"># 3 I R S S S R</span>
<span class="co"># 4 I I I R S I</span>
<span class="co"># 5 I R R I R S</span>
<span class="co"># 6 R R R R I S</span>
<span class="co"># 1 I I I I S S</span>
<span class="co"># 2 R I S I I I</span>
<span class="co"># 3 S R R R R I</span>
<span class="co"># 4 S R S S R S</span>
<span class="co"># 5 R S I R S R</span>
<span class="co"># 6 R R R R I I</span>
<span class="co"># kanamycin</span>
<span class="co"># 1 S</span>
<span class="co"># 1 I</span>
<span class="co"># 2 I</span>
<span class="co"># 3 R</span>
<span class="co"># 4 S</span>
<span class="co"># 3 S</span>
<span class="co"># 4 R</span>
<span class="co"># 5 I</span>
<span class="co"># 6 I</span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
@ -367,7 +367,7 @@ Unique: 2</p> @@ -367,7 +367,7 @@ Unique: 2</p>
<p>Class: factor &gt; ordered (numeric)<br>
Length: 5,000<br>
Levels: 5: Negative &lt; Mono-resistant &lt; Poly-resistant &lt; Multi-drug-resistant &lt;<br>
Available: 5,000 (100%, NA: 0 = 0%)<br>
Available: 5,000 (100.0%, NA: 0 = 0.0%)<br>
Unique: 5</p>
<table class="table">
<thead><tr class="header">
@ -382,40 +382,40 @@ Unique: 5</p> @@ -382,40 +382,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3200</td>
<td align="right">64.00%</td>
<td align="right">3200</td>
<td align="right">64.00%</td>
<td align="right">3271</td>
<td align="right">65.42%</td>
<td align="right">3271</td>
<td align="right">65.42%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">1014</td>
<td align="right">20.28%</td>
<td align="right">4214</td>
<td align="right">84.28%</td>
<td align="right">949</td>
<td align="right">18.98%</td>
<td align="right">4220</td>
<td align="right">84.40%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">455</td>
<td align="right">9.10%</td>
<td align="right">449</td>
<td align="right">8.98%</td>
<td align="right">4669</td>
<td align="right">93.38%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">252</td>
<td align="right">5.04%</td>
<td align="right">4921</td>
<td align="right">98.42%</td>
<td align="right">240</td>
<td align="right">4.80%</td>
<td align="right">4909</td>
<td align="right">98.18%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">79</td>
<td align="right">1.58%</td>
<td align="right">91</td>
<td align="right">1.82%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

2
docs/articles/SPSS.html

@ -193,7 +193,7 @@ @@ -193,7 +193,7 @@
<h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">24 May 2021</h4>
<h4 class="date">26 May 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="hidden name"><code>SPSS.Rmd</code></div>

2
docs/articles/WHONET.html

@ -240,7 +240,7 @@ @@ -240,7 +240,7 @@
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 500<br>
Available: 500 (100%, NA: 0 = 0%)<br>
Available: 500 (100.0%, NA: 0 = 0.0%)<br>
Unique: 37</p>
<p>Shortest: 11<br>
Longest: 40</p>

85
docs/articles/benchmarks.html

@ -226,32 +226,19 @@ @@ -226,32 +226,19 @@
times <span class="op">=</span> <span class="fl">25</span><span class="op">)</span>
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max</span>
<span class="co"># as.mo("sau") 10.0 11.0 14.0 12.0 13.0 47.0</span>
<span class="co"># as.mo("stau") 53.0 56.0 78.0 58.0 94.0 220.0</span>
<span class="co"># as.mo("STAU") 53.0 54.0 69.0 58.0 92.0 99.0</span>
<span class="co"># as.mo("staaur") 10.0 11.0 15.0 11.0 12.0 47.0</span>
<span class="co"># as.mo("STAAUR") 9.4 11.0 14.0 11.0 12.0 64.0</span>
<span class="co"># as.mo("S. aureus") 24.0 26.0 44.0 33.0 63.0 69.0</span>
<span class="co"># as.mo("S aureus") 24.0 27.0 40.0 30.0 61.0 70.0</span>
<span class="co"># as.mo("Staphylococcus aureus") 2.6 3.1 3.2 3.2 3.3 3.8</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 230.0 250.0 250.0 250.0 250.0 280.0</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 180.0 190.0 200.0 190.0 200.0 330.0</span>
<span class="co"># as.mo("MRSA") 10.0 11.0 16.0 12.0 13.0 47.0</span>
<span class="co"># as.mo("VISA") 17.0 19.0 22.0 19.0 22.0 63.0</span>
<span class="co"># neval</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span></code></pre></div>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># as.mo("sau") 10.0 11.0 16.0 11.0 13.0 50 25</span>
<span class="co"># as.mo("stau") 54.0 58.0 72.0 61.0 89.0 99 25</span>
<span class="co"># as.mo("STAU") 53.0 55.0 67.0 56.0 91.0 95 25</span>
<span class="co"># as.mo("staaur") 10.0 11.0 16.0 11.0 13.0 47 25</span>
<span class="co"># as.mo("STAAUR") 10.0 11.0 17.0 12.0 13.0 58 25</span>
<span class="co"># as.mo("S. aureus") 26.0 27.0 36.0 31.0 33.0 70 25</span>
<span class="co"># as.mo("S aureus") 26.0 27.0 40.0 29.0 61.0 68 25</span>
<span class="co"># as.mo("Staphylococcus aureus") 2.6 3.2 6.5 3.5 3.8 42 25</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 240.0 250.0 260.0 260.0 270.0 290 25</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 190.0 190.0 200.0 200.0 210.0 300 25</span>
<span class="co"># as.mo("MRSA") 10.0 11.0 13.0 12.0 13.0 40 25</span>
<span class="co"># as.mo("VISA") 18.0 19.0 32.0 20.0 24.0 130 25</span></code></pre></div>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-4-1.png" width="750"></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 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 200 times slower to determine.</p>
<p>To improve performance, we implemented two important algorithms to save unnecessary calculations: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
@ -273,8 +260,8 @@ @@ -273,8 +260,8 @@
<span class="co"># what do these values look like? They are of class &lt;mo&gt;:</span>
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
<span class="co"># Class &lt;mo&gt;</span>
<span class="co"># [1] B_STRPT_PNMN B_STPHY_CONS B_ESCHR_COLI B_STRPT_PNMN B_ESCHR_COLI</span>
<span class="co"># [6] B_ENTRC_FCLS</span>
<span class="co"># [1] B_STPHY_EPDR B_STRPT_GRPA B_STPHY_AURS B_BCTRD_FRGL B_STPHY_HMNS</span>
<span class="co"># [6] B_STPHY_CONS</span>
<span class="co"># as the example_isolates data set has 2,000 rows, we should have 2 million items</span>
<span class="fu"><a href="https://rdrr.io/r/base/length.html">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
@ -290,8 +277,8 @@ @@ -290,8 +277,8 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># mo_name(x) 180 186 215 221 222 281 10</span></code></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.221 seconds. That is 110 nanoseconds on average. You only lose time on your unique input values.</p>
<span class="co"># mo_name(x) 187 223 233 226 229 318 10</span></code></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.226 seconds. That is 113 nanoseconds on average. You only lose time on your unique input values.</p>
</div>
<div id="precalculated-results" class="section level3">
<h3 class="hasAnchor">
@ -305,10 +292,10 @@ @@ -305,10 +292,10 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 7.45 7.68 8.13 8.23 8.39 8.95 10</span>
<span class="co"># B 22.70 22.90 31.30 23.90 26.50 62.00 10</span>
<span class="co"># C 1.51 1.58 1.79 1.84 1.97 1.99 10</span></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.0018 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<span class="co"># A 7.28 7.59 8.01 8.03 8.45 8.66 10</span>
<span class="co"># B 23.00 24.10 30.30 25.50 27.30 75.30 10</span>
<span class="co"># C 1.55 1.74 7.31 1.95 2.01 56.10 10</span></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.0019 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>