1
0
mirror of https://github.com/msberends/AMR.git synced 2026-05-31 17:41:49 +02:00

Built site for AMR@3.0.1.9050: 8261b91

This commit is contained in:
github-actions
2026-04-25 12:49:42 +00:00
parent cc4e9bab4b
commit e12355b4a8
16 changed files with 127 additions and 113 deletions

View File

@@ -73,7 +73,7 @@
<span><span class="fu">pkgdown</span><span class="fu">::</span><span class="fu"><a href="https://pkgdown.r-lib.org/reference/build_site.html" class="external-link">build_site</a></span><span class="op">(</span><span class="op">)</span></span> <span><span class="fu">pkgdown</span><span class="fu">::</span><span class="fu"><a href="https://pkgdown.r-lib.org/reference/build_site.html" class="external-link">build_site</a></span><span class="op">(</span><span class="op">)</span></span>
<span></span> <span></span>
<span><span class="co"># Code coverage report</span></span> <span><span class="co"># Code coverage report</span></span>
<span><span class="fu">covr</span><span class="fu">::</span><span class="fu"><a href="http://covr.r-lib.org/reference/package_coverage.html" class="external-link">package_coverage</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <span><span class="fu">covr</span><span class="fu">::</span><span class="fu">package_coverage</span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
<p>From the shell:</p> <p>From the shell:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a><span class="co"># CRAN check from parent directory</span></span> <div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a><span class="co"># CRAN check from parent directory</span></span>
<span id="cb2-2"><a href="#cb2-2" tabindex="-1"></a><span class="ex">R</span> CMD check AMR</span></code></pre></div> <span id="cb2-2"><a href="#cb2-2" tabindex="-1"></a><span class="ex">R</span> CMD check AMR</span></code></pre></div>

View File

@@ -91,7 +91,7 @@
website update since they are based on randomly created values and the 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 page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a>. However, the methodology remains unchanged. This page was Markdown</a>. However, the methodology remains unchanged. This page was
generated on 24 April 2026.</p> generated on 25 April 2026.</p>
<div class="section level2"> <div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a> <h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2> </h2>
@@ -147,21 +147,21 @@ make the structure of your data generally look like this:</p>
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2026-04-24</td> <td align="center">2026-04-25</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2026-04-24</td> <td align="center">2026-04-25</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</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">R</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2026-04-24</td> <td align="center">2026-04-25</td>
<td align="center">efgh</td> <td align="center">efgh</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
@@ -442,27 +442,27 @@ impression, as it comes with support for the new <code>mo</code> and
<code>sir</code> classes that we now have in our data set:</p> <code>sir</code> classes that we now have in our data set:</p>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">our_data_1st</span><span class="op">)</span></span> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">our_data_1st</span><span class="op">)</span></span>
<span><span class="co">#&gt; patient_id hospital date </span></span> <span><span class="co">#&gt; patient_id hospital date bacteria </span></span>
<span><span class="co">#&gt; Length:2724 Length:2724 Min. :2011-01-01 </span></span> <span><span class="co">#&gt; Length :2724 Length :2724 Min. :2011-01-01 Class :mo </span></span>
<span><span class="co">#&gt; Class :character Class :character 1st Qu.:2013-04-07 </span></span> <span><span class="co">#&gt; N.unique : 260 N.unique : 3 1st Qu.:2013-04-07 &lt;NA&gt; :0 </span></span>
<span><span class="co">#&gt; Mode :character Mode :character Median :2015-06-03 </span></span> <span><span class="co">#&gt; N.blank : 0 N.blank : 0 Median :2015-06-03 Unique:4 </span></span>
<span><span class="co">#&gt; Mean :2015-06-09 </span></span> <span><span class="co">#&gt; Min.nchar: 2 Min.nchar: 1 Mean :2015-06-09 #1 :B_ESCHR_COLI </span></span>
<span><span class="co">#&gt; 3rd Qu.:2017-08-11 </span></span> <span><span class="co">#&gt; Max.nchar: 3 Max.nchar: 1 3rd Qu.:2017-08-11 #2 :B_STPHY_AURS </span></span>
<span><span class="co">#&gt; Max. :2019-12-27 </span></span> <span><span class="co">#&gt; Max. :2019-12-27 #3 :B_STRPT_PNMN </span></span>
<span><span class="co">#&gt; bacteria AMX AMC </span></span> <span><span class="co">#&gt; AMX AMC CIP </span></span>
<span><span class="co">#&gt; Class :mo Class:sir Class:sir </span></span> <span><span class="co">#&gt; Class:sir Class:sir Class:sir </span></span>
<span><span class="co">#&gt; &lt;NA&gt; :0 %S :41.6% (n=1133) %S :52.6% (n=1432) </span></span> <span><span class="co">#&gt; %S :41.6% (n=1133) %S :52.6% (n=1432) %S :52.5% (n=1431) </span></span>
<span><span class="co">#&gt; Unique:4 %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) </span></span> <span><span class="co">#&gt; %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) </span></span>
<span><span class="co">#&gt; #1 :B_ESCHR_COLI %I :16.4% (n=446) %I :12.2% (n=333) </span></span> <span><span class="co">#&gt; %I :16.4% (n=446) %I :12.2% (n=333) %I : 6.5% (n=176) </span></span>
<span><span class="co">#&gt; #2 :B_STPHY_AURS %R :42.0% (n=1145) %R :35.2% (n=959) </span></span> <span><span class="co">#&gt; %R :42.0% (n=1145) %R :35.2% (n=959) %R :41.0% (n=1117) </span></span>
<span><span class="co">#&gt; #3 :B_STRPT_PNMN %NI : 0.0% (n=0) %NI : 0.0% (n=0) </span></span> <span><span class="co">#&gt; %NI : 0.0% (n=0) %NI : 0.0% (n=0) %NI : 0.0% (n=0) </span></span>
<span><span class="co">#&gt; CIP GEN first </span></span> <span><span class="co">#&gt; GEN first </span></span>
<span><span class="co">#&gt; Class:sir Class:sir Mode:logical </span></span> <span><span class="co">#&gt; Class:sir Mode:logical </span></span>
<span><span class="co">#&gt; %S :52.5% (n=1431) %S :61.0% (n=1661) TRUE:2724 </span></span> <span><span class="co">#&gt; %S :61.0% (n=1661) TRUE:2724 </span></span>
<span><span class="co">#&gt; %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) </span></span> <span><span class="co">#&gt; %SDD : 0.0% (n=0) </span></span>
<span><span class="co">#&gt; %I : 6.5% (n=176) %I : 3.0% (n=82) </span></span> <span><span class="co">#&gt; %I : 3.0% (n=82) </span></span>
<span><span class="co">#&gt; %R :41.0% (n=1117) %R :36.0% (n=981) </span></span> <span><span class="co">#&gt; %R :36.0% (n=981) </span></span>
<span><span class="co">#&gt; %NI : 0.0% (n=0) %NI : 0.0% (n=0)</span></span> <span><span class="co">#&gt; %NI : 0.0% (n=0)</span></span>
<span></span> <span></span>
<span><span class="fu"><a href="https://pillar.r-lib.org/reference/glimpse.html" class="external-link">glimpse</a></span><span class="op">(</span><span class="va">our_data_1st</span><span class="op">)</span></span> <span><span class="fu"><a href="https://pillar.r-lib.org/reference/glimpse.html" class="external-link">glimpse</a></span><span class="op">(</span><span class="va">our_data_1st</span><span class="op">)</span></span>
<span><span class="co">#&gt; Rows: 2,724</span></span> <span><span class="co">#&gt; Rows: 2,724</span></span>

View File

@@ -3,7 +3,7 @@
**Note:** values on this page will change with every website update **Note:** values on this page will change with every website update
since they are based on randomly created values and the page was written since they are based on randomly created values and the page was written
in [R Markdown](https://rmarkdown.rstudio.com/). However, the in [R Markdown](https://rmarkdown.rstudio.com/). However, the
methodology remains unchanged. This page was generated on 24 April 2026. methodology remains unchanged. This page was generated on 25 April 2026.
## Introduction ## Introduction
@@ -51,9 +51,9 @@ structure of your data generally look like this:
| date | patient_id | mo | AMX | CIP | | date | patient_id | mo | AMX | CIP |
|:----------:|:----------:|:----------------:|:---:|:---:| |:----------:|:----------:|:----------------:|:---:|:---:|
| 2026-04-24 | abcd | Escherichia coli | S | S | | 2026-04-25 | abcd | Escherichia coli | S | S |
| 2026-04-24 | abcd | Escherichia coli | S | R | | 2026-04-25 | abcd | Escherichia coli | S | R |
| 2026-04-24 | efgh | Escherichia coli | R | S | | 2026-04-25 | efgh | Escherichia coli | R | S |
### Needed R packages ### Needed R packages
@@ -367,27 +367,27 @@ and `sir` classes that we now have in our data set:
``` r ``` r
summary(our_data_1st) summary(our_data_1st)
#> patient_id hospital date #> patient_id hospital date bacteria
#> Length:2724 Length:2724 Min. :2011-01-01 #> Length :2724 Length :2724 Min. :2011-01-01 Class :mo
#> Class :character Class :character 1st Qu.:2013-04-07 #> N.unique : 260 N.unique : 3 1st Qu.:2013-04-07 <NA> :0
#> Mode :character Mode :character Median :2015-06-03 #> N.blank : 0 N.blank : 0 Median :2015-06-03 Unique:4
#> Mean :2015-06-09 #> Min.nchar: 2 Min.nchar: 1 Mean :2015-06-09 #1 :B_ESCHR_COLI
#> 3rd Qu.:2017-08-11 #> Max.nchar: 3 Max.nchar: 1 3rd Qu.:2017-08-11 #2 :B_STPHY_AURS
#> Max. :2019-12-27 #> Max. :2019-12-27 #3 :B_STRPT_PNMN
#> bacteria AMX AMC #> AMX AMC CIP
#> Class :mo Class:sir Class:sir #> Class:sir Class:sir Class:sir
#> <NA> :0 %S :41.6% (n=1133) %S :52.6% (n=1432) #> %S :41.6% (n=1133) %S :52.6% (n=1432) %S :52.5% (n=1431)
#> Unique:4 %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) #> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
#> #1 :B_ESCHR_COLI %I :16.4% (n=446) %I :12.2% (n=333) #> %I :16.4% (n=446) %I :12.2% (n=333) %I : 6.5% (n=176)
#> #2 :B_STPHY_AURS %R :42.0% (n=1145) %R :35.2% (n=959) #> %R :42.0% (n=1145) %R :35.2% (n=959) %R :41.0% (n=1117)
#> #3 :B_STRPT_PNMN %NI : 0.0% (n=0) %NI : 0.0% (n=0) #> %NI : 0.0% (n=0) %NI : 0.0% (n=0) %NI : 0.0% (n=0)
#> CIP GEN first #> GEN first
#> Class:sir Class:sir Mode:logical #> Class:sir Mode:logical
#> %S :52.5% (n=1431) %S :61.0% (n=1661) TRUE:2724 #> %S :61.0% (n=1661) TRUE:2724
#> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) #> %SDD : 0.0% (n=0)
#> %I : 6.5% (n=176) %I : 3.0% (n=82) #> %I : 3.0% (n=82)
#> %R :41.0% (n=1117) %R :36.0% (n=981) #> %R :36.0% (n=981)
#> %NI : 0.0% (n=0) %NI : 0.0% (n=0) #> %NI : 0.0% (n=0)
glimpse(our_data_1st) glimpse(our_data_1st)
#> Rows: 2,724 #> Rows: 2,724

View File

@@ -80,7 +80,7 @@
<main id="main" class="col-md-9"><div class="page-header"> <main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Download data sets for download / own use</h1> <img src="../logo.svg" class="logo" alt=""><h1>Download data sets for download / own use</h1>
<h4 data-toc-skip class="date">24 April 2026</h4> <h4 data-toc-skip class="date">25 April 2026</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div> <div class="d-none name"><code>datasets.Rmd</code></div>

View File

@@ -87,7 +87,9 @@
</ul></div> </ul></div>
<div class="section level4"> <div class="section level4">
<h4 id="fixes-3-0-1-9050">Fixes<a class="anchor" aria-label="anchor" href="#fixes-3-0-1-9050"></a></h4> <h4 id="fixes-3-0-1-9050">Fixes<a class="anchor" aria-label="anchor" href="#fixes-3-0-1-9050"></a></h4>
<ul><li>Fixed multiple bugs in the <code>parallel = TRUE</code> mode of <code><a href="../reference/as.sir.html">as.sir()</a></code> for data frames: (1) PSOCK workers (Windows / R &lt; 4.0) now correctly load the AMR package before processing, with a graceful fallback to sequential mode when the package cannot be loaded; (2) resolved stale-environment issue where the PSOCK path read a frozen copy of <code>AMR_env</code> instead of the live one, causing the wrong log entries to be captured; (3) fixed log-entry duplication in the fork-based path (<code>mclapply</code>) where pre-existing <code>sir_interpretation_history</code> rows were included in every workers captured log; (4) removed use of non-exported internal functions (<code>%pm&gt;%</code>, <code>pm_pull</code>, <code>as.sir.default</code>) from the worker closure, which made PSOCK workers fail; (5) suppressed per-column progress messages inside workers to prevent interleaved console output; (6) fixed a malformed Unicode escape <code>\u00a</code> (3 digits) in the “DONE” status message</li> <ul><li>
<code><a href="../reference/as.sir.html">as.sir()</a></code> with <code>reference_data</code>: custom guideline names now correctly classify values as R using EUCAST convention (<code>&gt; breakpoint_R</code> for MIC, <code>&lt; breakpoint_R</code> for disk); custom breakpoints with <code>host = NA</code> now serve as a host-agnostic fallback when no host-specific row matches (fixes <a href="https://github.com/msberends/AMR/issues/239" class="external-link">#239</a>)</li>
<li>Fixed multiple bugs in the <code>parallel = TRUE</code> mode of <code><a href="../reference/as.sir.html">as.sir()</a></code> for data frames: (1) PSOCK workers (Windows / R &lt; 4.0) now correctly load the AMR package before processing, with a graceful fallback to sequential mode when the package cannot be loaded; (2) resolved stale-environment issue where the PSOCK path read a frozen copy of <code>AMR_env</code> instead of the live one, causing the wrong log entries to be captured; (3) fixed log-entry duplication in the fork-based path (<code>mclapply</code>) where pre-existing <code>sir_interpretation_history</code> rows were included in every workers captured log; (4) removed use of non-exported internal functions (<code>%pm&gt;%</code>, <code>pm_pull</code>, <code>as.sir.default</code>) from the worker closure, which made PSOCK workers fail; (5) suppressed per-column progress messages inside workers to prevent interleaved console output; (6) fixed a malformed Unicode escape <code>\u00a</code> (3 digits) in the “DONE” status message</li>
<li>Fixed a bug in <code><a href="../reference/as.sir.html">as.sir()</a></code> where values that were purely numeric (e.g., <code>"1"</code>) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter</li> <li>Fixed a bug in <code><a href="../reference/as.sir.html">as.sir()</a></code> where values that were purely numeric (e.g., <code>"1"</code>) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter</li>
<li>Fixed a bug in <code><a href="../reference/as.mic.html">as.mic()</a></code> where MIC values in scientific notation (e.g., <code>"1e-3"</code>) were incorrectly handled because the letter <code>e</code> was removed along with other Unicode letters; scientific notation <code>e</code> is now preserved</li> <li>Fixed a bug in <code><a href="../reference/as.mic.html">as.mic()</a></code> where MIC values in scientific notation (e.g., <code>"1e-3"</code>) were incorrectly handled because the letter <code>e</code> was removed along with other Unicode letters; scientific notation <code>e</code> is now preserved</li>
<li>Fixed a bug in <code><a href="../reference/as.ab.html">as.ab()</a></code> where certain AB codes containing “PH” or “TH” (such as <code>ETH</code>, <code>MTH</code>, <code>PHE</code>, <code>PHN</code>, <code>STH</code>, <code>THA</code>, <code>THI1</code>) would incorrectly return <code>NA</code> when combined in a vector with any untranslatable value (<a href="https://github.com/msberends/AMR/issues/245" class="external-link">#245</a>)</li> <li>Fixed a bug in <code><a href="../reference/as.ab.html">as.ab()</a></code> where certain AB codes containing “PH” or “TH” (such as <code>ETH</code>, <code>MTH</code>, <code>PHE</code>, <code>PHN</code>, <code>STH</code>, <code>THA</code>, <code>THI1</code>) would incorrectly return <code>NA</code> when combined in a vector with any untranslatable value (<a href="https://github.com/msberends/AMR/issues/245" class="external-link">#245</a>)</li>

View File

@@ -63,6 +63,12 @@
#### Fixes #### Fixes
- [`as.sir()`](https://amr-for-r.org/reference/as.sir.md) with
`reference_data`: custom guideline names now correctly classify values
as R using EUCAST convention (`> breakpoint_R` for MIC,
`< breakpoint_R` for disk); custom breakpoints with `host = NA` now
serve as a host-agnostic fallback when no host-specific row matches
(fixes [\#239](https://github.com/msberends/AMR/issues/239))
- Fixed multiple bugs in the `parallel = TRUE` mode of - Fixed multiple bugs in the `parallel = TRUE` mode of
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) for data [`as.sir()`](https://amr-for-r.org/reference/as.sir.md) for data
frames: (1) PSOCK workers (Windows / R \< 4.0) now correctly load the frames: (1) PSOCK workers (Windows / R \< 4.0) now correctly load the

View File

@@ -10,7 +10,7 @@ articles:
PCA: PCA.html PCA: PCA.html
WHONET: WHONET.html WHONET: WHONET.html
WISCA: WISCA.html WISCA: WISCA.html
last_built: 2026-04-24T22:40Z last_built: 2026-04-25T12:44Z
urls: urls:
reference: https://amr-for-r.org/reference reference: https://amr-for-r.org/reference
article: https://amr-for-r.org/articles article: https://amr-for-r.org/articles

View File

@@ -112,16 +112,16 @@
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span> <span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span> <span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1999-06-30 26 26.81644 0</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 1 1999-06-30 26 26.81918 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1968-01-29 58 58.23288 31</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 2 1968-01-29 58 58.23562 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1965-12-05 60 60.38356 34</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 3 1965-12-05 60 60.38630 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1980-03-01 46 46.14795 19</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 4 1980-03-01 46 46.15068 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1949-11-01 76 76.47671 50</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 5 1949-11-01 76 76.47945 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1947-02-14 79 79.18904 52</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 6 1947-02-14 79 79.19178 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1940-02-19 86 86.17534 59</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 7 1940-02-19 86 86.17808 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1988-01-10 38 38.28493 11</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 8 1988-01-10 38 38.28767 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1997-08-27 28 28.65753 2</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 9 1997-08-27 28 28.66027 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1978-01-26 48 48.24110 21</span> <span class="r-out co"><span class="r-pr">#&gt;</span> 10 1978-01-26 48 48.24384 21</span>
</code></pre></div> </code></pre></div>
</div> </div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View File

@@ -81,14 +81,14 @@ df$age_at_y2k <- age(df$birth_date, "2000-01-01")
df df
#> birth_date age age_exact age_at_y2k #> birth_date age age_exact age_at_y2k
#> 1 1999-06-30 26 26.81644 0 #> 1 1999-06-30 26 26.81918 0
#> 2 1968-01-29 58 58.23288 31 #> 2 1968-01-29 58 58.23562 31
#> 3 1965-12-05 60 60.38356 34 #> 3 1965-12-05 60 60.38630 34
#> 4 1980-03-01 46 46.14795 19 #> 4 1980-03-01 46 46.15068 19
#> 5 1949-11-01 76 76.47671 50 #> 5 1949-11-01 76 76.47945 50
#> 6 1947-02-14 79 79.18904 52 #> 6 1947-02-14 79 79.19178 52
#> 7 1940-02-19 86 86.17534 59 #> 7 1940-02-19 86 86.17808 59
#> 8 1988-01-10 38 38.28493 11 #> 8 1988-01-10 38 38.28767 11
#> 9 1997-08-27 28 28.65753 2 #> 9 1997-08-27 28 28.66027 2
#> 10 1978-01-26 48 48.24110 21 #> 10 1978-01-26 48 48.24384 21
``` ```

View File

@@ -184,7 +184,7 @@ may affect the computations for subsequent operations.</p></dd>
<span class="r-in"><span> <span class="va">metrics</span></span></span> <span class="r-in"><span> <span class="va">metrics</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Loading required package: tidymodels</span> <span class="r-msg co"><span class="r-pr">#&gt;</span> Loading required package: tidymodels</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> ── <span style="font-weight: bold;">Attaching packages</span> ────────────────────────────────────── tidymodels 1.4.1 ──</span> <span class="r-msg co"><span class="r-pr">#&gt;</span> ── <span style="font-weight: bold;">Attaching packages</span> ────────────────────────────────────── tidymodels 1.5.0 ──</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">broom </span> 1.0.12 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">rsample </span> 1.3.2 </span> <span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">broom </span> 1.0.12 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">rsample </span> 1.3.2 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">dials </span> 1.4.3 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tailor </span> 0.1.0 </span> <span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">dials </span> 1.4.3 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tailor </span> 0.1.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">infer </span> 1.1.0 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tidyr </span> 1.3.2 </span> <span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">infer </span> 1.1.0 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tidyr </span> 1.3.2 </span>

View File

@@ -163,7 +163,7 @@ if (require("tidymodels")) {
metrics metrics
} }
#> Loading required package: tidymodels #> Loading required package: tidymodels
#> ── Attaching packages ────────────────────────────────────── tidymodels 1.4.1 ── #> ── Attaching packages ────────────────────────────────────── tidymodels 1.5.0 ──
#> ✔ broom 1.0.12 ✔ rsample 1.3.2 #> ✔ broom 1.0.12 ✔ rsample 1.3.2
#> ✔ dials 1.4.3 ✔ tailor 0.1.0 #> ✔ dials 1.4.3 ✔ tailor 0.1.0
#> ✔ infer 1.1.0 ✔ tidyr 1.3.2 #> ✔ infer 1.1.0 ✔ tidyr 1.3.2

View File

@@ -687,6 +687,9 @@ my_data_with_all_these_columns %&amp;gt;%
<span class="r-msg co"><span class="r-pr">#&gt;</span> The following objects are masked from package:AMR:</span> <span class="r-msg co"><span class="r-pr">#&gt;</span> The following objects are masked from package:AMR:</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span> <span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> %like%, like</span> <span class="r-msg co"><span class="r-pr">#&gt;</span> %like%, like</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> The following object is masked from package:base:</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> %notin%</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span> <span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>It should never be needed to print an antimicrobial selector class. Are you</span> <span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>It should never be needed to print an antimicrobial selector class. Are you</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> using <span style="color: #0000BB;">data.table</span>? Then add the argument `with = FALSE`, see our examples at</span> <span class="r-wrn co"><span class="r-pr">#&gt;</span> using <span style="color: #0000BB;">data.table</span>? Then add the argument `with = FALSE`, see our examples at</span>

View File

@@ -1060,6 +1060,9 @@ if (require("data.table")) {
#> The following objects are masked from package:AMR: #> The following objects are masked from package:AMR:
#> #>
#> %like%, like #> %like%, like
#> The following object is masked from package:base:
#>
#> %notin%
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem) #> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> Warning: It should never be needed to print an antimicrobial selector class. Are you #> Warning: It should never be needed to print an antimicrobial selector class. Are you
#> using data.table? Then add the argument `with = FALSE`, see our examples at #> using data.table? Then add the argument `with = FALSE`, see our examples at

View File

@@ -370,20 +370,20 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span>
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">example_isolates</span><span class="op">[</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span><span class="op">)</span> <span class="co"># see all SIR results at a glance</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">example_isolates</span><span class="op">[</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span><span class="op">)</span> <span class="co"># see all SIR results at a glance</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender </span> <span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Min. :2002-01-02 Length:2000 Min. : 0.00 Length:2000 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Min. :2002-01-02 Length :2000 Min. : 0.00 Length :2000 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1st Qu.:2005-07-31 Class :character 1st Qu.:63.00 Class :character </span> <span class="r-out co"><span class="r-pr">#&gt;</span> 1st Qu.:2005-07-31 N.unique : 981 1st Qu.:63.00 N.unique : 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Median :2009-07-31 Mode :character Median :74.00 Mode :character </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Median :2009-07-31 N.blank : 0 Median :74.00 N.blank : 0 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Mean :2009-11-20 Mean :70.69 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Mean :2009-11-20 Min.nchar: 6 Mean :70.69 Min.nchar: 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3rd Qu.:2014-05-30 3rd Qu.:82.00 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> 3rd Qu.:2014-05-30 Max.nchar: 6 3rd Qu.:82.00 Max.nchar: 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Max. :2017-12-28 Max. :97.00 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Max. :2017-12-28 Max. :97.00 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward mo PEN </span> <span class="r-out co"><span class="r-pr">#&gt;</span> ward mo PEN </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Length:2000 Class :mo Class:sir </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Length :2000 Class :mo Class:sir </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class :character &lt;NA&gt; :0 %S :25.6% (n=417) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> N.unique : 3 &lt;NA&gt; :0 %S :25.6% (n=417) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Mode :character Unique:90 %SDD : 0.0% (n=0) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> N.blank : 0 Unique:90 %SDD : 0.0% (n=0) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #1 :B_ESCHR_COLI %I : 0.7% (n=11) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Min.nchar: 3 #1 :B_ESCHR_COLI %I : 0.7% (n=11) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #2 :B_STPHY_CONS %R :73.7% (n=1201) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Max.nchar: 10 #2 :B_STPHY_CONS %R :73.7% (n=1201) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #3 :B_STPHY_AURS %NI : 0.0% (n=0) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> #3 :B_STPHY_AURS %NI : 0.0% (n=0) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> OXA FLC AMX </span> <span class="r-out co"><span class="r-pr">#&gt;</span> OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class:sir Class:sir Class:sir </span> <span class="r-out co"><span class="r-pr">#&gt;</span> Class:sir Class:sir Class:sir </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> %S :68.8% (n=251) %S :70.5% (n=665) %S :40.2% (n=543) </span> <span class="r-out co"><span class="r-pr">#&gt;</span> %S :68.8% (n=251) %S :70.5% (n=665) %S :40.2% (n=543) </span>
@@ -424,10 +424,10 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 18</span></span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index method ab_given mo_given host_given input_given</span> <span class="r-out co"><span class="r-pr">#&gt;</span> datetime index method ab_given mo_given host_given input_given</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-04-24 <span style="color: #949494;">22:41:17</span> 1 MIC amoxicillin Escherich… human 8 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-04-25 <span style="color: #949494;">12:45:43</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-04-24 <span style="color: #949494;">22:41:17</span> 1 MIC cipro Escherich… human 0.256 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-04-25 <span style="color: #949494;">12:45:43</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-04-24 <span style="color: #949494;">22:41:18</span> 1 DISK tobra Escherich… human 16 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-04-25 <span style="color: #949494;">12:45:44</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-04-24 <span style="color: #949494;">22:41:18</span> 1 DISK genta Escherich… human 18 </span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-04-25 <span style="color: #949494;">12:45:44</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 11 more variables: ab &lt;ab&gt;, mo &lt;mo&gt;, host &lt;chr&gt;, input &lt;chr&gt;,</span></span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 11 more variables: ab &lt;ab&gt;, mo &lt;mo&gt;, host &lt;chr&gt;, input &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># outcome &lt;sir&gt;, notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># outcome &lt;sir&gt;, notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S_R &lt;chr&gt;, site &lt;chr&gt;</span></span> <span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S_R &lt;chr&gt;, site &lt;chr&gt;</span></span>

View File

@@ -606,20 +606,20 @@ example_isolates
#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, … #> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
summary(example_isolates[, 1:10]) # see all SIR results at a glance summary(example_isolates[, 1:10]) # see all SIR results at a glance
#> date patient age gender #> date patient age gender
#> Min. :2002-01-02 Length:2000 Min. : 0.00 Length:2000 #> Min. :2002-01-02 Length :2000 Min. : 0.00 Length :2000
#> 1st Qu.:2005-07-31 Class :character 1st Qu.:63.00 Class :character #> 1st Qu.:2005-07-31 N.unique : 981 1st Qu.:63.00 N.unique : 2
#> Median :2009-07-31 Mode :character Median :74.00 Mode :character #> Median :2009-07-31 N.blank : 0 Median :74.00 N.blank : 0
#> Mean :2009-11-20 Mean :70.69 #> Mean :2009-11-20 Min.nchar: 6 Mean :70.69 Min.nchar: 1
#> 3rd Qu.:2014-05-30 3rd Qu.:82.00 #> 3rd Qu.:2014-05-30 Max.nchar: 6 3rd Qu.:82.00 Max.nchar: 1
#> Max. :2017-12-28 Max. :97.00 #> Max. :2017-12-28 Max. :97.00
#> ward mo PEN #> ward mo PEN
#> Length:2000 Class :mo Class:sir #> Length :2000 Class :mo Class:sir
#> Class :character <NA> :0 %S :25.6% (n=417) #> N.unique : 3 <NA> :0 %S :25.6% (n=417)
#> Mode :character Unique:90 %SDD : 0.0% (n=0) #> N.blank : 0 Unique:90 %SDD : 0.0% (n=0)
#> #1 :B_ESCHR_COLI %I : 0.7% (n=11) #> Min.nchar: 3 #1 :B_ESCHR_COLI %I : 0.7% (n=11)
#> #2 :B_STPHY_CONS %R :73.7% (n=1201) #> Max.nchar: 10 #2 :B_STPHY_CONS %R :73.7% (n=1201)
#> #3 :B_STPHY_AURS %NI : 0.0% (n=0) #> #3 :B_STPHY_AURS %NI : 0.0% (n=0)
#> OXA FLC AMX #> OXA FLC AMX
#> Class:sir Class:sir Class:sir #> Class:sir Class:sir Class:sir
#> %S :68.8% (n=251) %S :70.5% (n=665) %S :40.2% (n=543) #> %S :68.8% (n=251) %S :70.5% (n=665) %S :40.2% (n=543)
@@ -660,10 +660,10 @@ sir_interpretation_history()
#> # A tibble: 4 × 18 #> # A tibble: 4 × 18
#> datetime index method ab_given mo_given host_given input_given #> datetime index method ab_given mo_given host_given input_given
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr> #> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2026-04-24 22:41:17 1 MIC amoxicillin Escherich… human 8 #> 1 2026-04-25 12:45:43 1 MIC amoxicillin Escherich… human 8
#> 2 2026-04-24 22:41:17 1 MIC cipro Escherich… human 0.256 #> 2 2026-04-25 12:45:43 1 MIC cipro Escherich… human 0.256
#> 3 2026-04-24 22:41:18 1 DISK tobra Escherich… human 16 #> 3 2026-04-25 12:45:44 1 DISK tobra Escherich… human 16
#> 4 2026-04-24 22:41:18 1 DISK genta Escherich… human 18 #> 4 2026-04-25 12:45:44 1 DISK genta Escherich… human 18
#> # 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>, #> # 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,
#> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>, #> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
#> # breakpoint_S_R <chr>, site <chr> #> # breakpoint_S_R <chr>, site <chr>

File diff suppressed because one or more lines are too long