(v1.7.1) New CRAN release

v1.8.2 v1.7.1
parent 279376fccb
commit 7e70403efb
  1. 5
      DESCRIPTION
  2. 18
      NEWS.md
  3. 5
      R/ab_class_selectors.R
  4. BIN
      R/sysdata.rda
  5. 9
      README.md
  6. 2
      cran-comments.md
  7. BIN
      data-raw/AMR_latest.tar.gz
  8. 1
      data-raw/_internals.R
  9. 2
      docs/404.html
  10. 2
      docs/LICENSE-text.html
  11. 430
      docs/articles/AMR.html
  12. BIN
      docs/articles/AMR_files/figure-html/disk_plots-1.png
  13. BIN
      docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png
  14. BIN
      docs/articles/AMR_files/figure-html/mic_plots-1.png
  15. BIN
      docs/articles/AMR_files/figure-html/mic_plots-2.png
  16. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png
  17. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png
  18. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  19. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  20. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  21. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  22. 2
      docs/articles/EUCAST.html
  23. 58
      docs/articles/MDR.html
  24. 2
      docs/articles/PCA.html
  25. 6
      docs/articles/SPSS.html
  26. 2
      docs/articles/WHONET.html
  27. 78
      docs/articles/benchmarks.html
  28. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  29. 6
      docs/articles/datasets.html
  30. 2
      docs/articles/index.html
  31. 2
      docs/articles/resistance_predict.html
  32. 2
      docs/articles/welcome_to_AMR.html
  33. 2
      docs/authors.html
  34. 28
      docs/index.html
  35. 171
      docs/news/index.html
  36. 2
      docs/pkgdown.yml
  37. 2
      docs/reference/AMR-deprecated.html
  38. 2
      docs/reference/AMR.html
  39. 2
      docs/reference/WHOCC.html
  40. 2
      docs/reference/WHONET.html
  41. 2
      docs/reference/ab_from_text.html
  42. 2
      docs/reference/ab_property.html
  43. 2
      docs/reference/age.html
  44. 2
      docs/reference/age_groups.html
  45. 1207
      docs/reference/antibiotic_class_selectors.html
  46. 2
      docs/reference/antibiotics.html
  47. 2
      docs/reference/as.ab.html
  48. 2
      docs/reference/as.disk.html
  49. 2
      docs/reference/as.mic.html
  50. 2
      docs/reference/as.mo.html
  51. 2
      docs/reference/as.rsi.html
  52. 2
      docs/reference/atc_online.html
  53. 2
      docs/reference/availability.html
  54. 2
      docs/reference/bug_drug_combinations.html
  55. 2
      docs/reference/catalogue_of_life.html
  56. 2
      docs/reference/catalogue_of_life_version.html
  57. 2
      docs/reference/count.html
  58. 2
      docs/reference/custom_eucast_rules.html
  59. 2
      docs/reference/dosage.html
  60. 2
      docs/reference/eucast_rules.html
  61. 2
      docs/reference/example_isolates.html
  62. 2
      docs/reference/example_isolates_unclean.html
  63. 2
      docs/reference/first_isolate.html
  64. 2
      docs/reference/g.test.html
  65. 2
      docs/reference/get_episode.html
  66. 2
      docs/reference/ggplot_pca.html
  67. 2
      docs/reference/ggplot_rsi.html
  68. 2
      docs/reference/guess_ab_col.html
  69. 2
      docs/reference/index.html
  70. 2
      docs/reference/intrinsic_resistant.html
  71. 2
      docs/reference/italicise_taxonomy.html
  72. 2
      docs/reference/join.html
  73. 2
      docs/reference/key_antimicrobials.html
  74. 2
      docs/reference/kurtosis.html
  75. 2
      docs/reference/lifecycle.html
  76. 2
      docs/reference/like.html
  77. 2
      docs/reference/mdro.html
  78. 2
      docs/reference/microorganisms.codes.html
  79. 2
      docs/reference/microorganisms.html
  80. 2
      docs/reference/microorganisms.old.html
  81. 2
      docs/reference/mo_matching_score.html
  82. 2
      docs/reference/mo_property.html
  83. 2
      docs/reference/mo_source.html
  84. 2
      docs/reference/pca.html
  85. 2
      docs/reference/plot.html
  86. 2
      docs/reference/proportion.html
  87. 2
      docs/reference/random.html
  88. 2
      docs/reference/resistance_predict.html
  89. 2
      docs/reference/rsi_translation.html
  90. 2
      docs/reference/skewness.html
  91. 2
      docs/reference/translate.html
  92. 2
      docs/survey.html
  93. 35
      index.md
  94. 5
      man/antibiotic_class_selectors.Rd

@ -1,6 +1,6 @@
Package: AMR
Version: 1.7.0.9002
Date: 2021-06-01
Version: 1.7.1
Date: 2021-06-03
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(
person(role = c("aut", "cre"),
@ -43,7 +43,6 @@ Depends:
R (>= 3.0.0)
Suggests:
cleaner,
covr,
curl,
dplyr,
ggplot2,

@ -1,18 +1,8 @@
# `AMR` 1.7.0.9002
## <small>Last updated: 1 June 2021</small>
### New
* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
### Changed
* `bug_drug_combinations()` now supports grouping using the `dplyr` package
* As requested by CRAN administrators: decreased package size by 3 MB in costs of a ~50 times slower loading time of the package (i.e., `library(AMR)`)
# `AMR` 1.7.0
# `AMR` 1.7.1
### Breaking change
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release.
* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:
```r
# select columns with results for carbapenems
example_isolates[, carbapenems()] # base R
@ -45,6 +35,7 @@
### Changed
* `bug_drug_combinations()` now supports grouping using the `dplyr` package
* Custom MDRO guidelines (`mdro()`, `custom_mdro_guideline()`):
* Custom MDRO guidelines can now be combined with other custom MDRO guidelines using `c()`
* Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule
@ -77,6 +68,7 @@
* `age()` now vectorises over both `x` and `reference`
### Other
* As requested by CRAN administrators: decreased package size by 3 MB in costs of a slower loading time of the package
* All unit tests are now processed by the `tinytest` package, instead of the `testthat` package. The `testthat` package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the `tinytest` package is very lightweight and dependency-free.

@ -73,6 +73,11 @@
#' \donttest{
#' if (require("dplyr")) {
#'
#' # get AMR for all aminoglycosides e.g., per hospital:
#' example_isolates %>%
#' group_by(hospital_id) %>%
#' summarise(across(aminoglycosides(), resistance))
#'
#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
#' example_isolates %>%
#' select(carbapenems())

Binary file not shown.

@ -23,14 +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).
You have to add [our R-universe address](https://msberends.r-universe.dev) to your list of repositories ('repos'), by running:
```r
options(repos = c(getOption("repos"),
msberends = "https://msberends.r-universe.dev"))
```
You can now install or update the `AMR` package in the same way you are used to:
You can install or update the `AMR` package from CRAN using:
```r
install.packages("AMR")

@ -1 +1 @@
* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. The package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software earlier this year. We will add the paper as a vignette after publication in a next version. All data sets were compressed using `compression = "xz"` to make them as small as possible. We try to update as infrequent as possible.
* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. This package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package, following 15 previous releases of this package. All data sets were compressed using `compression = "xz"` to make them as small as possible.

Binary file not shown.

@ -146,7 +146,6 @@ usethis::use_data(eucast_rules_file,
LANGUAGES_SUPPORTED,
MO_CONS,
MO_COPS,
AB_lookup,
AMINOGLYCOSIDES,
AMINOPENICILLINS,
CARBAPENEMS,

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

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<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">1.7.0.9002</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
</span>
</div>

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<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">1.7.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
</span>
</div>
@ -193,7 +193,7 @@
<h1 data-toc-skip>How to conduct AMR data analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">26 May 2021</h4>
<h4 class="date">03 June 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -202,7 +202,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 26 May 2021.</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 03 June 2021.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -233,21 +233,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2021-05-26</td>
<td align="center">2021-06-03</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2021-05-26</td>
<td align="center">2021-06-03</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2021-05-26</td>
<td align="center">2021-06-03</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -344,52 +344,52 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2013-04-02</td>
<td align="center">X1</td>
<td align="center">Hospital D</td>
<td align="center">2014-11-23</td>
<td align="center">A2</td>
<td align="center">Hospital B</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">F</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2015-07-17</td>
<td align="center">X6</td>
<td align="center">Hospital A</td>
<td align="center">2013-08-17</td>
<td align="center">V3</td>
<td align="center">Hospital D</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">F</td>
</tr>
<tr class="odd">
<td align="center">2012-09-03</td>
<td align="center">C4</td>
<td align="center">2011-02-20</td>
<td align="center">B1</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">Streptococcus pneumoniae</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>
</tr>
<tr class="even">
<td align="center">2010-02-11</td>
<td align="center">D2</td>
<td align="center">Hospital B</td>
<td align="center">2016-10-04</td>
<td align="center">U3</td>
<td align="center">Hospital A</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">M</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2012-12-14</td>
<td align="center">L5</td>
<td align="center">2010-04-22</td>
<td align="center">F1</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
@ -399,12 +399,12 @@
<td align="center">M</td>
</tr>
<tr class="even">
<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">2013-01-15</td>
<td align="center">W4</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">F</td>
@ -441,16 +441,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</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>
<td align="right">10,416</td>
<td align="right">52.08%</td>
<td align="right">10,416</td>
<td align="right">52.08%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,625</td>
<td align="right">48.13%</td>
<td align="right">9,584</td>
<td align="right">47.92%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -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,550 first weighted isolates (phenotype-based, 52.8% of total</span>
<span class="co"># =&gt; Found 10,645 first weighted isolates (phenotype-based, 53.2% of total</span>
<span class="co"># where a microbial ID was available)</span></code></pre></div>
<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>
<p>So only 53.2% 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>
<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,550 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,645 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">
@ -553,41 +553,41 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2013-04-02</td>
<td align="center">X1</td>
<td align="left">2</td>
<td align="center">2013-08-17</td>
<td align="center">V3</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</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-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</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">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="left">3</td>
<td align="center">2011-02-20</td>
<td align="center">B1</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">F</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">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">4</td>
<td align="center">2010-02-11</td>
<td align="center">D2</td>
<td align="left">5</td>
<td align="center">2010-04-22</td>
<td align="center">F1</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
@ -601,51 +601,51 @@ Longest: 1</p>
<td align="center">TRUE</td>
</tr>
<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_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">F</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="odd">
<td align="left">7</td>
<td align="center">2012-10-20</td>
<td align="center">D10</td>
<td align="center">2014-07-28</td>
<td align="center">W5</td>
<td align="center">Hospital B</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">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="odd">
<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">2015-01-06</td>
<td align="center">V3</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-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">9</td>
<td align="center">2014-03-16</td>
<td align="center">H4</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</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">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -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,550<br>
Available: 10,550 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,645<br>
Available: 10,645 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
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,566</td>
<td align="right">43.28%</td>
<td align="right">4,566</td>
<td align="right">43.28%</td>
<td align="right">4,652</td>
<td align="right">43.70%</td>
<td align="right">4,652</td>
<td align="right">43.70%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</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>
<td align="right">2,744</td>
<td align="right">25.78%</td>
<td align="right">7,396</td>
<td align="right">69.48%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</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>
<td align="right">2,052</td>
<td align="right">19.28%</td>
<td align="right">9,448</td>
<td align="right">88.76%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,173</td>
<td align="right">11.12%</td>
<td align="right">10,550</td>
<td align="right">1,197</td>
<td align="right">11.24%</td>
<td align="right">10,645</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -760,8 +760,8 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-03-28</td>
<td align="center">K7</td>
<td align="center">2011-02-20</td>
<td align="center">B1</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
@ -775,9 +775,24 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-01-30</td>
<td align="center">A1</td>
<td align="center">2015-01-06</td>
<td align="center">V3</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-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-05-03</td>
<td align="center">B2</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
@ -789,13 +804,13 @@ Longest: 24</p>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2012-12-10</td>
<td align="center">M7</td>
<td align="center">Hospital A</td>
<tr class="even">
<td align="center">2017-03-18</td>
<td align="center">K10</td>
<td align="center">Hospital D</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">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
@ -804,29 +819,29 @@ Longest: 24</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2012-08-04</td>
<td align="center">Y7</td>
<tr class="odd">
<td align="center">2010-12-15</td>
<td align="center">H3</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</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">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</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">2016-08-05</td>
<td align="center">I4</td>
<td align="center">Hospital A</td>
<tr class="even">
<td align="center">2017-08-10</td>
<td align="center">N2</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</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">M</td>
<td align="center">Gram-negative</td>
@ -834,21 +849,6 @@ Longest: 24</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<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">R</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>
</tbody>
</table>
<p>If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> function:</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">2148</td>
<td align="center">153</td>
<td align="center">2265</td>
<td align="center">4566</td>
<td align="center">2232</td>
<td align="center">119</td>
<td align="center">2301</td>
<td align="center">4652</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3344</td>
<td align="center">157</td>
<td align="center">1065</td>
<td align="center">4566</td>
<td align="center">3424</td>
<td align="center">165</td>
<td align="center">1063</td>
<td align="center">4652</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3356</td>
<td align="center">3386</td>
<td align="center">0</td>
<td align="center">1210</td>
<td align="center">4566</td>
<td align="center">1266</td>
<td align="center">4652</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">3983</td>
<td align="center">4062</td>
<td align="center">0</td>
<td align="center">583</td>
<td align="center">4566</td>
<td align="center">590</td>
<td align="center">4652</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">1173</td>
<td align="center">1173</td>
<td align="center">1197</td>
<td align="center">1197</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">930</td>
<td align="center">43</td>
<td align="center">200</td>
<td align="center">1173</td>
<td align="center">932</td>
<td align="center">60</td>
<td align="center">205</td>
<td align="center">1197</td>
</tr>
</tbody>
</table>
@ -936,34 +936,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">3983</td>
<td align="center">4062</td>
<td align="center">0</td>
<td align="center">583</td>
<td align="center">4566</td>
<td align="center">590</td>
<td align="center">4652</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1063</td>
<td align="center">1069</td>
<td align="center">0</td>
<td align="center">110</td>
<td align="center">1173</td>
<td align="center">128</td>
<td align="center">1197</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2490</td>
<td align="center">2444</td>
<td align="center">0</td>
<td align="center">296</td>
<td align="center">2786</td>
<td align="center">300</td>
<td align="center">2744</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">2025</td>
<td align="center">2025</td>
<td align="center">2052</td>
<td align="center">2052</td>
</tr>
</tbody>
</table>
@ -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.5443602</span></code></pre></div>
<span class="co"># [1] 0.5431658</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>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5542598</td>
<td align="center">0.5461634</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5400160</td>
<td align="center">0.5394702</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5508217</td>
<td align="center">0.5609756</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5322972</td>
<td align="center">0.5316215</td>
</tr>
</tbody>
</table>
@ -1022,23 +1022,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5542598</td>
<td align="center">3087</td>
<td align="center">0.5461634</td>
<td align="center">3206</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5400160</td>
<td align="center">3761</td>
<td align="center">0.5394702</td>
<td align="center">3737</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5508217</td>
<td align="center">1643</td>
<td align="center">0.5609756</td>
<td align="center">1599</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5322972</td>
<td align="center">2059</td>
<td align="center">0.5316215</td>
<td align="center">2103</td>
</tr>
</tbody>
</table>
@ -1059,27 +1059,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7667543</td>
<td align="center">0.8723171</td>
<td align="center">0.9770039</td>
<td align="center">0.7714961</td>
<td align="center">0.8731728</td>
<td align="center">0.9776440</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8294970</td>
<td align="center">0.9062234</td>
<td align="center">0.9795396</td>
<td align="center">0.8287385</td>
<td align="center">0.8930660</td>
<td align="center">0.9824561</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7910983</td>
<td align="center">0.8937545</td>
<td align="center">0.9852836</td>
<td align="center">0.7882653</td>
<td align="center">0.8906706</td>
<td align="center">0.9839650</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5387654</td>
<td align="center">0.5414230</td>
<td align="center">0.0000000</td>
<td align="center">0.5387654</td>
<td align="center">0.5414230</td>
</tr>
</tbody>
</table>
@ -1163,16 +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] 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>
<span class="co"># [1] 4 4 0.25 &gt;=512 0.0625 2 128 2 64 1 </span>
<span class="co"># [11] 64 256 32 2 2 256 0.125 128 16 32 </span>
<span class="co"># [21] 1 2 0.0625 32 16 16 0.0625 0.125 0.0625 2 </span>
<span class="co"># [31] 128 8 0.0625 0.25 4 16 1 0.0625 1 16 </span>
<span class="co"># [41] 4 0.0625 2 4 0.0625 256 16 0.5 1 1 </span>
<span class="co"># [51] 16 64 &gt;=512 64 64 1 4 0.5 16 1 </span>
<span class="co"># [61] 16 256 8 256 256 &gt;=512 8 0.5 2 2 </span>
<span class="co"># [71] &gt;=512 8 64 4 8 0.25 2 4 16 0.125 </span>
<span class="co"># [81] 0.25 4 0.125 8 0.125 0.0625 &gt;=512 0.125 64 1 </span>
<span class="co"># [91] 16 2 0.5 16 0.0625 128 2 0.0625 128 2</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>
@ -1201,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] 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>
<span class="co"># [1] 27 28 23 21 23 21 28 31 26 17 23 23 24 29 20 18 27 24 26 24 27 23 30 18 26</span>
<span class="co"># [26] 31 19 26 21 27 29 29 19 19 31 25 23 19 26 21 21 20 23 29 22 18 27 28 21 27</span>
<span class="co"># [51] 21 18 19 28 26 26 29 20 31 28 30 30 21 21 25 29 28 29 30 25 27 19 23 26 24</span>
<span class="co"># [76] 20 21 25 19 26 22 19 30 28 27 18 19 18 25 31 20 19 29 31 31 29 22 20 17 31</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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<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">1.7.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
</span>
</div>

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<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">1.7.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
</span>
</div>
@ -339,19 +339,19 @@ 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 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"># 1 S I R R R S</span>
<span class="co"># 2 I R R R R R</span>
<span class="co"># 3 S S S R I R</span>
<span class="co"># 4 R I R R S S</span>
<span class="co"># 5 I R S S R I</span>
<span class="co"># 6 I S S R R R</span>
<span class="co"># kanamycin</span>
<span class="co"># 1 I</span>
<span class="co"># 2 I</span>
<span class="co"># 3 S</span>
<span class="co"># 2 R</span>
<span class="co"># 3 R</span>
<span class="co"># 4 R</span>
<span class="co"># 5 I</span>
<span class="co"># 6 I</span></code></pre></div>
<span class="co"># 5 S</span>
<span class="co"># 6 S</span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">my_TB_data</span>, guideline <span class="op">=</span> <span class="st">"TB"</span><span class="op">)</span></code></pre></div>
@ -382,40 +382,40 @@ Unique: 5</p>
<tr class="odd">