Browse Source

(v1.7.1.9068) new logo, unit tests

development
parent
commit
1e66a3daf3
  1. 2
      DESCRIPTION
  2. 2
      NEWS.md
  3. 2
      R/first_isolate.R
  4. BIN
      R/sysdata.rda
  5. 2
      R/translate.R
  6. 2
      README.md
  7. 7101
      data-raw/AMR_intro.ai
  8. BIN
      data-raw/AMR_latest.tar.gz
  9. 2
      data-raw/_internals.R
  10. 6882
      data-raw/logo.svg
  11. 4
      docs/404.html
  12. BIN
      docs/AMR_intro.png
  13. 1
      docs/AMR_intro.svg
  14. 4
      docs/LICENSE-text.html
  15. BIN
      docs/android-chrome-192x192.png
  16. BIN
      docs/android-chrome-512x512.png
  17. BIN
      docs/apple-touch-icon-120x120.png
  18. BIN
      docs/apple-touch-icon-152x152.png
  19. BIN
      docs/apple-touch-icon-180x180.png
  20. BIN
      docs/apple-touch-icon-60x60.png
  21. BIN
      docs/apple-touch-icon-76x76.png
  22. BIN
      docs/apple-touch-icon.png
  23. 524
      docs/articles/AMR.html
  24. BIN
      docs/articles/AMR_files/figure-html/disk_plots-1.png
  25. BIN
      docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png
  26. BIN
      docs/articles/AMR_files/figure-html/mic_plots-1.png
  27. BIN
      docs/articles/AMR_files/figure-html/mic_plots-2.png
  28. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png
  29. BIN
      docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png
  30. BIN
      docs/articles/AMR_files/figure-html/plot 1-1.png
  31. BIN
      docs/articles/AMR_files/figure-html/plot 3-1.png
  32. BIN
      docs/articles/AMR_files/figure-html/plot 4-1.png
  33. BIN
      docs/articles/AMR_files/figure-html/plot 5-1.png
  34. 4
      docs/articles/EUCAST.html
  35. 48
      docs/articles/MDR.html
  36. 4
      docs/articles/PCA.html
  37. 6
      docs/articles/SPSS.html
  38. 4
      docs/articles/WHONET.html
  39. 78
      docs/articles/benchmarks.html
  40. BIN
      docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png
  41. 4
      docs/articles/datasets.html
  42. 4
      docs/articles/index.html
  43. 4
      docs/articles/resistance_predict.html
  44. 4
      docs/articles/welcome_to_AMR.html
  45. 4
      docs/authors.html
  46. 10
      docs/browserconfig.xml
  47. 1
      docs/extra.css
  48. BIN
      docs/favicon-16x16.png
  49. BIN
      docs/favicon-32x32.png
  50. BIN
      docs/favicon.ico
  51. 6
      docs/index.html
  52. BIN
      docs/logo.png
  53. 3335
      docs/logo.svg
  54. BIN
      docs/mstile-150x150.png
  55. BIN
      docs/mstile-310x310.png
  56. 62
      docs/news/index.html
  57. BIN
      docs/package-logo.png
  58. 2
      docs/pkgdown.yml
  59. 4
      docs/reference/AMR-deprecated.html
  60. 4
      docs/reference/AMR.html
  61. 4
      docs/reference/WHOCC.html
  62. 4
      docs/reference/WHONET.html
  63. 4
      docs/reference/ab_from_text.html
  64. 4
      docs/reference/ab_property.html
  65. 4
      docs/reference/age.html
  66. 4
      docs/reference/age_groups.html
  67. 4
      docs/reference/antibiotic_class_selectors.html
  68. 4
      docs/reference/antibiotics.html
  69. 4
      docs/reference/as.ab.html
  70. 4
      docs/reference/as.disk.html
  71. 4
      docs/reference/as.mic.html
  72. 4
      docs/reference/as.mo.html
  73. 4
      docs/reference/as.rsi.html
  74. 4
      docs/reference/atc_online.html
  75. 4
      docs/reference/availability.html
  76. 4
      docs/reference/bug_drug_combinations.html
  77. 4
      docs/reference/catalogue_of_life.html
  78. 4
      docs/reference/catalogue_of_life_version.html
  79. 4
      docs/reference/count.html
  80. 4
      docs/reference/custom_eucast_rules.html
  81. 4
      docs/reference/dosage.html
  82. 4
      docs/reference/eucast_rules.html
  83. 4
      docs/reference/example_isolates.html
  84. 4
      docs/reference/example_isolates_unclean.html
  85. 4
      docs/reference/first_isolate.html
  86. 4
      docs/reference/g.test.html
  87. 4
      docs/reference/get_episode.html
  88. 4
      docs/reference/ggplot_pca.html
  89. 4
      docs/reference/ggplot_rsi.html
  90. 4
      docs/reference/guess_ab_col.html
  91. 4
      docs/reference/index.html
  92. 4
      docs/reference/intrinsic_resistant.html
  93. 4
      docs/reference/italicise_taxonomy.html
  94. 4
      docs/reference/join.html
  95. 4
      docs/reference/key_antimicrobials.html
  96. 4
      docs/reference/kurtosis.html
  97. 4
      docs/reference/lifecycle.html
  98. 4
      docs/reference/like.html
  99. 4
      docs/reference/mdro.html
  100. 4
      docs/reference/microorganisms.codes.html
  101. Some files were not shown because too many files have changed in this diff Show More

2
DESCRIPTION

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Package: AMR
Version: 1.7.1.9067
Version: 1.7.1.9068
Date: 2021-12-12
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)

2
NEWS.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
# `AMR` 1.7.1.9067
# `AMR` 1.7.1.9068
## <small>Last updated: 12 December 2021</small>
### Breaking changes

2
R/first_isolate.R

@ -490,8 +490,6 @@ first_isolate <- function(x = NULL, @@ -490,8 +490,6 @@ first_isolate <- function(x = NULL,
FALSE)
} else {
# no key antibiotics
x1 <<- x$other_pat_or_mo
x2 <<- x$more_than_episode_ago
x$newvar_first_isolate <- pm_if_else(x$newvar_row_index_sorted >= row.start &
x$newvar_row_index_sorted <= row.end &
x$newvar_genus_species != "" &

BIN
R/sysdata.rda

Binary file not shown.

2
R/translate.R

@ -133,7 +133,7 @@ coerce_language_setting <- function(lang) { @@ -133,7 +133,7 @@ coerce_language_setting <- function(lang) {
"fr"
} else if (grepl("^(Portuguese|Portugu.+s|pt_|PT_)", lang, ignore.case = FALSE, perl = TRUE)) {
"pt"
} else if (grepl("^(Russian|русс|ru_|RU_)", lang, ignore.case = FALSE, perl = TRUE)) {
} else if (grepl("^(Russian|pycc|ru_|RU_)", lang, ignore.case = FALSE, perl = TRUE)) {
"ru"
} else if (grepl("^(Swedish|Svenskt|sv_|SV_)", lang, ignore.case = FALSE, perl = TRUE)) {
"sv"

2
README.md

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
[![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/main/graph/badge.svg)](https://codecov.io/gh/msberends/AMR?branch=main)
<img src="https://msberends.github.io/AMR/works_great_on.png" align="center" height="150px" />
<img src="https://msberends.github.io/AMR/AMR_intro.svg" align="center" height="300px" />
The latest built **source package** (`AMR_latest.tar.gz`) can be found in folder [/data-raw/](https://github.com/msberends/AMR/tree/main/data-raw).

7101
data-raw/AMR_intro.ai

File diff suppressed because one or more lines are too long

BIN
data-raw/AMR_latest.tar.gz

Binary file not shown.

2
data-raw/_internals.R

@ -69,8 +69,8 @@ TRANSLATIONS <- utils::read.delim(file = "data-raw/translations.tsv", @@ -69,8 +69,8 @@ TRANSLATIONS <- utils::read.delim(file = "data-raw/translations.tsv",
# for checking input in `language` argument in e.g. mo_*() and ab_*() functions
LANGUAGES_SUPPORTED <- c(Danish = "da",
English = "en",
German = "de",
English = "en",
Spanish = "es",
French = "fr",
Italian = "it",

6882
data-raw/logo.svg

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 164 KiB

4
docs/404.html

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="https://msberends.github.io/AMR/pkgdown.css" rel="stylesheet">
<script src="https://msberends.github.io/AMR/pkgdown.js"></script><link href="https://msberends.github.io/AMR/extra.css" rel="stylesheet">
<script src="https://msberends.github.io/AMR/extra.js"></script><meta property="og:title" content="Page not found (404)">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.svg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@msberends">
<meta name="twitter:site" content="@univgroningen">
@ -43,7 +43,7 @@ @@ -43,7 +43,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="Released version">1.7.1.9067</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9068</span>
</span>
</div>

BIN
docs/AMR_intro.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

1
docs/AMR_intro.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 245 KiB

4
docs/LICENSE-text.html

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>License • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"><script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"><script src="pkgdown.js"></script><link href="extra.css" rel="stylesheet"><script src="extra.js"></script><meta property="og:title" content="License"><meta property="og:image" content="https://msberends.github.io/AMR/logo.png"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@univgroningen"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>License • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"><script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"><script src="pkgdown.js"></script><link href="extra.css" rel="stylesheet"><script src="extra.js"></script><meta property="og:title" content="License"><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@univgroningen"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
@ -17,7 +17,7 @@ @@ -17,7 +17,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="Released version">1.7.1.9067</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9068</span>
</span>
</div>

BIN
docs/android-chrome-192x192.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/android-chrome-512x512.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
docs/apple-touch-icon-120x120.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
docs/apple-touch-icon-152x152.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
docs/apple-touch-icon-180x180.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
docs/apple-touch-icon-60x60.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
docs/apple-touch-icon-76x76.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
docs/apple-touch-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

524
docs/articles/AMR.html

</
@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script><meta property="og:title" content="How to conduct AMR data analysis">
<meta property="og:description" content="AMR">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png">
<meta property="og:image" content="https://msberends.github.io/AMR/logo.svg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@msberends">
<meta name="twitter:site" content="@univgroningen">
@ -44,7 +44,7 @@ @@ -44,7 +44,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="Released version">1.7.1.9064</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9068</span>
</span>
</div>
@ -191,7 +191,7 @@ @@ -191,7 +191,7 @@
<h1 data-toc-skip>How to conduct AMR data analysis</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="date">11 December 2021</h4>
<h4 data-toc-skip class="date">12 December 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -200,7 +200,7 @@ @@ -200,7 +200,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/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 11 December 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/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 12 December 2021.</p>
<div class="section level1">
<h1 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h1>
@ -231,21 +231,21 @@ @@ -231,21 +231,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2021-12-11</td>
<td align="center">2021-12-12</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-12-11</td>
<td align="center">2021-12-12</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-12-11</td>
<td align="center">2021-12-12</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -342,67 +342,67 @@ @@ -342,67 +342,67 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2011-06-27</td>
<td align="center">V5</td>
<td align="center">Hospital B</td>
<td align="center">2014-11-21</td>
<td align="center">L5</td>
<td align="center">Hospital C</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">F</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2015-07-06</td>
<td align="center">O8</td>
<td align="center">2015-03-18</td>
<td align="center">G9</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</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">M</td>
</tr>
<tr class="odd">
<td align="center">2013-08-29</td>
<td align="center">Q6</td>
<td align="center">2011-10-31</td>
<td align="center">Z3</td>
<td align="center">Hospital A</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">F</td>
</tr>
<tr class="even">
<td align="center">2012-05-28</td>
<td align="center">S1</td>
<td align="center">2017-05-24</td>
<td align="center">A3</td>
<td align="center">Hospital A</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">R</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">R</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2015-10-19</td>
<td align="center">Q1</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">2013-01-31</td>
<td align="center">Y10</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">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-12-02</td>
<td align="center">E2</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">2013-04-13</td>
<td align="center">L6</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
@ -439,16 +439,16 @@ Longest: 1</p> @@ -439,16 +439,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,551</td>
<td align="right">52.76%</td>
<td align="right">10,551</td>
<td align="right">52.76%</td>
<td align="right">10,451</td>
<td align="right">52.26%</td>
<td align="right">10,451</td>
<td align="right">52.26%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,449</td>
<td align="right">47.25%</td>
<td align="right">9,549</td>
<td align="right">47.75%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -502,9 +502,9 @@ Longest: 1</p> @@ -502,9 +502,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,742 'phenotype-based' first isolates (53.7% of total where a</span>
<span class="co"># =&gt; Found 10,684 'phenotype-based' first isolates (53.4% of total where a</span>
<span class="co"># microbial ID was available)</span></code></pre></div>
<p>So only 53.7% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<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" class="external-link">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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">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>
@ -512,10 +512,10 @@ Longest: 1</p> @@ -512,10 +512,10 @@ 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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></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,742 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,684 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" class="external-link">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></code></pre></div>
<table class="table">
<table style="width:100%;" class="table">
<colgroup>
<col width="2%">
<col width="9%">
@ -528,7 +528,7 @@ Longest: 1</p> @@ -528,7 +528,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>
@ -550,30 +550,46 @@ Longest: 1</p> @@ -550,30 +550,46 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2011-06-27</td>
<td align="center">V5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="left">2</td>
<td align="center">2015-03-18</td>
<td align="center">G9</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">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">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">3</td>
<td align="center">2013-08-29</td>
<td align="center">Q6</td>
<td align="left">4</td>
<td align="center">2017-05-24</td>
<td align="center">A3</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</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 align="left">5</td>
<td align="center">2013-01-31</td>
<td align="center">Y10</td>
<td align="center">Hospital C</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">F</td>
<td align="center">Gram-negative</td>
@ -581,30 +597,30 @@ Longest: 1</p> @@ -581,30 +597,30 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">4</td>
<td align="center">2012-05-28</td>
<td align="center">S1</td>
<td align="center">Hospital A</td>
<td align="center">B_KLBSL_PNMN</td>
<tr class="even">
<td align="left">10</td>
<td align="center">2014-07-29</td>
<td align="center">G3</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</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">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>
<tr class="even">
<td align="left">6</td>
<td align="center">2011-12-02</td>
<td align="center">E2</td>
<td align="center">Hospital D</td>
<tr class="odd">
<td align="left">11</td>
<td align="center">2010-12-28</td>
<td align="center">G5</td>
<td align="center">Hospital B</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">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
@ -613,36 +629,20 @@ Longest: 1</p> @@ -613,36 +629,20 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">8</td>
<td align="center">2010-05-20</td>
<td align="center">X1</td>
<tr class="even">
<td align="left">14</td>
<td align="center">2015-01-05</td>
<td align="center">A8</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</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">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">TRUE</td>
</tr>
<tr class="even">
<td align="left">11</td>
<td align="center">2013-03-04</td>
<td align="center">T9</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">R</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">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -666,8 +666,8 @@ Longest: 1</p> @@ -666,8 +666,8 @@ Longest: 1</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">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,742<br>
Available: 10,742 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,684<br>
Available: 10,684 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -684,33 +684,33 @@ Longest: 24</p> @@ -684,33 +684,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,726</td>
<td align="right">44.00%</td>
<td align="right">4,726</td>
<td align="right">44.00%</td>
<td align="right">4,660</td>
<td align="right">43.62%</td>
<td align="right">4,660</td>
<td align="right">43.62%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,781</td>
<td align="right">25.89%</td>
<td align="right">7,507</td>
<td align="right">69.88%</td>
<td align="right">2,727</td>
<td align="right">25.52%</td>
<td align="right">7,387</td>
<td align="right">69.14%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,090</td>
<td align="right">19.46%</td>
<td align="right">9,597</td>
<td align="right">89.34%</td>
<td align="right">2,106</td>
<td align="right">19.71%</td>
<td align="right">9,493</td>
<td align="right">88.85%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,145</td>
<td align="right">10.66%</td>
<td align="right">10,742</td>
<td align="right">1,191</td>
<td align="right">11.15%</td>
<td align="right">10,684</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -729,14 +729,14 @@ Longest: 24</p> @@ -729,14 +729,14 @@ Longest: 24</p>
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="10%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="5%">
</colgroup>
@ -757,93 +757,93 @@ Longest: 24</p> @@ -757,93 +757,93 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2010-05-20</td>
<td align="center">X1</td>
<td align="center">2017-05-24</td>
<td align="center">A3</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">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</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">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2013-03-04</td>
<td align="center">T9</td>
<td align="center">Hospital C</td>
<td align="center">2014-07-29</td>
<td align="center">G3</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">R</td>
<td align="center">R</td>
<td align="center">F</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>
<tr class="odd">
<td align="center">2011-04-02</td>
<td align="center">K4</td>
<td align="center">Hospital B</td>
<td align="center">2014-10-24</td>
<td align="center">S9</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">F</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="center">2016-11-29</td>
<td align="center">X8</td>
<td align="center">Hospital D</td>
<td align="center">2012-08-31</td>
<td align="center">A1</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">S</td>
<td align="center">R</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">2014-06-19</td>
<td align="center">V9</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">2016-04-25</td>
<td align="center">Z10</td>
<td align="center">Hospital C</td>
<td align="center">B_KLBSL_PNMN</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">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="center">2015-11-16</td>
<td align="center">M7</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">2011-04-30</td>
<td align="center">J10</td>
<td align="center">Hospital D</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">R</td>
<td align="center">R</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">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -853,6 +853,7 @@ Longest: 24</p> @@ -853,6 +853,7 @@ Longest: 24</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show first 6 rows</span></code></pre></div>
<pre><code><span class="co"># ℹ Using column 'bacteria' as input for `col_mo`.</span></code></pre>
<table class="table">
<thead><tr class="header">
<th align="center">mo</th>
@ -866,58 +867,59 @@ Longest: 24</p> @@ -866,58 +867,59 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2242</td>
<td align="center">112</td>
<td align="center">2372</td>
<td align="center">4726</td>
<td align="center">2148</td>
<td align="center">144</td>
<td align="center">2368</td>
<td align="center">4660</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3500</td>
<td align="center">154</td>
<td align="center">1072</td>
<td align="center">4726</td>
<td align="center">3418</td>
<td align="center">162</td>
<td align="center">1080</td>
<td align="center">4660</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3435</td>
<td align="center">3376</td>
<td align="center">0</td>
<td align="center">1291</td>
<td align="center">4726</td>
<td align="center">1284</td>
<td align="center">4660</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4126</td>
<td align="center">4068</td>
<td align="center">0</td>
<td align="center">600</td>
<td align="center">4726</td>
<td align="center">592</td>
<td align="center">4660</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">1145</td>
<td align="center">1145</td>
<td align="center">1191</td>
<td align="center">1191</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">902</td>
<td align="center">39</td>
<td align="center">204</td>
<td align="center">1145</td>
<td align="center">947</td>
<td align="center">46</td>
<td align="center">198</td>
<td align="center">1191</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="va">bacteria</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<pre><code><span class="co"># ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)</span></code></pre>
<pre><code><span class="co"># ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)</span>
<span class="co"># ℹ Using column 'bacteria' as input for `col_mo`.</span></code></pre>
<table class="table">
<thead><tr class="header">
<th align="center">mo</th>
@ -931,34 +933,34 @@ Longest: 24</p> @@ -931,34 +933,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4126</td>
<td align="center">4068</td>
<td align="center">0</td>
<td align="center">600</td>
<td align="center">4726</td>
<td align="center">592</td>
<td align="center">4660</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1049</td>
<td align="center">1062</td>
<td align="center">0</td>
<td align="center">96</td>
<td align="center">1145</td>
<td align="center">129</td>
<td align="center">1191</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2469</td>
<td align="center">2401</td>
<td align="center">0</td>
<td align="center">312</td>
<td align="center">2781</td>
<td align="center">326</td>
<td align="center">2727</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">2090</td>
<td align="center">2090</td>
<td align="center">2106</td>
<td align="center">2106</td>
</tr>
</tbody>
</table>
@ -970,11 +972,11 @@ Longest: 24</p> @@ -970,11 +972,11 @@ 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>All these functions contain a <code>minimum</code> argument, denoting the minimum required number of test results for returning a value. These functions will otherwise return <code>NA</code>. The default is <code>minimum = 30</code>, following the <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">CLSI M39-A4 guideline</a> for applying microbial epidemiology.</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="downlit sourceCode r">
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></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.5448706</span></code></pre></div>
<span class="co"># [1] 0.5497005</span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">hospital</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span>amoxicillin <span class="op">=</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="op">)</span></code></pre></div>
@ -986,24 +988,24 @@ Longest: 24</p> @@ -986,24 +988,24 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5393604</td>
<td align="center">0.5528455</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5352956</td>
<td align="center">0.5463890</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5694087</td>
<td align="center">0.5533333</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5527446</td>
<td align="center">0.5482679</td>
</tr>
</tbody>
</table>
<p>Of course it would be very convenient to know the number of isolates responsible for the percentages. For that purpose the <code><a href="../reference/count.html">n_rsi()</a></code> can be used, which works exactly like <code><a href="https://dplyr.tidyverse.org/reference/n_distinct.html" class="external-link">n_distinct()</a></code> from the <code>dplyr</code> package. It counts all isolates available for every group (i.e. values S, I or R):</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">hospital</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span>amoxicillin <span class="op">=</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>,
@ -1017,28 +1019,28 @@ Longest: 24</p> @@ -1017,28 +1019,28 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5393604</td>
<td align="center">3252</td>
<td align="center">0.5528455</td>
<td align="center">3075</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5352956</td>
<td align="center">3839</td>
<td align="center">0.5463890</td>
<td align="center">3794</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5694087</td>
<td align="center">1556</td>
<td align="center">0.5533333</td>
<td align="center">1650</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5527446</td>
<td align="center">2095</td>
<td align="center">0.5482679</td>
<td align="center">2165</td>
</tr>
</tbody>
</table>
<p>These functions can also be used to get the proportion of multiple antibiotics, to calculate empiric susceptibility of combination therapies very easily:</p>
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span>amoxiclav <span class="op">=</span> <span class="fu"><a href="../reference/proportion.html">susceptibility</a></span><span class="op">(</span><span class="va">AMC</span><span class="op">)</span>,
@ -1054,32 +1056,32 @@ Longest: 24</p> @@ -1054,32 +1056,32 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7731697</td>
<td align="center">0.8730427</td>
<td align="center">0.9769361</td>
<td align="center">0.7682403</td>