mirror of
https://github.com/msberends/AMR.git
synced 2026-11-29 00:46:13 +01:00
Built site for AMR@3.1.0.9017: cfb55a4
This commit is contained in:
1 parent
20f80d718e
commit
e78292e3d5
101 files changed
+447
-257
No files matched your search
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ options(AMR_guideline = "CLSI")"><meta property="og:image" content="ht
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -112,16 +112,16 @@
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="va">df</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> birth_date age age_exact age_at_y2k</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 1999-06-30 27 27.34795 0</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 2 1968-01-29 58 58.76438 31</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 3 1965-12-05 60 60.91507 34</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 4 1980-03-01 46 46.67945 19</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 5 1949-11-01 77 77.00822 50</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 6 1947-02-14 79 79.72055 52</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 7 1940-02-19 86 86.70685 59</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 8 1988-01-10 38 38.81644 11</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 9 1997-08-27 29 29.18904 2</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 10 1978-01-26 48 48.77260 21</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 1999-06-30 27 27.36164 0</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 2 1968-01-29 58 58.77808 31</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 3 1965-12-05 60 60.92877 34</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 4 1980-03-01 46 46.69315 19</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 5 1949-11-01 77 77.02192 50</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 6 1947-02-14 79 79.73425 52</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 7 1940-02-19 86 86.72055 59</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 8 1988-01-10 38 38.83014 11</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 9 1997-08-27 29 29.20274 2</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 10 1978-01-26 48 48.78630 21</span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
|
||||
+10
-10
@@ -81,14 +81,14 @@ df$age_at_y2k <- age(df$birth_date, "2000-01-01")
|
||||
|
||||
df
|
||||
#> birth_date age age_exact age_at_y2k
|
||||
#> 1 1999-06-30 27 27.34795 0
|
||||
#> 2 1968-01-29 58 58.76438 31
|
||||
#> 3 1965-12-05 60 60.91507 34
|
||||
#> 4 1980-03-01 46 46.67945 19
|
||||
#> 5 1949-11-01 77 77.00822 50
|
||||
#> 6 1947-02-14 79 79.72055 52
|
||||
#> 7 1940-02-19 86 86.70685 59
|
||||
#> 8 1988-01-10 38 38.81644 11
|
||||
#> 9 1997-08-27 29 29.18904 2
|
||||
#> 10 1978-01-26 48 48.77260 21
|
||||
#> 1 1999-06-30 27 27.36164 0
|
||||
#> 2 1968-01-29 58 58.77808 31
|
||||
#> 3 1965-12-05 60 60.92877 34
|
||||
#> 4 1980-03-01 46 46.69315 19
|
||||
#> 5 1949-11-01 77 77.02192 50
|
||||
#> 6 1947-02-14 79 79.73425 52
|
||||
#> 7 1940-02-19 86 86.72055 59
|
||||
#> 8 1988-01-10 38 38.83014 11
|
||||
#> 9 1997-08-27 29 29.20274 2
|
||||
#> 10 1978-01-26 48 48.78630 21
|
||||
```
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -13,7 +13,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -365,7 +365,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
|
||||
|
||||
<p>All types of antibiograms as listed above can be plotted (using <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> or base <span style="R">R</span>'s <code><a href="plot.html">plot()</a></code> and <code><a href="https://rdrr.io/r/graphics/barplot.html" class="external-link">barplot()</a></code>). As mentioned above, the numeric values of an antibiogram are stored in a long format as the <a href="https://rdrr.io/r/base/attributes.html" class="external-link">attribute</a> <code>long_numeric</code>. You can retrieve them using <code>attributes(x)$long_numeric</code>, where <code>x</code> is the outcome of <code>antibiogram()</code> or <code>wisca()</code>.</p>
|
||||
<p>The outcome of <code>antibiogram()</code> can also be used directly in R Markdown / Quarto (i.e., <code>knitr</code>) for reports. In this case, <code><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">knitr::kable()</a></code> will be applied automatically and microorganism names will even be printed in italics at default (see argument <code>italicise</code>).</p>
|
||||
<p>You can also use functions from specific 'table reporting' packages to transform the output of <code>antibiogram()</code> to your needs, e.g. with <code>flextable::as_flextable()</code> or <code>gt::gt()</code>.</p>
|
||||
<p>You can also use functions from specific 'table reporting' packages to transform the output of <code>antibiogram()</code> to your needs, e.g. with <code><a href="https://davidgohel.github.io/flextable/reference/as_flextable.html" class="external-link">flextable::as_flextable()</a></code> or <code>gt::gt()</code>.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -538,7 +538,8 @@ italics at default (see argument `italicise`).
|
||||
|
||||
You can also use functions from specific 'table reporting' packages to
|
||||
transform the output of `antibiogram()` to your needs, e.g. with
|
||||
`flextable::as_flextable()` or `gt::gt()`.
|
||||
[`flextable::as_flextable()`](https://davidgohel.github.io/flextable/reference/as_flextable.html)
|
||||
or `gt::gt()`.
|
||||
|
||||
## Explaining WISCA
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ my_data_with_all_these_columns %&gt;%
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -469,10 +469,10 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> datetime index method ab_given mo_given host_given input_given</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><dttm></span> <span style="color: #949494; font-style: italic;"><int></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> 2026-11-04 <span style="color: #949494;">07:11:28</span> 1 MIC amoxicillin Escherich… human 8 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> 2026-11-04 <span style="color: #949494;">07:11:28</span> 1 MIC cipro Escherich… human 0.256 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> 2026-11-04 <span style="color: #949494;">07:11:28</span> 1 DISK tobra Escherich… human 16 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> 2026-11-04 <span style="color: #949494;">07:11:28</span> 1 DISK genta Escherich… human 18 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> 2026-11-09 <span style="color: #949494;">19:52:23</span> 1 MIC amoxicillin Escherich… human 8 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> 2026-11-09 <span style="color: #949494;">19:52:23</span> 1 MIC cipro Escherich… human 0.256 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> 2026-11-09 <span style="color: #949494;">19:52:23</span> 1 DISK tobra Escherich… human 16 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> 2026-11-09 <span style="color: #949494;">19:52:23</span> 1 DISK genta Escherich… human 18 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># breakpoint_S_R <chr>, site <chr></span></span>
|
||||
|
||||
+4
-4
@@ -790,10 +790,10 @@ sir_interpretation_history()
|
||||
#> # A tibble: 4 × 18
|
||||
#> datetime index method ab_given mo_given host_given input_given
|
||||
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
|
||||
#> 1 2026-11-04 07:11:28 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-11-04 07:11:28 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-11-04 07:11:28 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-11-04 07:11:28 1 DISK genta Escherich… human 18
|
||||
#> 1 2026-11-09 19:52:23 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-11-09 19:52:23 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-11-09 19:52:23 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-11-09 19:52:23 1 DISK genta Escherich… human 18
|
||||
#> # ℹ 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,
|
||||
#> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
|
||||
#> # breakpoint_S_R <chr>, site <chr>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -21,7 +21,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -335,7 +335,7 @@
|
||||
</dl></div><div class="section level2">
|
||||
<h2 id="visualising-data">Visualising data<a class="anchor" aria-label="anchor" href="#visualising-data"></a></h2>
|
||||
|
||||
<div class="section-desc"><p>Plot MIC values, disk zones, and SIR results in base R or <code>ggplot2</code>, with scales and colours tailored to AMR data.</p></div>
|
||||
<div class="section-desc"><p>Plot MIC values, disk zones, and SIR results in base R or <code>ggplot2</code>, with scales and colours tailored to AMR data, and taxonomic names in italics.</p></div>
|
||||
|
||||
<dl class="amr-ref-list"></dl></div><div class="section level2">
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
<dl class="amr-ref-list"><div class="amr-ref-item">
|
||||
<dt><a href="plot.html">Plotting Helpers for AMR Data Analysis</a></dt>
|
||||
<dd><code><a href="plot.html">scale_x_mic()</a></code> <code><a href="plot.html">scale_y_mic()</a></code> <code><a href="plot.html">scale_colour_mic()</a></code> <code><a href="plot.html">scale_fill_mic()</a></code> <code><a href="plot.html">scale_x_sir()</a></code> <code><a href="plot.html">scale_colour_sir()</a></code> <code><a href="plot.html">scale_fill_sir()</a></code> <code><a href="plot.html">plot(<i><mic></i>)</a></code> <code><a href="plot.html">autoplot(<i><mic></i>)</a></code> <code><a href="plot.html">plot(<i><disk></i>)</a></code> <code><a href="plot.html">autoplot(<i><disk></i>)</a></code> <code><a href="plot.html">plot(<i><sir></i>)</a></code> <code><a href="plot.html">autoplot(<i><sir></i>)</a></code> <code><a href="plot.html">facet_sir()</a></code> <code><a href="plot.html">scale_y_percent()</a></code> <code><a href="plot.html">scale_sir_colours()</a></code> <code><a href="plot.html">theme_sir()</a></code> </dd>
|
||||
<dd><code><a href="plot.html">scale_x_mic()</a></code> <code><a href="plot.html">scale_y_mic()</a></code> <code><a href="plot.html">scale_colour_mic()</a></code> <code><a href="plot.html">scale_fill_mic()</a></code> <code><a href="plot.html">scale_x_sir()</a></code> <code><a href="plot.html">scale_colour_sir()</a></code> <code><a href="plot.html">scale_fill_sir()</a></code> <code><a href="plot.html">plot(<i><mic></i>)</a></code> <code><a href="plot.html">autoplot(<i><mic></i>)</a></code> <code><a href="plot.html">plot(<i><disk></i>)</a></code> <code><a href="plot.html">autoplot(<i><disk></i>)</a></code> <code><a href="plot.html">plot(<i><sir></i>)</a></code> <code><a href="plot.html">autoplot(<i><sir></i>)</a></code> <code><a href="plot.html">facet_sir()</a></code> <code><a href="plot.html">scale_y_percent()</a></code> <code><a href="plot.html">scale_sir_colours()</a></code> <code><a href="plot.html">theme_sir()</a></code> <code><a href="plot.html">labels_taxonomy()</a></code> </dd>
|
||||
</div>
|
||||
|
||||
<div class="amr-ref-item">
|
||||
|
||||
+3
-1
@@ -334,7 +334,8 @@ calculate resistance, and determine multidrug-resistant organisms.
|
||||
## Visualising data
|
||||
|
||||
Plot MIC values, disk zones, and SIR results in base R or `ggplot2`,
|
||||
with scales and colours tailored to AMR data.
|
||||
with scales and colours tailored to AMR data, and taxonomic names in
|
||||
italics.
|
||||
|
||||
[Plotting Helpers for AMR Data Analysis](https://amr-for-r.org/reference/plot.md)
|
||||
: [`scale_x_mic()`](https://amr-for-r.org/reference/plot.md)
|
||||
@@ -354,6 +355,7 @@ with scales and colours tailored to AMR data.
|
||||
[`scale_y_percent()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`scale_sir_colours()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`theme_sir()`](https://amr-for-r.org/reference/plot.md)
|
||||
[`labels_taxonomy()`](https://amr-for-r.org/reference/plot.md)
|
||||
|
||||
[AMR Plots with `ggplot2`](https://amr-for-r.org/reference/ggplot_sir.md)
|
||||
: [`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md)
|
||||
|
||||
@@ -9,7 +9,7 @@ To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -55,9 +55,9 @@
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span>, <span class="st">"html"</span><span class="op">)</span><span class="op">)</span></span>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span>, <span class="st">"html"</span>, <span class="st">"plotmath"</span><span class="op">)</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="fu">italicize_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span>, <span class="st">"html"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||
<span><span class="fu">italicize_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span>, <span class="st">"html"</span>, <span class="st">"plotmath"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
@@ -69,14 +69,22 @@
|
||||
|
||||
|
||||
<dt id="arg-type">type<a class="anchor" aria-label="anchor" href="#arg-type"></a></dt>
|
||||
<dd><p>Type of conversion of the taxonomic names, either "markdown", "html" or "ansi", see <em>Details</em>.</p></dd>
|
||||
<dd><p>Type of conversion of the taxonomic names, either "markdown", "html", "ansi" or "plotmath", see <em>Details</em>.</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
<p>For "markdown", "html" and "ansi", a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> vector. For "plotmath", an <a href="https://rdrr.io/r/base/expression.html" class="external-link">expression</a> vector. Both have the same length as <code>string</code> and keep <code>NA</code> values.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||
<p>This function finds the taxonomic names and makes them italic based on the <a href="microorganisms.html">microorganisms</a> data set.</p>
|
||||
<p>This function finds the taxonomic names and makes them italic based on the <a href="microorganisms.html">microorganisms</a> data set. Family and genus names are italicised anywhere in the text. Species and subspecies names are only italicised when they follow a genus, an abbreviated genus (such as "E." in "E. coli"), or another species or subspecies name, so that ordinary words that are also species names (such as "coli" or "major") stay upright. Subspecies may also follow "subsp.", "ssp." or "var.", which stay upright themselves, e.g., "<em>K. pneumoniae</em> subsp. <em>ozaenae</em>". <em>Salmonella</em> serovars (such as Typhimurium) and groups are not italicised, as is the convention. Punctuation around the names, such as brackets and commas, stays outside the italics.</p>
|
||||
<p>The taxonomic names can be italicised using markdown (the default) by adding <code>*</code> before and after the taxonomic names, or <code><i></code> and <code></i></code> when using html. When using 'ansi', ANSI colours will be added using <code>\033[3m</code> before and <code>\033[23m</code> after the taxonomic names. If multiple ANSI colours are not available, no conversion will occur.</p>
|
||||
<p>This function also supports abbreviation of the genus if it is followed by a species, such as "E. coli" and "K. pneumoniae ozaenae".</p>
|
||||
<p>Use <code>type = "plotmath"</code> to get an <a href="https://rdrr.io/r/base/expression.html" class="external-link">expression</a> vector for plots (see <a href="https://rdrr.io/r/grDevices/plotmath.html" class="external-link">plotmath</a>), which works for titles, axes and legends in both base <span style="R">R</span> and <code>ggplot2</code>. For axis and legend labels, the function <code><a href="plot.html">labels_taxonomy()</a></code> does exactly this and can directly be used as labeller, e.g., <code>ggplot2::scale_x_discrete(labels = labels_taxonomy)</code>.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
|
||||
<div class="dont-index"><p><code><a href="plot.html">labels_taxonomy()</a></code> to italicise taxonomic names in plot labels.</p></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
@@ -85,9 +93,17 @@
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "An overview of *Staphylococcus aureus* isolates"</span>
|
||||
<span class="r-in"><span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="st">"An overview of S. aureus isolates"</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "An overview of *S. aureus* isolates"</span>
|
||||
<span class="r-in"><span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="st">"Infections with E. coli (and coli bacteria in general)"</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "Infections with *E. coli* (and coli bacteria in general)"</span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/cat.html" class="external-link">cat</a></span><span class="op">(</span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="st">"An overview of S. aureus isolates"</span>, type <span class="op">=</span> <span class="st">"ansi"</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> An overview of <span style="font-style: italic;">S. aureus</span> isolates</span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># for plots:</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="st">"An overview of S. aureus isolates"</span>, type <span class="op">=</span> <span class="st">"plotmath"</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> expression(paste("An overview of ", italic("S. aureus"), " isolates"))</span>
|
||||
<span class="r-in"><span><span class="fu"><a href="plot.html">plot</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span>, main <span class="op">=</span> <span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="st">"Growth of S. aureus"</span>, type <span class="op">=</span> <span class="st">"plotmath"</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-plt img"><img src="italicise_taxonomy-1.png" alt="" width="700" height="433"></span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
|
||||
@@ -7,9 +7,9 @@ function finds taxonomic names within strings and makes them italic.
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
italicise_taxonomy(string, type = c("markdown", "ansi", "html"))
|
||||
italicise_taxonomy(string, type = c("markdown", "ansi", "html", "plotmath"))
|
||||
|
||||
italicize_taxonomy(string, type = c("markdown", "ansi", "html"))
|
||||
italicize_taxonomy(string, type = c("markdown", "ansi", "html", "plotmath"))
|
||||
```
|
||||
|
||||
## Arguments
|
||||
@@ -20,14 +20,30 @@ italicize_taxonomy(string, type = c("markdown", "ansi", "html"))
|
||||
|
||||
- type:
|
||||
|
||||
Type of conversion of the taxonomic names, either "markdown", "html"
|
||||
or "ansi", see *Details*.
|
||||
Type of conversion of the taxonomic names, either "markdown", "html",
|
||||
"ansi" or "plotmath", see *Details*.
|
||||
|
||||
## Value
|
||||
|
||||
For "markdown", "html" and "ansi", a
|
||||
[character](https://rdrr.io/r/base/character.html) vector. For
|
||||
"plotmath", an [expression](https://rdrr.io/r/base/expression.html)
|
||||
vector. Both have the same length as `string` and keep `NA` values.
|
||||
|
||||
## Details
|
||||
|
||||
This function finds the taxonomic names and makes them italic based on
|
||||
the [microorganisms](https://amr-for-r.org/reference/microorganisms.md)
|
||||
data set.
|
||||
data set. Family and genus names are italicised anywhere in the text.
|
||||
Species and subspecies names are only italicised when they follow a
|
||||
genus, an abbreviated genus (such as "E." in "E. coli"), or another
|
||||
species or subspecies name, so that ordinary words that are also species
|
||||
names (such as "coli" or "major") stay upright. Subspecies may also
|
||||
follow "subsp.", "ssp." or "var.", which stay upright themselves, e.g.,
|
||||
"*K. pneumoniae* subsp. *ozaenae*". *Salmonella* serovars (such as
|
||||
Typhimurium) and groups are not italicised, as is the convention.
|
||||
Punctuation around the names, such as brackets and commas, stays outside
|
||||
the italics.
|
||||
|
||||
The taxonomic names can be italicised using markdown (the default) by
|
||||
adding `*` before and after the taxonomic names, or `<i>` and `</i>`
|
||||
@@ -35,8 +51,19 @@ when using html. When using 'ansi', ANSI colours will be added using
|
||||
`\033[3m` before and `\033[23m` after the taxonomic names. If multiple
|
||||
ANSI colours are not available, no conversion will occur.
|
||||
|
||||
This function also supports abbreviation of the genus if it is followed
|
||||
by a species, such as "E. coli" and "K. pneumoniae ozaenae".
|
||||
Use `type = "plotmath"` to get an
|
||||
[expression](https://rdrr.io/r/base/expression.html) vector for plots
|
||||
(see [plotmath](https://rdrr.io/r/grDevices/plotmath.html)), which works
|
||||
for titles, axes and legends in both base R and `ggplot2`. For axis and
|
||||
legend labels, the function
|
||||
[`labels_taxonomy()`](https://amr-for-r.org/reference/plot.md) does
|
||||
exactly this and can directly be used as labeller, e.g.,
|
||||
`ggplot2::scale_x_discrete(labels = labels_taxonomy)`.
|
||||
|
||||
## See also
|
||||
|
||||
[`labels_taxonomy()`](https://amr-for-r.org/reference/plot.md) to
|
||||
italicise taxonomic names in plot labels.
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -45,7 +72,14 @@ italicise_taxonomy("An overview of Staphylococcus aureus isolates")
|
||||
#> [1] "An overview of *Staphylococcus aureus* isolates"
|
||||
italicise_taxonomy("An overview of S. aureus isolates")
|
||||
#> [1] "An overview of *S. aureus* isolates"
|
||||
italicise_taxonomy("Infections with E. coli (and coli bacteria in general)")
|
||||
#> [1] "Infections with *E. coli* (and coli bacteria in general)"
|
||||
|
||||
cat(italicise_taxonomy("An overview of S. aureus isolates", type = "ansi"))
|
||||
#> An overview of S. aureus isolates
|
||||
|
||||
# for plots:
|
||||
italicise_taxonomy("An overview of S. aureus isolates", type = "plotmath")
|
||||
#> expression(paste("An overview of ", italic("S. aureus"), " isolates"))
|
||||
plot(1:10, main = italicise_taxonomy("Growth of S. aureus", type = "plotmath"))
|
||||
```
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=https://amr-for-r.org/reference/plot.html" />
|
||||
<meta name="robots" content="noindex">
|
||||
<link rel="canonical" href="https://amr-for-r.org/reference/plot.html">
|
||||
</head>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ This data set is carefully crafted, yet made 100% reproducible from public and a
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
+27
-4
@@ -9,7 +9,7 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -189,7 +189,9 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
|
||||
<span> colours_SIR <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>S <span class="op">=</span> <span class="st">"#3CAEA3"</span>, SDD <span class="op">=</span> <span class="st">"#8FD6C4"</span>, I <span class="op">=</span> <span class="st">"#F6D55C"</span>, R <span class="op">=</span> <span class="st">"#ED553B"</span><span class="op">)</span></span>
|
||||
<span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="fu">theme_sir</span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
|
||||
<span><span class="fu">theme_sir</span><span class="op">(</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="fu">labels_taxonomy</span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
@@ -221,7 +223,7 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
|
||||
|
||||
|
||||
<dt id="arg-x-object">x, object<a class="anchor" aria-label="anchor" href="#arg-x-object"></a></dt>
|
||||
<dd><p>Values created with <code><a href="as.mic.html">as.mic()</a></code>, <code><a href="as.disk.html">as.disk()</a></code> or <code><a href="as.sir.html">as.sir()</a></code> (or their <code>random_*</code> variants, such as <code><a href="random.html">random_mic()</a></code>).</p></dd>
|
||||
<dd><p>Values created with <code><a href="as.mic.html">as.mic()</a></code>, <code><a href="as.disk.html">as.disk()</a></code> or <code><a href="as.sir.html">as.sir()</a></code> (or their <code>random_*</code> variants, such as <code><a href="random.html">random_mic()</a></code>). For <code>labels_taxonomy()</code>, any values to use as labels, such as the breaks of an axis.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-mo">mo<a class="anchor" aria-label="anchor" href="#arg-mo"></a></dt>
|
||||
@@ -310,7 +312,14 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
|
||||
<li><p><code>scale_sir_colours()</code> allows to set colours to any aesthetic, even for <code>shape</code> or <code>linetype</code>.</p></li>
|
||||
<li><p><code>theme_sir()</code> is a <a href="https://ggplot2.tidyverse.org/reference/theme.html" class="external-link">ggplot2 theme</a> with minimal distraction.</p></li>
|
||||
<li><p><code><a href="ggplot_sir.html">labels_sir_count()</a></code> prints data labels on the bars with percentage and number of isolates, using <code><a href="https://ggplot2.tidyverse.org/reference/geom_text.html" class="external-link">ggplot2::geom_text()</a></code>.</p></li>
|
||||
</ul><p>The interpretation of "I" will be named "Susceptible, incr. exp." (susceptible, increased exposure) for all EUCAST guidelines since 2019, and will be named "Intermediate" in all other cases.</p>
|
||||
</ul></div>
|
||||
|
||||
<div class="section">
|
||||
<h3 id="taxonomic-names-in-labels">Taxonomic Names in Labels<a class="anchor" aria-label="anchor" href="#taxonomic-names-in-labels"></a></h3>
|
||||
|
||||
|
||||
<p>The function <code>labels_taxonomy()</code> prints taxonomic names in axis and legend labels in italics, as is the convention in microbiology, e.g., <em>E. coli</em> and <em>Klebsiella pneumoniae</em>. It can directly be used as labeller in <code>ggplot2</code>, e.g., <code>scale_x_discrete(labels = labels_taxonomy)</code>, and in base <span style="R">R</span>, e.g., <code>axis(1, at = 1:3, labels = labels_taxonomy(names))</code>. Other words, such as "Other" or "CoNS", stay upright. It uses <code><a href="italicise_taxonomy.html">italicise_taxonomy()</a></code> with <code>type = "plotmath"</code>, which also works for titles. It returns an <a href="https://rdrr.io/r/base/expression.html" class="external-link">expression</a> vector of the same length as <code>x</code>; other arguments in <code>...</code> are ignored.</p>
|
||||
<p>The interpretation of "I" will be named "Susceptible, incr. exp." (susceptible, increased exposure) for all EUCAST guidelines since 2019, and will be named "Intermediate" in all other cases.</p>
|
||||
<p>For interpreting MIC values as well as disk diffusion diameters, the default guideline is EUCAST 2026, unless the package option <code><a href="AMR-options.html">AMR_guideline</a></code> is set. See <code><a href="as.sir.html">as.sir()</a></code> for more information.</p>
|
||||
</div>
|
||||
|
||||
@@ -480,6 +489,20 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="fu">plot</span><span class="op">(</span><span class="va">some_sir_values</span><span class="op">)</span></span></span>
|
||||
<span class="r-plt img"><img src="plot-19.png" alt="" width="700" height="433"></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># Taxonomic names in italics using labels_taxonomy() ------------------</span></span></span>
|
||||
<span class="r-in"><span><span class="va">bacteria</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
|
||||
<span class="r-in"><span> name <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"E. coli"</span>, <span class="st">"Klebsiella pneumoniae"</span>, <span class="st">"CoNS"</span>, <span class="st">"Other"</span><span class="op">)</span>,</span></span>
|
||||
<span class="r-in"><span> n <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">25</span>, <span class="fl">18</span>, <span class="fl">9</span>, <span class="fl">6</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/barplot.html" class="external-link">barplot</a></span><span class="op">(</span><span class="va">bacteria</span><span class="op">$</span><span class="va">n</span>, names.arg <span class="op">=</span> <span class="fu">labels_taxonomy</span><span class="op">(</span><span class="va">bacteria</span><span class="op">$</span><span class="va">name</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-plt img"><img src="plot-20.png" alt="" width="700" height="433"></span>
|
||||
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://ggplot2.tidyverse.org" class="external-link">"ggplot2"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot</a></span><span class="op">(</span><span class="va">bacteria</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html" class="external-link">aes</a></span><span class="op">(</span><span class="va">name</span>, <span class="va">n</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html" class="external-link">geom_col</a></span><span class="op">(</span><span class="op">)</span> <span class="op">+</span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/scale_discrete.html" class="external-link">scale_x_discrete</a></span><span class="op">(</span>labels <span class="op">=</span> <span class="va">labels_taxonomy</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="op">}</span></span></span>
|
||||
<span class="r-plt img"><img src="plot-21.png" alt="" width="700" height="433"></span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
|
||||
+33
-1
@@ -142,6 +142,8 @@ scale_sir_colours(
|
||||
)
|
||||
|
||||
theme_sir()
|
||||
|
||||
labels_taxonomy(x, ...)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
@@ -203,7 +205,9 @@ theme_sir()
|
||||
[`as.disk()`](https://amr-for-r.org/reference/as.disk.md) or
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) (or their
|
||||
`random_*` variants, such as
|
||||
[`random_mic()`](https://amr-for-r.org/reference/random.md)).
|
||||
[`random_mic()`](https://amr-for-r.org/reference/random.md)). For
|
||||
`labels_taxonomy()`, any values to use as labels, such as the breaks
|
||||
of an axis.
|
||||
|
||||
- mo:
|
||||
|
||||
@@ -345,6 +349,20 @@ internally used by
|
||||
using
|
||||
[`ggplot2::geom_text()`](https://ggplot2.tidyverse.org/reference/geom_text.html).
|
||||
|
||||
### Taxonomic Names in Labels
|
||||
|
||||
The function `labels_taxonomy()` prints taxonomic names in axis and
|
||||
legend labels in italics, as is the convention in microbiology, e.g.,
|
||||
*E. coli* and *Klebsiella pneumoniae*. It can directly be used as
|
||||
labeller in `ggplot2`, e.g.,
|
||||
`scale_x_discrete(labels = labels_taxonomy)`, and in base R, e.g.,
|
||||
`axis(1, at = 1:3, labels = labels_taxonomy(names))`. Other words, such
|
||||
as "Other" or "CoNS", stay upright. It uses
|
||||
[`italicise_taxonomy()`](https://amr-for-r.org/reference/italicise_taxonomy.md)
|
||||
with `type = "plotmath"`, which also works for titles. It returns an
|
||||
[expression](https://rdrr.io/r/base/expression.html) vector of the same
|
||||
length as `x`; other arguments in `...` are ignored.
|
||||
|
||||
The interpretation of "I" will be named "Susceptible, incr. exp."
|
||||
(susceptible, increased exposure) for all EUCAST guidelines since 2019,
|
||||
and will be named "Intermediate" in all other cases.
|
||||
@@ -519,4 +537,18 @@ plot(some_disk_values, mo = "Escherichia coli", ab = "cipro", language = "nl")
|
||||
|
||||
|
||||
plot(some_sir_values)
|
||||
|
||||
|
||||
# Taxonomic names in italics using labels_taxonomy() ------------------
|
||||
bacteria <- data.frame(
|
||||
name = c("E. coli", "Klebsiella pneumoniae", "CoNS", "Other"),
|
||||
n = c(25, 18, 9, 6)
|
||||
)
|
||||
barplot(bacteria$n, names.arg = labels_taxonomy(bacteria$name))
|
||||
|
||||
if (require("ggplot2")) {
|
||||
ggplot(bacteria, aes(name, n)) +
|
||||
geom_col() +
|
||||
scale_x_discrete(labels = labels_taxonomy)
|
||||
}
|
||||
```
|
||||
@@ -9,7 +9,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ NOTE: These functions are deprecated and will be removed in a future version. Us
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -17,7 +17,7 @@ See Combination Therapy below for the exact rules. The same rules are used by an
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -9,7 +9,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9015</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.1.0.9017</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
Reference in new issue
Block a user