1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 04:02:19 +02:00

Built site for AMR: 1.8.2.9138@dad2530

This commit is contained in:
github-actions
2023-02-22 13:47:35 +00:00
parent 8685119254
commit 69dc8795ae
104 changed files with 827 additions and 856 deletions

View File

@ -10,7 +10,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="">1.8.2.9137</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9138</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">
@ -163,8 +163,8 @@
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p><strong>Important:</strong> Due to how <span style="R">R</span> works, the <code>add_custom_antimicrobials()</code> function has to be run in every <span style="R">R</span> session - added antimicrobials are not stored between sessions and are thus lost when <span style="R">R</span> is exited.</p>
<p>There are two ways to automate this process:</p>
<p><strong>Method 1:</strong> Using the option <code><a href="AMR-options.html">AMR_custom_ab</a></code>, which is the preferred method. To use this method:</p><ol><li><p>Create a data set in the structure of the <a href="antibiotics.html">antibiotics</a> data set (containing at the very least columns "ab" and "name") and save it with <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> to a location of choice, e.g. <code>"~/my_custom_ab.rds"</code>, or any remote location.</p></li>
<li><p>Set the file location to the option <code><a href="AMR-options.html">AMR_custom_ab</a></code>: <code>options(AMR_custom_ab = "~/my_custom_ab.rds")</code>. This can even be a remote file location, such as an https URL. Since options are not saved between <span style="R">R</span> sessions, it is best to save this option to the <code>.Rprofile</code> file so that it will be loaded on start-up of <span style="R">R</span>. To do this, open the <code>.Rprofile</code> file using e.g. <code>utils::file.edit("~/.Rprofile")</code>, add this text and save the file:</p>
<p><strong>Method 1:</strong> Using the <a href="AMR-options.html">package option</a> <code><a href="AMR-options.html">AMR_custom_ab</a></code>, which is the preferred method. To use this method:</p><ol><li><p>Create a data set in the structure of the <a href="antibiotics.html">antibiotics</a> data set (containing at the very least columns "ab" and "name") and save it with <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> to a location of choice, e.g. <code>"~/my_custom_ab.rds"</code>, or any remote location.</p></li>
<li><p>Set the file location to the <a href="AMR-options.html">package option</a> <code><a href="AMR-options.html">AMR_custom_ab</a></code>: <code>options(AMR_custom_ab = "~/my_custom_ab.rds")</code>. This can even be a remote file location, such as an https URL. Since options are not saved between <span style="R">R</span> sessions, it is best to save this option to the <code>.Rprofile</code> file so that it will be loaded on start-up of <span style="R">R</span>. To do this, open the <code>.Rprofile</code> file using e.g. <code>utils::file.edit("~/.Rprofile")</code>, add this text and save the file:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="co"># Add custom antimicrobial codes:</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">options</a></span><span class="op">(</span>AMR_custom_ab <span class="op">=</span> <span class="st">"~/my_custom_ab.rds"</span><span class="op">)</span></span></code></pre><p></p></div>
<p>Upon package load, this file will be loaded and run through the <code>add_custom_antimicrobials()</code> function.</p></li>
@ -191,6 +191,22 @@
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/warning.html" class="external-link">suppressWarnings</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="as.ab.html">as.ab</a></span><span class="op">(</span><span class="st">"testab"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "here"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;NA&gt;</span>
<span class="r-in"><span></span></span>