mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 18:01:50 +02:00
(v1.7.1.9022) rely on vctrs for ab selectors
This commit is contained in:
@ -56,6 +56,8 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
@ -67,9 +69,15 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body data-spy="scroll" data-target="#toc">
|
||||
|
||||
|
||||
<div class="container template-reference-topic">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
@ -83,7 +91,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
</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">1.7.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9022</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -91,14 +99,14 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fas fa-home"></span>
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fas fa-question-circle"></span>
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
@ -107,77 +115,77 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fas fa-directions"></span>
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/resistance_predict.html">
|
||||
<span class="fas fa-dice"></span>
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/datasets.html">
|
||||
<span class="fas fa-database"></span>
|
||||
<span class="fa fa-database"></span>
|
||||
|
||||
Data sets for download / own use
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/PCA.html">
|
||||
<span class="fas fa-compress"></span>
|
||||
<span class="fa fa-compress"></span>
|
||||
|
||||
Conduct principal component analysis for AMR
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/MDR.html">
|
||||
<span class="fas fa-skull-crossbones"></span>
|
||||
<span class="fa fa-skull-crossbones"></span>
|
||||
|
||||
Determine multi-drug resistance (MDR)
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/WHONET.html">
|
||||
<span class="fas fa-globe-americas"></span>
|
||||
<span class="fa fa-globe-americas"></span>
|
||||
|
||||
Work with WHONET data
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/SPSS.html">
|
||||
<span class="fas fa-file-upload"></span>
|
||||
<span class="fa fa-file-upload"></span>
|
||||
|
||||
Import data from SPSS/SAS/Stata
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fas fa-exchange-alt"></span>
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/mo_property.html">
|
||||
<span class="fas fa-bug"></span>
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/ab_property.html">
|
||||
<span class="fas fa-capsules"></span>
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/benchmarks.html">
|
||||
<span class="fas fa-shipping-fast"></span>
|
||||
<span class="fa fa-shipping-fast"></span>
|
||||
|
||||
Other: benchmarks
|
||||
</a>
|
||||
@ -186,14 +194,14 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/index.html">
|
||||
<span class="fas fa-book-open"></span>
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fas fa-users"></span>
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
@ -216,7 +224,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
</li>
|
||||
<li>
|
||||
<a href="../survey.html">
|
||||
<span class="fas fa-clipboard-list"></span>
|
||||
<span class="fa fa-clipboard-list"></span>
|
||||
|
||||
Survey
|
||||
</a>
|
||||
@ -244,7 +252,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<p><code>resistance()</code> should be used to calculate resistance, <code>susceptibility()</code> should be used to calculate susceptibility.<br /></p>
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>resistance</span><span class='op'>(</span><span class='va'>...</span>, minimum <span class='op'>=</span> <span class='fl'>30</span>, as_percent <span class='op'>=</span> <span class='cn'>FALSE</span>, only_all_tested <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||||
<div class="ref-usage sourceCode"><pre class='sourceCode r'><code><span class='fu'>resistance</span><span class='op'>(</span><span class='va'>...</span>, minimum <span class='op'>=</span> <span class='fl'>30</span>, as_percent <span class='op'>=</span> <span class='cn'>FALSE</span>, only_all_tested <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||||
|
||||
<span class='fu'>susceptibility</span><span class='op'>(</span><span class='va'>...</span>, minimum <span class='op'>=</span> <span class='fl'>30</span>, as_percent <span class='op'>=</span> <span class='cn'>FALSE</span>, only_all_tested <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||||
|
||||
@ -276,7 +284,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
as_percent <span class='op'>=</span> <span class='cn'>FALSE</span>,
|
||||
combine_SI <span class='op'>=</span> <span class='cn'>TRUE</span>,
|
||||
combine_IR <span class='op'>=</span> <span class='cn'>FALSE</span>
|
||||
<span class='op'>)</span></pre>
|
||||
<span class='op'>)</span></code></pre></div>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
@ -335,7 +343,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
|
||||
|
||||
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how <code>susceptibility()</code> works to calculate the %SI:</p><pre>--------------------------------------------------------------------
|
||||
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how <code>susceptibility()</code> works to calculate the %SI:</p><pre><code>--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
----------------------- -----------------------
|
||||
Drug A Drug B include as include as include as include as
|
||||
@ -351,15 +359,15 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
R <NA> - - - -
|
||||
<NA> <NA> - - - -
|
||||
--------------------------------------------------------------------
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre> <span class='fu'><a href='count.html'>count_S</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_I</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_R</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>=</span> <span class='fu'><a href='count.html'>count_all</a></span><span class='op'>(</span><span class='op'>)</span>
|
||||
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre class='sourceCode r'><code> <span class='fu'><a href='count.html'>count_S</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_I</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_R</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>=</span> <span class='fu'><a href='count.html'>count_all</a></span><span class='op'>(</span><span class='op'>)</span>
|
||||
<span class='fu'>proportion_S</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'>proportion_I</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'>proportion_R</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>=</span> <span class='fl'>1</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre> <span class='fu'><a href='count.html'>count_S</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_I</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_R</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>>=</span> <span class='fu'><a href='count.html'>count_all</a></span><span class='op'>(</span><span class='op'>)</span>
|
||||
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre class='sourceCode r'><code> <span class='fu'><a href='count.html'>count_S</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_I</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='count.html'>count_R</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>>=</span> <span class='fu'><a href='count.html'>count_all</a></span><span class='op'>(</span><span class='op'>)</span>
|
||||
<span class='fu'>proportion_S</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'>proportion_I</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'>proportion_R</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>>=</span> <span class='fl'>1</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
|
||||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable Lifecycle</h2>
|
||||
@ -393,7 +401,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
<div class='dont-index'><p><code><a href='count.html'>count()</a></code> to count resistant and susceptible isolates.</p></div>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># example_isolates is a data set available in the AMR package.</span>
|
||||
<div class="ref-examples sourceCode"><pre class='sourceCode r'><code><span class='co'># example_isolates is a data set available in the AMR package.</span>
|
||||
<span class='op'>?</span><span class='va'>example_isolates</span>
|
||||
|
||||
<span class='fu'>resistance</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='co'># determines %R</span>
|
||||
@ -466,7 +474,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
<span class='fu'>proportion_df</span><span class='op'>(</span>translate <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||||
<span class='op'>}</span>
|
||||
<span class='co'># }</span>
|
||||
</pre>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
<nav id="toc" data-toggle="toc" class="sticky-top">
|
||||
@ -478,11 +486,11 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
|
||||
<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/'>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>
|
||||
<p><p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/" class="external-link">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/" class="external-link">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/" class="external-link">Alexander W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/" class="external-link">Bhanu N. M. Sinha</a>, <a href="https://www.rug.nl/staff/c.j.albers/" class="external-link">Casper J. Albers</a>, <a href="https://www.rug.nl/staff/c.glasner/" class="external-link">Corinna Glasner</a>.</p></p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||||
<p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 1.6.1.9001.</p></p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
@ -491,6 +499,8 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Reference in New Issue
Block a user