mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 10:31:53 +02:00
(v0.9.0.9012) Support for LOINC codes
This commit is contained in:
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@ -45,7 +45,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -205,8 +205,8 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/
|
||||
<div class="main-content">
|
||||
<p>
|
||||
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a>
|
||||
<strong>Used over 90 countries</strong><br>
|
||||
Since its first public release in early 2018, this package has been downloaded over 25,000 times from 92 countries <small>(as of January 2020, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p>
|
||||
<strong>Used in almost 100 countries</strong><br>
|
||||
Since its first public release in early 2018, this package has been downloaded over 25,000 times from 96 countries <small>(as of January 2020, <a href="https://cran-logs.rstudio.com" target="_blank">CRAN logs</a>)</small>. Click the map to enlarge.</p>
|
||||
<br><br>
|
||||
</div>
|
||||
<div id="partners" class="section level4">
|
||||
@ -238,6 +238,7 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/
|
||||
<li>Getting properties for any antibiotic (like name, EARS-Net code, ATC code, PubChem code, defined daily dose or trade name) (<a href="./reference/ab_property.html">manual</a>)</li>
|
||||
<li>Plotting antimicrobial resistance (<a href="./articles/AMR.html">tutorial</a>)</li>
|
||||
<li>Applying EUCAST expert rules (<a href="./reference/eucast_rules.html">manual</a>)</li>
|
||||
<li>Get the LOINC code of an antibiotic, or get the name associated with a LOINC code (<a href="./reference/ab_property.html">manual</a>)</li>
|
||||
</ul>
|
||||
<p>This package is ready-to-use for a professional environment by specialists in the following fields:</p>
|
||||
<p>Medical Microbiology</p>
|
||||
|
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -231,20 +231,34 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="amr-0-9-0-9011" class="section level1">
|
||||
<div id="amr-0-9-0-9012" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-9-0-9011" class="anchor"></a>AMR 0.9.0.9011<small> Unreleased </small>
|
||||
<a href="#amr-0-9-0-9012" class="anchor"></a>AMR 0.9.0.9012<small> Unreleased </small>
|
||||
</h1>
|
||||
<div id="last-updated-15-jan-2020" class="section level2">
|
||||
<div id="last-updated-26-jan-2020" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#last-updated-15-jan-2020" class="anchor"></a><small>Last updated: 15-Jan-2020</small>
|
||||
<a href="#last-updated-26-jan-2020" class="anchor"></a><small>Last updated: 26-Jan-2020</small>
|
||||
</h2>
|
||||
<div id="new" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#new" class="anchor"></a>New</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><a href="../reference/ab_property.html">ab_loinc()</a></code> to retrieve LOINC codes, or use LOINC code for input in any <code>ab_*</code> function:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="../reference/ab_property.html">ab_loinc</a></span>(<span class="st">"ampicillin"</span>)</a>
|
||||
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co">#> [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"</span></a>
|
||||
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="st">"21066-6"</span>)</a>
|
||||
<a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co">#> [1] "Ampicillin"</span></a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changes" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#changes" class="anchor"></a>Changes</h3>
|
||||
<ul>
|
||||
<li>Speed improvement for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions that use <code><a href="../reference/as.mo.html">as.mo()</a></code> internally), especially for the <em>G. species</em> format (G for genus), like <em>E. coli</em> and <em>K penumoniae</em>
|
||||
</li>
|
||||
<li>Better support for determination of <em>Salmonella</em> biovars</li>
|
||||
<li>Input values for <code><a href="../reference/as.disk.html">as.disk()</a></code> limited to a maximum of 50 millimeters</li>
|
||||
<li>Added a lifecycle state to every function, following <a href="https://www.tidyverse.org/lifecycle">the lifecycle circle of the <code>tidyverse</code></a>
|
||||
</li>
|
||||
@ -280,26 +294,26 @@
|
||||
<ul>
|
||||
<li>
|
||||
<p>If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="cf">if</span> (<span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(somebugs) <span class="op">==</span><span class="st"> "Enterobacteriaceae"</span>) ...</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="cf">if</span> (<span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(somebugs) <span class="op">==</span><span class="st"> "Enterobacteriaceae"</span>) ...</a></code></pre></div>
|
||||
<p>then please adjust this to:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="cf">if</span> (<span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(somebugs) <span class="op">==</span><span class="st"> "Enterobacterales"</span>) ...</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="cf">if</span> (<span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(somebugs) <span class="op">==</span><span class="st"> "Enterobacterales"</span>) ...</a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="new" class="section level3">
|
||||
<div id="new-1" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#new" class="anchor"></a>New</h3>
|
||||
<a href="#new-1" class="anchor"></a>New</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Functions <code><a href="../reference/proportion.html">susceptibility()</a></code> and <code><a href="../reference/proportion.html">resistance()</a></code> as aliases of <code><a href="../reference/proportion.html">proportion_SI()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code>, respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb3-2" data-line-number="2">example_isolates <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(<span class="dt">bug =</span> <span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(mo)) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span>(<span class="dt">amoxicillin =</span> <span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX),</a>
|
||||
<a class="sourceLine" id="cb3-5" data-line-number="5"> <span class="dt">amox_clav =</span> <span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMC)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb3-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span>(amoxicillin) <span class="op">|</span><span class="st"> </span><span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span>(amox_clav))</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb4-2" data-line-number="2">example_isolates <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(<span class="dt">bug =</span> <span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(mo)) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span>(<span class="dt">amoxicillin =</span> <span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX),</a>
|
||||
<a class="sourceLine" id="cb4-5" data-line-number="5"> <span class="dt">amox_clav =</span> <span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMC)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span>(amoxicillin) <span class="op">|</span><span class="st"> </span><span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span>(amox_clav))</a></code></pre></div>
|
||||
</li>
|
||||
<li>Support for a new MDRO guideline: Magiorakos AP, Srinivasan A <em>et al.</em> “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).
|
||||
<ul>
|
||||
@ -320,16 +334,16 @@
|
||||
<li>More intelligent way of coping with some consonants like “l” and “r”</li>
|
||||
<li>
|
||||
<p>Added a score (a certainty percentage) to <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a>:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Stafylococcus aureus"</span>,</a>
|
||||
<a class="sourceLine" id="cb4-2" data-line-number="2"> <span class="st">"staphylokok aureuz"</span>))</a>
|
||||
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="co">#> Warning: </span></a>
|
||||
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co">#> Results of two values were guessed with uncertainty. Use mo_uncertainties() to review them.</span></a>
|
||||
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="co">#> Class 'mo'</span></a>
|
||||
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co">#> [1] B_STPHY_AURS B_STPHY_AURS</span></a>
|
||||
<a class="sourceLine" id="cb4-7" data-line-number="7"></a>
|
||||
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="kw"><a href="../reference/as.mo.html">mo_uncertainties</a></span>()</a>
|
||||
<a class="sourceLine" id="cb4-9" data-line-number="9"><span class="co">#> "Stafylococcus aureus" -> Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)</span></a>
|
||||
<a class="sourceLine" id="cb4-10" data-line-number="10"><span class="co">#> "staphylokok aureuz" -> Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Stafylococcus aureus"</span>,</a>
|
||||
<a class="sourceLine" id="cb5-2" data-line-number="2"> <span class="st">"staphylokok aureuz"</span>))</a>
|
||||
<a class="sourceLine" id="cb5-3" data-line-number="3"><span class="co">#> Warning: </span></a>
|
||||
<a class="sourceLine" id="cb5-4" data-line-number="4"><span class="co">#> Results of two values were guessed with uncertainty. Use mo_uncertainties() to review them.</span></a>
|
||||
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="co">#> Class 'mo'</span></a>
|
||||
<a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co">#> [1] B_STPHY_AURS B_STPHY_AURS</span></a>
|
||||
<a class="sourceLine" id="cb5-7" data-line-number="7"></a>
|
||||
<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="kw"><a href="../reference/as.mo.html">mo_uncertainties</a></span>()</a>
|
||||
<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="co">#> "Stafylococcus aureus" -> Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)</span></a>
|
||||
<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co">#> "staphylokok aureuz" -> Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)</span></a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -377,81 +391,81 @@
|
||||
<ul>
|
||||
<li>
|
||||
<p>Determination of first isolates now <strong>excludes</strong> all ‘unknown’ microorganisms at default, i.e. microbial code <code>"UNKNOWN"</code>. They can be included with the new parameter <code>include_unknown</code>:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(..., <span class="dt">include_unknown =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(..., <span class="dt">include_unknown =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
For WHONET users, this means that all records/isolates with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.</li>
|
||||
<li>
|
||||
<p>For code consistency, classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in <code>NA</code>:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="co"># how it works in base R:</span></a>
|
||||
<a class="sourceLine" id="cb6-2" data-line-number="2">x <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/factor.html">factor</a></span>(<span class="st">"A"</span>)</a>
|
||||
<a class="sourceLine" id="cb6-3" data-line-number="3">x[<span class="dv">1</span>] <-<span class="st"> "B"</span></a>
|
||||
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="co">#> Warning message:</span></a>
|
||||
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="co">#> invalid factor level, NA generated</span></a>
|
||||
<a class="sourceLine" id="cb6-6" data-line-number="6"></a>
|
||||
<a class="sourceLine" id="cb6-7" data-line-number="7"><span class="co"># how it now works similarly for classes 'mo' and 'ab':</span></a>
|
||||
<a class="sourceLine" id="cb6-8" data-line-number="8">x <-<span class="st"> </span><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb6-9" data-line-number="9">x[<span class="dv">1</span>] <-<span class="st"> "testvalue"</span></a>
|
||||
<a class="sourceLine" id="cb6-10" data-line-number="10"><span class="co">#> Warning message:</span></a>
|
||||
<a class="sourceLine" id="cb6-11" data-line-number="11"><span class="co">#> invalid microorganism code, NA generated</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="co"># how it works in base R:</span></a>
|
||||
<a class="sourceLine" id="cb7-2" data-line-number="2">x <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/factor.html">factor</a></span>(<span class="st">"A"</span>)</a>
|
||||
<a class="sourceLine" id="cb7-3" data-line-number="3">x[<span class="dv">1</span>] <-<span class="st"> "B"</span></a>
|
||||
<a class="sourceLine" id="cb7-4" data-line-number="4"><span class="co">#> Warning message:</span></a>
|
||||
<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="co">#> invalid factor level, NA generated</span></a>
|
||||
<a class="sourceLine" id="cb7-6" data-line-number="6"></a>
|
||||
<a class="sourceLine" id="cb7-7" data-line-number="7"><span class="co"># how it now works similarly for classes 'mo' and 'ab':</span></a>
|
||||
<a class="sourceLine" id="cb7-8" data-line-number="8">x <-<span class="st"> </span><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb7-9" data-line-number="9">x[<span class="dv">1</span>] <-<span class="st"> "testvalue"</span></a>
|
||||
<a class="sourceLine" id="cb7-10" data-line-number="10"><span class="co">#> Warning message:</span></a>
|
||||
<a class="sourceLine" id="cb7-11" data-line-number="11"><span class="co">#> invalid microorganism code, NA generated</span></a></code></pre></div>
|
||||
This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</li>
|
||||
<li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</li>
|
||||
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="new-1" class="section level3">
|
||||
<div id="new-2" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#new-1" class="anchor"></a>New</h3>
|
||||
<a href="#new-2" class="anchor"></a>New</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Function <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with <code><a href="../reference/mo_property.html">mo_shortname()</a></code> at default:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span>(example_isolates)</a>
|
||||
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a>
|
||||
<a class="sourceLine" id="cb7-3" data-line-number="3">x[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>, ]</a>
|
||||
<a class="sourceLine" id="cb7-4" data-line-number="4"><span class="co">#> mo ab S I R total</span></a>
|
||||
<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="co">#> 1 A. baumannii AMC 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb7-6" data-line-number="6"><span class="co">#> 2 A. baumannii AMK 0 0 0 0</span></a>
|
||||
<a class="sourceLine" id="cb7-7" data-line-number="7"><span class="co">#> 3 A. baumannii AMP 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb7-8" data-line-number="8"><span class="co">#> 4 A. baumannii AMX 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb7-9" data-line-number="9"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Use 'format()' on this result to get a publicable/printable format.</span></a>
|
||||
<a class="sourceLine" id="cb7-10" data-line-number="10"></a>
|
||||
<a class="sourceLine" id="cb7-11" data-line-number="11"><span class="co"># change the transformation with the FUN argument to anything you like:</span></a>
|
||||
<a class="sourceLine" id="cb7-12" data-line-number="12">x <-<span class="st"> </span><span class="kw"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span>(example_isolates, <span class="dt">FUN =</span> mo_gramstain)</a>
|
||||
<a class="sourceLine" id="cb7-13" data-line-number="13"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a>
|
||||
<a class="sourceLine" id="cb7-14" data-line-number="14">x[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>, ]</a>
|
||||
<a class="sourceLine" id="cb7-15" data-line-number="15"><span class="co">#> mo ab S I R total</span></a>
|
||||
<a class="sourceLine" id="cb7-16" data-line-number="16"><span class="co">#> 1 Gram-negative AMC 469 89 174 732</span></a>
|
||||
<a class="sourceLine" id="cb7-17" data-line-number="17"><span class="co">#> 2 Gram-negative AMK 251 0 2 253</span></a>
|
||||
<a class="sourceLine" id="cb7-18" data-line-number="18"><span class="co">#> 3 Gram-negative AMP 227 0 405 632</span></a>
|
||||
<a class="sourceLine" id="cb7-19" data-line-number="19"><span class="co">#> 4 Gram-negative AMX 227 0 405 632</span></a>
|
||||
<a class="sourceLine" id="cb7-20" data-line-number="20"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Use 'format()' on this result to get a publicable/printable format.</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span>(example_isolates)</a>
|
||||
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a>
|
||||
<a class="sourceLine" id="cb8-3" data-line-number="3">x[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>, ]</a>
|
||||
<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="co">#> mo ab S I R total</span></a>
|
||||
<a class="sourceLine" id="cb8-5" data-line-number="5"><span class="co">#> 1 A. baumannii AMC 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb8-6" data-line-number="6"><span class="co">#> 2 A. baumannii AMK 0 0 0 0</span></a>
|
||||
<a class="sourceLine" id="cb8-7" data-line-number="7"><span class="co">#> 3 A. baumannii AMP 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb8-8" data-line-number="8"><span class="co">#> 4 A. baumannii AMX 0 0 3 3</span></a>
|
||||
<a class="sourceLine" id="cb8-9" data-line-number="9"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Use 'format()' on this result to get a publicable/printable format.</span></a>
|
||||
<a class="sourceLine" id="cb8-10" data-line-number="10"></a>
|
||||
<a class="sourceLine" id="cb8-11" data-line-number="11"><span class="co"># change the transformation with the FUN argument to anything you like:</span></a>
|
||||
<a class="sourceLine" id="cb8-12" data-line-number="12">x <-<span class="st"> </span><span class="kw"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span>(example_isolates, <span class="dt">FUN =</span> mo_gramstain)</a>
|
||||
<a class="sourceLine" id="cb8-13" data-line-number="13"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a>
|
||||
<a class="sourceLine" id="cb8-14" data-line-number="14">x[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>, ]</a>
|
||||
<a class="sourceLine" id="cb8-15" data-line-number="15"><span class="co">#> mo ab S I R total</span></a>
|
||||
<a class="sourceLine" id="cb8-16" data-line-number="16"><span class="co">#> 1 Gram-negative AMC 469 89 174 732</span></a>
|
||||
<a class="sourceLine" id="cb8-17" data-line-number="17"><span class="co">#> 2 Gram-negative AMK 251 0 2 253</span></a>
|
||||
<a class="sourceLine" id="cb8-18" data-line-number="18"><span class="co">#> 3 Gram-negative AMP 227 0 405 632</span></a>
|
||||
<a class="sourceLine" id="cb8-19" data-line-number="19"><span class="co">#> 4 Gram-negative AMX 227 0 405 632</span></a>
|
||||
<a class="sourceLine" id="cb8-20" data-line-number="20"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Use 'format()' on this result to get a publicable/printable format.</span></a></code></pre></div>
|
||||
<p>You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R <code><a href="https://rdrr.io/r/base/format.html">format()</a></code> function:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/format.html">format</a></span>(x, <span class="dt">combine_IR =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/format.html">format</a></span>(x, <span class="dt">combine_IR =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibility of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="co"># --------------------------------------------------------------------</span></a>
|
||||
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span></a>
|
||||
<a class="sourceLine" id="cb9-3" data-line-number="3"><span class="co"># ----------------------- -----------------------</span></a>
|
||||
<a class="sourceLine" id="cb9-4" data-line-number="4"><span class="co"># Drug A Drug B include as include as include as include as</span></a>
|
||||
<a class="sourceLine" id="cb9-5" data-line-number="5"><span class="co"># numerator denominator numerator denominator</span></a>
|
||||
<a class="sourceLine" id="cb9-6" data-line-number="6"><span class="co"># -------- -------- ---------- ----------- ---------- -----------</span></a>
|
||||
<a class="sourceLine" id="cb9-7" data-line-number="7"><span class="co"># S or I S or I X X X X</span></a>
|
||||
<a class="sourceLine" id="cb9-8" data-line-number="8"><span class="co"># R S or I X X X X</span></a>
|
||||
<a class="sourceLine" id="cb9-9" data-line-number="9"><span class="co"># <NA> S or I X X - -</span></a>
|
||||
<a class="sourceLine" id="cb9-10" data-line-number="10"><span class="co"># S or I R X X X X</span></a>
|
||||
<a class="sourceLine" id="cb9-11" data-line-number="11"><span class="co"># R R - X - X</span></a>
|
||||
<a class="sourceLine" id="cb9-12" data-line-number="12"><span class="co"># <NA> R - - - -</span></a>
|
||||
<a class="sourceLine" id="cb9-13" data-line-number="13"><span class="co"># S or I <NA> X X - -</span></a>
|
||||
<a class="sourceLine" id="cb9-14" data-line-number="14"><span class="co"># R <NA> - - - -</span></a>
|
||||
<a class="sourceLine" id="cb9-15" data-line-number="15"><span class="co"># <NA> <NA> - - - -</span></a>
|
||||
<a class="sourceLine" id="cb9-16" data-line-number="16"><span class="co"># --------------------------------------------------------------------</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="co"># --------------------------------------------------------------------</span></a>
|
||||
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span></a>
|
||||
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="co"># ----------------------- -----------------------</span></a>
|
||||
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="co"># Drug A Drug B include as include as include as include as</span></a>
|
||||
<a class="sourceLine" id="cb10-5" data-line-number="5"><span class="co"># numerator denominator numerator denominator</span></a>
|
||||
<a class="sourceLine" id="cb10-6" data-line-number="6"><span class="co"># -------- -------- ---------- ----------- ---------- -----------</span></a>
|
||||
<a class="sourceLine" id="cb10-7" data-line-number="7"><span class="co"># S or I S or I X X X X</span></a>
|
||||
<a class="sourceLine" id="cb10-8" data-line-number="8"><span class="co"># R S or I X X X X</span></a>
|
||||
<a class="sourceLine" id="cb10-9" data-line-number="9"><span class="co"># <NA> S or I X X - -</span></a>
|
||||
<a class="sourceLine" id="cb10-10" data-line-number="10"><span class="co"># S or I R X X X X</span></a>
|
||||
<a class="sourceLine" id="cb10-11" data-line-number="11"><span class="co"># R R - X - X</span></a>
|
||||
<a class="sourceLine" id="cb10-12" data-line-number="12"><span class="co"># <NA> R - - - -</span></a>
|
||||
<a class="sourceLine" id="cb10-13" data-line-number="13"><span class="co"># S or I <NA> X X - -</span></a>
|
||||
<a class="sourceLine" id="cb10-14" data-line-number="14"><span class="co"># R <NA> - - - -</span></a>
|
||||
<a class="sourceLine" id="cb10-15" data-line-number="15"><span class="co"># <NA> <NA> - - - -</span></a>
|
||||
<a class="sourceLine" id="cb10-16" data-line-number="16"><span class="co"># --------------------------------------------------------------------</span></a></code></pre></div>
|
||||
Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</li>
|
||||
<li>
|
||||
<p><code>tibble</code> printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code> <code>mo</code>. When using <code>tibble</code>s containing antimicrobial columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red. Microbial IDs (class <code>mo</code>) will emphasise on the genus and species, not on the kingdom.</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="co"># (run this on your own console, as this page does not support colour printing)</span></a>
|
||||
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb10-3" data-line-number="3">example_isolates <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(mo<span class="op">:</span>AMC) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb10-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/reexports.html">as_tibble</a></span>()</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="co"># (run this on your own console, as this page does not support colour printing)</span></a>
|
||||
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb11-3" data-line-number="3">example_isolates <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb11-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(mo<span class="op">:</span>AMC) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb11-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/reexports.html">as_tibble</a></span>()</a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -522,20 +536,20 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-7-1" class="anchor"></a>AMR 0.7.1<small> 2019-06-23 </small>
|
||||
</h1>
|
||||
<div id="new-2" class="section level4">
|
||||
<div id="new-3" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-2" class="anchor"></a>New</h4>
|
||||
<a href="#new-3" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/AMR-deprecated.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(AMX, CIP) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb11-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">rsi_df</a></span>()</a>
|
||||
<a class="sourceLine" id="cb11-4" data-line-number="4"><span class="co"># antibiotic interpretation value isolates</span></a>
|
||||
<a class="sourceLine" id="cb11-5" data-line-number="5"><span class="co"># 1 Amoxicillin SI 0.4442636 546</span></a>
|
||||
<a class="sourceLine" id="cb11-6" data-line-number="6"><span class="co"># 2 Amoxicillin R 0.5557364 683</span></a>
|
||||
<a class="sourceLine" id="cb11-7" data-line-number="7"><span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span></a>
|
||||
<a class="sourceLine" id="cb11-8" data-line-number="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb12-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(AMX, CIP) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb12-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">rsi_df</a></span>()</a>
|
||||
<a class="sourceLine" id="cb12-4" data-line-number="4"><span class="co"># antibiotic interpretation value isolates</span></a>
|
||||
<a class="sourceLine" id="cb12-5" data-line-number="5"><span class="co"># 1 Amoxicillin SI 0.4442636 546</span></a>
|
||||
<a class="sourceLine" id="cb12-6" data-line-number="6"><span class="co"># 2 Amoxicillin R 0.5557364 683</span></a>
|
||||
<a class="sourceLine" id="cb12-7" data-line-number="7"><span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span></a>
|
||||
<a class="sourceLine" id="cb12-8" data-line-number="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p>
|
||||
@ -553,12 +567,12 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
|
||||
<li>UPEC (Uropathogenic <em>E. coli</em>)</li>
|
||||
</ul>
|
||||
<p>All these lead to the microbial ID of <em>E. coli</em>:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb12-2" data-line-number="2"><span class="co"># B_ESCHR_COL</span></a>
|
||||
<a class="sourceLine" id="cb12-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb12-4" data-line-number="4"><span class="co"># "Escherichia coli"</span></a>
|
||||
<a class="sourceLine" id="cb12-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"EHEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb12-6" data-line-number="6"><span class="co"># "Gram-negative"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="co"># B_ESCHR_COL</span></a>
|
||||
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb13-4" data-line-number="4"><span class="co"># "Escherichia coli"</span></a>
|
||||
<a class="sourceLine" id="cb13-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"EHEC"</span>)</a>
|
||||
<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="co"># "Gram-negative"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Function <code><a href="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><a href="../reference/ab_property.html">ab_info()</a></code>. The <code><a href="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</li>
|
||||
<li><p>Function <code><a href="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
|
||||
@ -603,9 +617,9 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-7-0" class="anchor"></a>AMR 0.7.0<small> 2019-06-03 </small>
|
||||
</h1>
|
||||
<div id="new-3" class="section level4">
|
||||
<div id="new-4" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-3" class="anchor"></a>New</h4>
|
||||
<a href="#new-4" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>Support for translation of disk diffusion and MIC values to RSI values (i.e. antimicrobial interpretations). Supported guidelines are EUCAST (2011 to 2019) and CLSI (2011 to 2019). Use <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on an MIC value (created with <code><a href="../reference/as.mic.html">as.mic()</a></code>), a disk diffusion value (created with the new <code><a href="../reference/as.disk.html">as.disk()</a></code>) or on a complete date set containing columns with MIC or disk diffusion values.</li>
|
||||
<li>Function <code><a href="../reference/mo_property.html">mo_name()</a></code> as alias of <code><a href="../reference/mo_property.html">mo_fullname()</a></code>
|
||||
@ -657,14 +671,14 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=Tra
|
||||
<li>when all values are unique it now shows a message instead of a warning</li>
|
||||
<li>
|
||||
<p>support for boxplots:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span>()</a>
|
||||
<a class="sourceLine" id="cb13-4" data-line-number="4"><span class="co"># grouped boxplots:</span></a>
|
||||
<a class="sourceLine" id="cb13-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb13-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb13-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span>()</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb14-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-4" data-line-number="4"><span class="co"># grouped boxplots:</span></a>
|
||||
<a class="sourceLine" id="cb14-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span>()</a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -720,9 +734,9 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=EUC
|
||||
<li>Contains the complete manual of this package and all of its functions with an explanation of their parameters</li>
|
||||
<li>Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis, import data from WHONET or SPSS and many more.</li>
|
||||
</ul>
|
||||
<div id="new-4" class="section level4">
|
||||
<div id="new-5" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-4" class="anchor"></a>New</h4>
|
||||
<a href="#new-5" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>BREAKING</strong>: removed deprecated functions, parameters and references to ‘bactid’. Use <code><a href="../reference/as.mo.html">as.mo()</a></code> to identify an MO code.</li>
|
||||
@ -749,32 +763,32 @@ This data is updated annually - check the included version with the new function
|
||||
</li>
|
||||
<li>
|
||||
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1"><span class="kw"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="kw"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-3" data-line-number="3"><span class="kw"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-4" data-line-number="4"><span class="kw"><a href="../reference/filter_ab_class.html">filter_1st_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="kw"><a href="../reference/filter_ab_class.html">filter_2nd_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="kw"><a href="../reference/filter_ab_class.html">filter_3rd_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="kw"><a href="../reference/filter_ab_class.html">filter_4th_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="kw"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-9" data-line-number="9"><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-10" data-line-number="10"><span class="kw"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb14-11" data-line-number="11"><span class="kw"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span>()</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="kw"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-2" data-line-number="2"><span class="kw"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-3" data-line-number="3"><span class="kw"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-4" data-line-number="4"><span class="kw"><a href="../reference/filter_ab_class.html">filter_1st_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-5" data-line-number="5"><span class="kw"><a href="../reference/filter_ab_class.html">filter_2nd_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-6" data-line-number="6"><span class="kw"><a href="../reference/filter_ab_class.html">filter_3rd_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-7" data-line-number="7"><span class="kw"><a href="../reference/filter_ab_class.html">filter_4th_cephalosporins</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-8" data-line-number="8"><span class="kw"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-9" data-line-number="9"><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-10" data-line-number="10"><span class="kw"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span>()</a>
|
||||
<a class="sourceLine" id="cb15-11" data-line-number="11"><span class="kw"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span>()</a></code></pre></div>
|
||||
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>)</a>
|
||||
<a class="sourceLine" id="cb15-2" data-line-number="2"><span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
|
||||
<a class="sourceLine" id="cb15-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>, <span class="dt">scope =</span> <span class="st">"all"</span>)</a>
|
||||
<a class="sourceLine" id="cb15-4" data-line-number="4"><span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>)</a>
|
||||
<a class="sourceLine" id="cb16-2" data-line-number="2"><span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
|
||||
<a class="sourceLine" id="cb16-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>, <span class="dt">scope =</span> <span class="st">"all"</span>)</a>
|
||||
<a class="sourceLine" id="cb16-4" data-line-number="4"><span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" data-line-number="1">ab_property -><span class="st"> </span><span class="kw">atc_property</span>()</a>
|
||||
<a class="sourceLine" id="cb16-2" data-line-number="2">ab_name -><span class="st"> </span><span class="kw">atc_name</span>()</a>
|
||||
<a class="sourceLine" id="cb16-3" data-line-number="3">ab_official -><span class="st"> </span><span class="kw">atc_official</span>()</a>
|
||||
<a class="sourceLine" id="cb16-4" data-line-number="4">ab_trivial_nl -><span class="st"> </span><span class="kw">atc_trivial_nl</span>()</a>
|
||||
<a class="sourceLine" id="cb16-5" data-line-number="5">ab_certe -><span class="st"> </span><span class="kw">atc_certe</span>()</a>
|
||||
<a class="sourceLine" id="cb16-6" data-line-number="6">ab_umcg -><span class="st"> </span><span class="kw">atc_umcg</span>()</a>
|
||||
<a class="sourceLine" id="cb16-7" data-line-number="7">ab_tradenames -><span class="st"> </span><span class="kw">atc_tradenames</span>()</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">ab_property -><span class="st"> </span><span class="kw">atc_property</span>()</a>
|
||||
<a class="sourceLine" id="cb17-2" data-line-number="2">ab_name -><span class="st"> </span><span class="kw">atc_name</span>()</a>
|
||||
<a class="sourceLine" id="cb17-3" data-line-number="3">ab_official -><span class="st"> </span><span class="kw">atc_official</span>()</a>
|
||||
<a class="sourceLine" id="cb17-4" data-line-number="4">ab_trivial_nl -><span class="st"> </span><span class="kw">atc_trivial_nl</span>()</a>
|
||||
<a class="sourceLine" id="cb17-5" data-line-number="5">ab_certe -><span class="st"> </span><span class="kw">atc_certe</span>()</a>
|
||||
<a class="sourceLine" id="cb17-6" data-line-number="6">ab_umcg -><span class="st"> </span><span class="kw">atc_umcg</span>()</a>
|
||||
<a class="sourceLine" id="cb17-7" data-line-number="7">ab_tradenames -><span class="st"> </span><span class="kw">atc_tradenames</span>()</a></code></pre></div>
|
||||
These functions use <code>as.atc()</code> internally. The old <code>atc_property</code> has been renamed <code><a href="../reference/atc_online.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><a href="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</li>
|
||||
<li>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</li>
|
||||
<li>Support for the upcoming <a href="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
|
||||
@ -786,20 +800,20 @@ These functions use <code>as.atc()</code> internally. The old <code>atc_property
|
||||
<li>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</li>
|
||||
<li>
|
||||
<p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="https://rdrr.io/r/graphics/plot.html">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(septic_patients, <span class="dt">col_ab =</span> <span class="st">"amox"</span>)</a>
|
||||
<a class="sourceLine" id="cb17-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb17-3" data-line-number="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(x)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb18-1" data-line-number="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(septic_patients, <span class="dt">col_ab =</span> <span class="st">"amox"</span>)</a>
|
||||
<a class="sourceLine" id="cb18-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb18-3" data-line-number="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(x)</a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb18-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(...)</a>
|
||||
<a class="sourceLine" id="cb18-2" data-line-number="2"><span class="co"># or</span></a>
|
||||
<a class="sourceLine" id="cb18-3" data-line-number="3"><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(septic_patients, ...)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(...)</a>
|
||||
<a class="sourceLine" id="cb19-2" data-line-number="2"><span class="co"># or</span></a>
|
||||
<a class="sourceLine" id="cb19-3" data-line-number="3"><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(septic_patients, ...)</a></code></pre></div>
|
||||
<p>is equal to:</p>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb19-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">only_firsts =</span> <span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(septic_patients, ...)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb19-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(only_firsts <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb19-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span>only_firsts)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb20-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">only_firsts =</span> <span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(septic_patients, ...)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb20-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(only_firsts <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb20-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span>only_firsts)</a></code></pre></div>
|
||||
</li>
|
||||
<li>New function <code><a href="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code>
|
||||
</li>
|
||||
@ -828,33 +842,33 @@ These functions use <code>as.atc()</code> internally. The old <code>atc_property
|
||||
<ul>
|
||||
<li>
|
||||
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
|
||||
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1"><span class="co"># mo_fullname() uses as.mo() internally</span></a>
|
||||
<a class="sourceLine" id="cb20-2" data-line-number="2"></a>
|
||||
<a class="sourceLine" id="cb20-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Sthafilokockus aaureuz"</span>)</a>
|
||||
<a class="sourceLine" id="cb20-4" data-line-number="4"><span class="co">#> [1] "Staphylococcus aureus"</span></a>
|
||||
<a class="sourceLine" id="cb20-5" data-line-number="5"></a>
|
||||
<a class="sourceLine" id="cb20-6" data-line-number="6"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. klossi"</span>)</a>
|
||||
<a class="sourceLine" id="cb20-7" data-line-number="7"><span class="co">#> [1] "Staphylococcus kloosii"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="co"># mo_fullname() uses as.mo() internally</span></a>
|
||||
<a class="sourceLine" id="cb21-2" data-line-number="2"></a>
|
||||
<a class="sourceLine" id="cb21-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Sthafilokockus aaureuz"</span>)</a>
|
||||
<a class="sourceLine" id="cb21-4" data-line-number="4"><span class="co">#> [1] "Staphylococcus aureus"</span></a>
|
||||
<a class="sourceLine" id="cb21-5" data-line-number="5"></a>
|
||||
<a class="sourceLine" id="cb21-6" data-line-number="6"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. klossi"</span>)</a>
|
||||
<a class="sourceLine" id="cb21-7" data-line-number="7"><span class="co">#> [1] "Staphylococcus kloosii"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="co"># equal:</span></a>
|
||||
<a class="sourceLine" id="cb21-2" data-line-number="2"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">TRUE</span>)</a>
|
||||
<a class="sourceLine" id="cb21-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">2</span>)</a>
|
||||
<a class="sourceLine" id="cb21-4" data-line-number="4"></a>
|
||||
<a class="sourceLine" id="cb21-5" data-line-number="5"><span class="co"># also equal:</span></a>
|
||||
<a class="sourceLine" id="cb21-6" data-line-number="6"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">FALSE</span>)</a>
|
||||
<a class="sourceLine" id="cb21-7" data-line-number="7"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">0</span>)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="co"># equal:</span></a>
|
||||
<a class="sourceLine" id="cb22-2" data-line-number="2"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">TRUE</span>)</a>
|
||||
<a class="sourceLine" id="cb22-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">2</span>)</a>
|
||||
<a class="sourceLine" id="cb22-4" data-line-number="4"></a>
|
||||
<a class="sourceLine" id="cb22-5" data-line-number="5"><span class="co"># also equal:</span></a>
|
||||
<a class="sourceLine" id="cb22-6" data-line-number="6"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">FALSE</span>)</a>
|
||||
<a class="sourceLine" id="cb22-7" data-line-number="7"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">0</span>)</a></code></pre></div>
|
||||
Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</li>
|
||||
<li>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em>
|
||||
</li>
|
||||
<li>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</li>
|
||||
<li>
|
||||
<p>Incoercible results will now be considered ‘unknown’, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"qwerty"</span>, <span class="dt">language =</span> <span class="st">"es"</span>)</a>
|
||||
<a class="sourceLine" id="cb22-2" data-line-number="2"><span class="co"># Warning: </span></a>
|
||||
<a class="sourceLine" id="cb22-3" data-line-number="3"><span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
|
||||
<a class="sourceLine" id="cb22-4" data-line-number="4"><span class="co">#> [1] "(género desconocido)"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"qwerty"</span>, <span class="dt">language =</span> <span class="st">"es"</span>)</a>
|
||||
<a class="sourceLine" id="cb23-2" data-line-number="2"><span class="co"># Warning: </span></a>
|
||||
<a class="sourceLine" id="cb23-3" data-line-number="3"><span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
|
||||
<a class="sourceLine" id="cb23-4" data-line-number="4"><span class="co">#> [1] "(género desconocido)"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Fix for vector containing only empty values</li>
|
||||
<li>Finds better results when input is in other languages</li>
|
||||
@ -900,19 +914,19 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
|
||||
<a class="sourceLine" id="cb23-2" data-line-number="2"><span class="co"># OLD WAY</span></a>
|
||||
<a class="sourceLine" id="cb23-3" data-line-number="3">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb23-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">genus =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb23-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus)</a>
|
||||
<a class="sourceLine" id="cb23-6" data-line-number="6"><span class="co"># NEW WAY</span></a>
|
||||
<a class="sourceLine" id="cb23-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb23-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a>
|
||||
<a class="sourceLine" id="cb23-9" data-line-number="9"></a>
|
||||
<a class="sourceLine" id="cb23-10" data-line-number="10"><span class="co"># Even supports grouping variables:</span></a>
|
||||
<a class="sourceLine" id="cb23-11" data-line-number="11">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb23-12" data-line-number="12"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(gender) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb23-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
|
||||
<a class="sourceLine" id="cb24-2" data-line-number="2"><span class="co"># OLD WAY</span></a>
|
||||
<a class="sourceLine" id="cb24-3" data-line-number="3">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb24-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">genus =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb24-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus)</a>
|
||||
<a class="sourceLine" id="cb24-6" data-line-number="6"><span class="co"># NEW WAY</span></a>
|
||||
<a class="sourceLine" id="cb24-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb24-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a>
|
||||
<a class="sourceLine" id="cb24-9" data-line-number="9"></a>
|
||||
<a class="sourceLine" id="cb24-10" data-line-number="10"><span class="co"># Even supports grouping variables:</span></a>
|
||||
<a class="sourceLine" id="cb24-11" data-line-number="11">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb24-12" data-line-number="12"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(gender) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb24-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a></code></pre></div>
|
||||
</li>
|
||||
<li>Header info is now available as a list, with the <code>header</code> function</li>
|
||||
<li>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</li>
|
||||
@ -947,9 +961,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-5-0" class="anchor"></a>AMR 0.5.0<small> 2018-11-30 </small>
|
||||
</h1>
|
||||
<div id="new-5" class="section level4">
|
||||
<div id="new-6" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-5" class="anchor"></a>New</h4>
|
||||
<a href="#new-6" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>Repository moved to GitLab: <a href="https://gitlab.com/msberends/AMR" class="uri">https://gitlab.com/msberends/AMR</a>
|
||||
</li>
|
||||
@ -987,10 +1001,10 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<li>Fewer than 3 characters as input for <code>as.mo</code> will return NA</li>
|
||||
<li>
|
||||
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
|
||||
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. species"</span>) <span class="co"># B_ESCHR</span></a>
|
||||
<a class="sourceLine" id="cb24-2" data-line-number="2"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"E. spp."</span>) <span class="co"># "Escherichia species"</span></a>
|
||||
<a class="sourceLine" id="cb24-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. spp"</span>) <span class="co"># B_STPHY</span></a>
|
||||
<a class="sourceLine" id="cb24-4" data-line-number="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. species"</span>) <span class="co"># "Staphylococcus species"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. species"</span>) <span class="co"># B_ESCHR</span></a>
|
||||
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"E. spp."</span>) <span class="co"># "Escherichia species"</span></a>
|
||||
<a class="sourceLine" id="cb25-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. spp"</span>) <span class="co"># B_STPHY</span></a>
|
||||
<a class="sourceLine" id="cb25-4" data-line-number="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. species"</span>) <span class="co"># "Staphylococcus species"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</li>
|
||||
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
|
||||
@ -1003,17 +1017,17 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for grouping variables, test with:</p>
|
||||
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb25-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb26-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb26-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for (un)selecting columns:</p>
|
||||
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb26-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb26-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span>count, <span class="op">-</span>cum_count) <span class="co"># only get item, percent, cum_percent</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb27-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb27-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb27-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span>count, <span class="op">-</span>cum_count) <span class="co"># only get item, percent, cum_percent</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Check for <code><a href="https://rdrr.io/pkg/hms/man/Deprecated.html">hms::is.hms</a></code>
|
||||
<li>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code>
|
||||
</li>
|
||||
<li>Now prints in markdown at default in non-interactive sessions</li>
|
||||
<li>No longer adds the factor level column and sorts factors on count again</li>
|
||||
@ -1074,9 +1088,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-4-0" class="anchor"></a>AMR 0.4.0<small> 2018-10-01 </small>
|
||||
</h1>
|
||||
<div id="new-6" class="section level4">
|
||||
<div id="new-7" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-6" class="anchor"></a>New</h4>
|
||||
<a href="#new-7" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>The data set <code>microorganisms</code> now contains <strong>all microbial taxonomic data from ITIS</strong> (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via <a href="https://itis.gov" class="uri">https://itis.gov</a>. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set <code>microorganisms.old</code> contains all previously known taxonomic names from those kingdoms.</li>
|
||||
<li>New functions based on the existing function <code>mo_property</code>:
|
||||
@ -1091,18 +1105,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
</li>
|
||||
</ul>
|
||||
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||
<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb27-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb27-2" data-line-number="2"><span class="co"># [1] "Gram negative"</span></a>
|
||||
<a class="sourceLine" id="cb27-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"de"</span>) <span class="co"># German</span></a>
|
||||
<a class="sourceLine" id="cb27-4" data-line-number="4"><span class="co"># [1] "Gramnegativ"</span></a>
|
||||
<a class="sourceLine" id="cb27-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># Spanish</span></a>
|
||||
<a class="sourceLine" id="cb27-6" data-line-number="6"><span class="co"># [1] "Gram negativo"</span></a>
|
||||
<a class="sourceLine" id="cb27-7" data-line-number="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. group A"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>) <span class="co"># Portuguese</span></a>
|
||||
<a class="sourceLine" id="cb27-8" data-line-number="8"><span class="co"># [1] "Streptococcus grupo A"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb28-2" data-line-number="2"><span class="co"># [1] "Gram negative"</span></a>
|
||||
<a class="sourceLine" id="cb28-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"de"</span>) <span class="co"># German</span></a>
|
||||
<a class="sourceLine" id="cb28-4" data-line-number="4"><span class="co"># [1] "Gramnegativ"</span></a>
|
||||
<a class="sourceLine" id="cb28-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># Spanish</span></a>
|
||||
<a class="sourceLine" id="cb28-6" data-line-number="6"><span class="co"># [1] "Gram negativo"</span></a>
|
||||
<a class="sourceLine" id="cb28-7" data-line-number="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. group A"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>) <span class="co"># Portuguese</span></a>
|
||||
<a class="sourceLine" id="cb28-8" data-line-number="8"><span class="co"># [1] "Streptococcus grupo A"</span></a></code></pre></div>
|
||||
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
|
||||
<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"Esc blattae"</span>)</a>
|
||||
<a class="sourceLine" id="cb28-2" data-line-number="2"><span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span></a>
|
||||
<a class="sourceLine" id="cb28-3" data-line-number="3"><span class="co"># [1] "Gram negative"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"Esc blattae"</span>)</a>
|
||||
<a class="sourceLine" id="cb29-2" data-line-number="2"><span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span></a>
|
||||
<a class="sourceLine" id="cb29-3" data-line-number="3"><span class="co"># [1] "Gram negative"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates
|
||||
<ul>
|
||||
@ -1113,18 +1127,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
</li>
|
||||
<li>
|
||||
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
|
||||
<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb29-2" data-line-number="2"><span class="co"># [1] B_ESCHR_COL</span></a>
|
||||
<a class="sourceLine" id="cb29-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MRSA"</span>)</a>
|
||||
<a class="sourceLine" id="cb29-4" data-line-number="4"><span class="co"># [1] B_STPHY_AUR</span></a>
|
||||
<a class="sourceLine" id="cb29-5" data-line-number="5"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S group A"</span>)</a>
|
||||
<a class="sourceLine" id="cb29-6" data-line-number="6"><span class="co"># [1] B_STRPTC_GRA</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb30-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb30-2" data-line-number="2"><span class="co"># [1] B_ESCHR_COL</span></a>
|
||||
<a class="sourceLine" id="cb30-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MRSA"</span>)</a>
|
||||
<a class="sourceLine" id="cb30-4" data-line-number="4"><span class="co"># [1] B_STPHY_AUR</span></a>
|
||||
<a class="sourceLine" id="cb30-5" data-line-number="5"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S group A"</span>)</a>
|
||||
<a class="sourceLine" id="cb30-6" data-line-number="6"><span class="co"># [1] B_STRPTC_GRA</span></a></code></pre></div>
|
||||
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
|
||||
<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb30-1" data-line-number="1">thousands_of_E_colis <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="st">"E. coli"</span>, <span class="dv">25000</span>)</a>
|
||||
<a class="sourceLine" id="cb30-2" data-line-number="2">microbenchmark<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(thousands_of_E_colis), <span class="dt">unit =</span> <span class="st">"s"</span>)</a>
|
||||
<a class="sourceLine" id="cb30-3" data-line-number="3"><span class="co"># Unit: seconds</span></a>
|
||||
<a class="sourceLine" id="cb30-4" data-line-number="4"><span class="co"># min median max neval</span></a>
|
||||
<a class="sourceLine" id="cb30-5" data-line-number="5"><span class="co"># 0.01817717 0.01843957 0.03878077 100</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" data-line-number="1">thousands_of_E_colis <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="st">"E. coli"</span>, <span class="dv">25000</span>)</a>
|
||||
<a class="sourceLine" id="cb31-2" data-line-number="2">microbenchmark<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(thousands_of_E_colis), <span class="dt">unit =</span> <span class="st">"s"</span>)</a>
|
||||
<a class="sourceLine" id="cb31-3" data-line-number="3"><span class="co"># Unit: seconds</span></a>
|
||||
<a class="sourceLine" id="cb31-4" data-line-number="4"><span class="co"># min median max neval</span></a>
|
||||
<a class="sourceLine" id="cb31-5" data-line-number="5"><span class="co"># 0.01817717 0.01843957 0.03878077 100</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
|
||||
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
|
||||
@ -1152,12 +1166,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
|
||||
<li>
|
||||
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
|
||||
<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" data-line-number="1"><span class="kw">ab_official</span>(<span class="st">"Bactroban"</span>)</a>
|
||||
<a class="sourceLine" id="cb31-2" data-line-number="2"><span class="co"># [1] "Mupirocin"</span></a>
|
||||
<a class="sourceLine" id="cb31-3" data-line-number="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb31-4" data-line-number="4"><span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span></a>
|
||||
<a class="sourceLine" id="cb31-5" data-line-number="5"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb31-6" data-line-number="6"><span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" data-line-number="1"><span class="kw">ab_official</span>(<span class="st">"Bactroban"</span>)</a>
|
||||
<a class="sourceLine" id="cb32-2" data-line-number="2"><span class="co"># [1] "Mupirocin"</span></a>
|
||||
<a class="sourceLine" id="cb32-3" data-line-number="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb32-4" data-line-number="4"><span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span></a>
|
||||
<a class="sourceLine" id="cb32-5" data-line-number="5"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb32-6" data-line-number="6"><span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
|
||||
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
|
||||
@ -1168,13 +1182,13 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
|
||||
<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(amox, cipr) <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>()</a>
|
||||
<a class="sourceLine" id="cb32-2" data-line-number="2"><span class="co"># which is the same as:</span></a>
|
||||
<a class="sourceLine" id="cb32-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>(amox, cipr)</a>
|
||||
<a class="sourceLine" id="cb32-4" data-line-number="4"></a>
|
||||
<a class="sourceLine" id="cb32-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl)</a>
|
||||
<a class="sourceLine" id="cb32-6" data-line-number="6">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl, gent)</a>
|
||||
<a class="sourceLine" id="cb32-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl, gent, pita)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb33-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(amox, cipr) <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>()</a>
|
||||
<a class="sourceLine" id="cb33-2" data-line-number="2"><span class="co"># which is the same as:</span></a>
|
||||
<a class="sourceLine" id="cb33-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>(amox, cipr)</a>
|
||||
<a class="sourceLine" id="cb33-4" data-line-number="4"></a>
|
||||
<a class="sourceLine" id="cb33-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl)</a>
|
||||
<a class="sourceLine" id="cb33-6" data-line-number="6">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl, gent)</a>
|
||||
<a class="sourceLine" id="cb33-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/AMR-deprecated.html">portion_S</a></span>(amcl, gent, pita)</a></code></pre></div>
|
||||
</li>
|
||||
<li>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
|
||||
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
|
||||
@ -1188,12 +1202,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for types (classes) list and matrix for <code>freq</code></p>
|
||||
<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb33-1" data-line-number="1">my_matrix =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/with.html">with</a></span>(septic_patients, <span class="kw"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(age, gender), <span class="dt">ncol =</span> <span class="dv">2</span>))</a>
|
||||
<a class="sourceLine" id="cb33-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(my_matrix)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb34-1" data-line-number="1">my_matrix =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/with.html">with</a></span>(septic_patients, <span class="kw"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(age, gender), <span class="dt">ncol =</span> <span class="dv">2</span>))</a>
|
||||
<a class="sourceLine" id="cb34-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(my_matrix)</a></code></pre></div>
|
||||
<p>For lists, subsetting is possible:</p>
|
||||
<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb34-1" data-line-number="1">my_list =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="dt">age =</span> septic_patients<span class="op">$</span>age, <span class="dt">gender =</span> septic_patients<span class="op">$</span>gender)</a>
|
||||
<a class="sourceLine" id="cb34-2" data-line-number="2">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age)</a>
|
||||
<a class="sourceLine" id="cb34-3" data-line-number="3">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb35-1" data-line-number="1">my_list =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="dt">age =</span> septic_patients<span class="op">$</span>age, <span class="dt">gender =</span> septic_patients<span class="op">$</span>gender)</a>
|
||||
<a class="sourceLine" id="cb35-2" data-line-number="2">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(age)</a>
|
||||
<a class="sourceLine" id="cb35-3" data-line-number="3">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1209,9 +1223,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-3-0" class="anchor"></a>AMR 0.3.0<small> 2018-08-14 </small>
|
||||
</h1>
|
||||
<div id="new-7" class="section level4">
|
||||
<div id="new-8" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-7" class="anchor"></a>New</h4>
|
||||
<a href="#new-8" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.
|
||||
@ -1346,9 +1360,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-2-0" class="anchor"></a>AMR 0.2.0<small> 2018-05-03 </small>
|
||||
</h1>
|
||||
<div id="new-8" class="section level4">
|
||||
<div id="new-9" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#new-8" class="anchor"></a>New</h4>
|
||||
<a href="#new-9" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>Full support for Windows, Linux and macOS</li>
|
||||
<li>Full support for old R versions, only R-3.0.0 (April 2013) or later is needed (needed packages may have other dependencies)</li>
|
||||
@ -1427,7 +1441,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<div id="tocnav">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#amr-0-9-0-9011">0.9.0.9011</a></li>
|
||||
<li><a href="#amr-0-9-0-9012">0.9.0.9012</a></li>
|
||||
<li><a href="#amr-0-9-0">0.9.0</a></li>
|
||||
<li><a href="#amr-0-8-0">0.8.0</a></li>
|
||||
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
||||
|
@ -85,7 +85,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9010</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -253,6 +253,8 @@
|
||||
|
||||
<span class='fu'>ab_atc_group2</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_loinc</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_ddd</span>(<span class='no'>x</span>, <span class='kw'>administration</span> <span class='kw'>=</span> <span class='st'>"oral"</span>, <span class='kw'>units</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_info</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)
|
||||
@ -332,18 +334,18 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>maturing<
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"AMX"</span>) <span class='co'># "Amoxicillin"</span>
|
||||
<span class='fu'>ab_atc</span>(<span class='st'>"AMX"</span>) <span class='co'># J01CA04 (ATC code from the WHO)</span>
|
||||
<span class='fu'>ab_cid</span>(<span class='st'>"AMX"</span>) <span class='co'># 33613 (Compound ID from PubChem)</span>
|
||||
|
||||
<span class='fu'>ab_synonyms</span>(<span class='st'>"AMX"</span>) <span class='co'># a list with brand names of amoxicillin</span>
|
||||
<span class='fu'>ab_tradenames</span>(<span class='st'>"AMX"</span>) <span class='co'># same</span>
|
||||
|
||||
<span class='fu'>ab_group</span>(<span class='st'>"AMX"</span>) <span class='co'># "Beta-lactams/penicillins"</span>
|
||||
<span class='fu'>ab_atc_group1</span>(<span class='st'>"AMX"</span>) <span class='co'># "Beta-lactam antibacterials, penicillins"</span>
|
||||
<span class='fu'>ab_atc_group2</span>(<span class='st'>"AMX"</span>) <span class='co'># "Penicillins with extended spectrum"</span>
|
||||
|
||||
<span class='co'># smart lowercase tranformation</span>
|
||||
<span class='fu'>ab_name</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"AMC"</span>, <span class='st'>"PLB"</span>)) <span class='co'># "Amoxicillin/clavulanic acid" "Polymyxin B"</span>
|
||||
<span class='fu'>ab_name</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"AMC"</span>, <span class='st'>"PLB"</span>),
|
||||
<span class='kw'>tolower</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "amoxicillin/clavulanic acid" "polymyxin B"</span>
|
||||
|
||||
<span class='co'># defined daily doses (DDD)</span>
|
||||
<span class='fu'>ab_ddd</span>(<span class='st'>"AMX"</span>, <span class='st'>"oral"</span>) <span class='co'># 1</span>
|
||||
<span class='fu'>ab_ddd</span>(<span class='st'>"AMX"</span>, <span class='st'>"oral"</span>, <span class='kw'>units</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "g"</span>
|
||||
<span class='fu'>ab_ddd</span>(<span class='st'>"AMX"</span>, <span class='st'>"iv"</span>) <span class='co'># 1</span>
|
||||
@ -351,12 +353,13 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>maturing<
|
||||
|
||||
<span class='fu'>ab_info</span>(<span class='st'>"AMX"</span>) <span class='co'># all properties as a list</span>
|
||||
|
||||
<span class='co'># all ab_* functions use as.ab() internally:</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"Fluclox"</span>) <span class='co'># "Flucloxacillin"</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"fluklox"</span>) <span class='co'># "Flucloxacillin"</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"floxapen"</span>) <span class='co'># "Flucloxacillin"</span>
|
||||
<span class='fu'>ab_name</span>(<span class='fl'>21319</span>) <span class='co'># "Flucloxacillin" (using CID)</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"J01CF05"</span>) <span class='co'># "Flucloxacillin" (using ATC)</span>
|
||||
<span class='co'># all ab_* functions use as.ab() internally, so you can go from 'any' to 'any':</span>
|
||||
<span class='fu'>ab_atc</span>(<span class='st'>"AMP"</span>) <span class='co'># ATC code of AMP (ampicillin)</span>
|
||||
<span class='fu'>ab_group</span>(<span class='st'>"J01CA01"</span>) <span class='co'># Drug group of ampicillins ATC code</span>
|
||||
<span class='fu'>ab_loinc</span>(<span class='st'>"ampicillin"</span>) <span class='co'># LOINC codes of ampicillin</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"21066-6"</span>) <span class='co'># "Ampicillin" (using LOINC)</span>
|
||||
<span class='fu'>ab_name</span>(<span class='fl'>6249</span>) <span class='co'># "Ampicillin" (using CID)</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"J01CA01"</span>) <span class='co'># "Ampicillin" (using ATC)</span>
|
||||
|
||||
<span class='co'># spelling from different languages and dyslexia are no problem</span>
|
||||
<span class='fu'>ab_atc</span>(<span class='st'>"ceftriaxon"</span>)
|
||||
|
@ -85,7 +85,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -244,7 +244,7 @@
|
||||
|
||||
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
||||
|
||||
<h3>For the antibiotics data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 452 observations and 13 variables:</h3>
|
||||
<h3>For the antibiotics data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 452 observations and 14 variables:</h3>
|
||||
|
||||
<ul>
|
||||
<li><p><code>ab</code><br /> Antibiotic ID as used in this package (like <code>AMC</code>), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available</p></li>
|
||||
@ -260,6 +260,7 @@
|
||||
<li><p><code>oral_units</code><br /> Units of <code>oral_ddd</code></p></li>
|
||||
<li><p><code>iv_ddd</code><br /> Defined Daily Dose (DDD), parenteral treatment</p></li>
|
||||
<li><p><code>iv_units</code><br /> Units of <code>iv_ddd</code></p></li>
|
||||
<li><p><code>loinc</code><br /> All LOINC codes (Logical Observation Identifiers Names and Codes) associated with the antimicrobial name of the drug. Use <code>ab_loic()</code> to retrieve them quickly, see <code><a href='ab_property.html'>ab_property()</a></code>.</p></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -322,7 +323,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alex W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
|
||||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N M Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>EUCAST rules — eucast_rules • AMR (for R)</title>
|
||||
<title>Apply EUCAST rules — eucast_rules • AMR (for R)</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@ -50,7 +50,7 @@
|
||||
<link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script>
|
||||
|
||||
<meta property="og:title" content="EUCAST rules — eucast_rules" />
|
||||
<meta property="og:title" content="Apply EUCAST rules — eucast_rules" />
|
||||
<meta property="og:description" content="Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, http://eucast.org), see Source. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables.
|
||||
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules are applied at default, see Details." />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
@ -86,7 +86,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -229,7 +229,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>EUCAST rules</h1>
|
||||
<h1>Apply EUCAST rules</h1>
|
||||
|
||||
<div class="hidden name"><code>eucast_rules.Rd</code></div>
|
||||
</div>
|
||||
@ -305,10 +305,10 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
|
||||
<li><p>Set trimethoprim (TMP) = R where trimethoprim/sulfamethoxazole (SXT) = R;</p></li>
|
||||
<li><p>Set amoxicillin/clavulanic acid (AMC) = S where amoxicillin (AMX) = S;</p></li>
|
||||
<li><p>Set piperacillin/tazobactam (TZP) = S where piperacillin (PIP) = S;</p></li>
|
||||
<li><p>Set trimethoprim/sulfamethoxazole (SXT) = S where trimethoprim (TMP) = S.
|
||||
To <em>not</em> use these rules, please use <code>eucast_rules(..., rules = c("breakpoints", "expert"))</code>.</p></li>
|
||||
<li><p>Set trimethoprim/sulfamethoxazole (SXT) = S where trimethoprim (TMP) = S.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>To <em>not</em> use these rules, please use <code>eucast_rules(..., rules = c("breakpoints", "expert"))</code>.</p>
|
||||
<p>The file containing all EUCAST rules is located here: <a href='https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv'>https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv</a>.</p>
|
||||
<h2 class="hasAnchor" id="antibiotics"><a class="anchor" href="#antibiotics"></a>Antibiotics</h2>
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9011</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9012</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -280,7 +280,7 @@
|
||||
<td>
|
||||
<p><code><a href="eucast_rules.html">eucast_rules()</a></code> </p>
|
||||
</td>
|
||||
<td><p>EUCAST rules</p></td>
|
||||
<td><p>Apply EUCAST rules</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@ -316,7 +316,7 @@
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_info()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
|
||||
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_loinc()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_info()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Property of an antibiotic</p></td>
|
||||
</tr><tr>
|
||||
|
Reference in New Issue
Block a user