Built site for AMR@3.1.0.9017: cfb55a4

This commit is contained in:
github-actions committed 2026-11-09 19:55:51 +00:00
1 parent 20f80d718e
commit e78292e3d5
101 files changed
+447 -257

No files matched your search

+27 -4
View File
@@ -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">&lt;-</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>