mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 17:26:12 +01:00
(v0.7.1.9064) bug-drug fix
This commit is contained in:
parent
93be16484b
commit
f3276592b7
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 0.7.1.9063
|
||||
Version: 0.7.1.9064
|
||||
Date: 2019-08-27
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
|
4
NEWS.md
4
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 0.7.1.9063
|
||||
# AMR 0.7.1.9064
|
||||
|
||||
### Breaking
|
||||
* Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`:
|
||||
@ -37,7 +37,7 @@
|
||||
```
|
||||
You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R `format()` function:
|
||||
```r
|
||||
format(x, combine_SI = TRUE)
|
||||
format(x, combine_IR = FALSE)
|
||||
```
|
||||
* Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` 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 `portion` and `count` help pages), where the %SI is being determined:
|
||||
|
||||
|
@ -23,12 +23,12 @@
|
||||
#'
|
||||
#' Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{format} on the result to prettify it to a printable format, see Examples.
|
||||
#' @inheritParams eucast_rules
|
||||
#' @param combine_RI logical to indicate whether values R and I should be summed
|
||||
#' @param combine_IR logical to indicate whether values R and I should be summed
|
||||
#' @inheritParams rsi_df
|
||||
#' @importFrom dplyr rename
|
||||
#' @importFrom tidyr spread
|
||||
#' @importFrom clean freq
|
||||
#' @details The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_RI = FALSE} (default) to test R vs. S+I and \code{combine_RI = TRUE} to test R+I vs. S.
|
||||
#' @details The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
#' @export
|
||||
#' @source \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
@ -72,8 +72,8 @@ bug_drug_combinations <- function(x, col_mo = NULL, minimum = 30) {
|
||||
#' @importFrom tidyr spread
|
||||
#' @exportMethod format.bugdrug
|
||||
#' @export
|
||||
format.bugdrug <- function(x, combine_RI = FALSE, add_ab_group = TRUE, ...) {
|
||||
if (combine_RI == FALSE) {
|
||||
format.bugdrug <- function(x, combine_IR = FALSE, add_ab_group = TRUE, ...) {
|
||||
if (combine_IR == FALSE) {
|
||||
x$isolates <- x$R
|
||||
} else {
|
||||
x$isolates <- x$R + x$I
|
||||
|
@ -78,7 +78,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -225,9 +225,9 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="amr-0-7-1-9063" class="section level1">
|
||||
<div id="amr-0-7-1-9064" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-7-1-9063" class="anchor"></a>AMR 0.7.1.9063<small> Unreleased </small>
|
||||
<a href="#amr-0-7-1-9064" class="anchor"></a>AMR 0.7.1.9064<small> Unreleased </small>
|
||||
</h1>
|
||||
<div id="breaking" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@ -269,7 +269,7 @@ This is important, because a value like <code>"testvalue"</code> could never be
|
||||
<a class="sourceLine" id="cb3-7" data-line-number="7"><span class="co">#> 4 AMC B_PSDMN_AER 0 0 30 30</span></a>
|
||||
<a class="sourceLine" id="cb3-8" data-line-number="8"><span class="co">#> 5 AMC B_STPHY_AUR 234 0 1 235</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://www.rdocumentation.org/packages/base/topics/format">format()</a></code> function:</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="https://www.rdocumentation.org/packages/base/topics/format">format</a></span>(x, <span class="dt">combine_SI =</span> <span class="ot">TRUE</span>)</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://www.rdocumentation.org/packages/base/topics/format">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 susceptibily 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>
|
||||
@ -1258,7 +1258,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-7-1-9063">0.7.1.9063</a></li>
|
||||
<li><a href="#amr-0-7-1-9064">0.7.1.9064</a></li>
|
||||
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
||||
<li><a href="#amr-0-7-0">0.7.0</a></li>
|
||||
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
||||
|
@ -80,7 +80,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -252,7 +252,7 @@
|
||||
<td><p>the minimum allowed number of available (tested) isolates. Any isolate count lower than <code>minimum</code> will return <code>NA</code> with a warning. The default number of <code>30</code> isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>combine_RI</th>
|
||||
<th>combine_IR</th>
|
||||
<td><p>logical to indicate whether values R and I should be summed</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -263,7 +263,7 @@
|
||||
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>The function <code>format</code> calculated the resistance per bug-drug combination. Use <code>combine_RI = FALSE</code> (default) to test R vs. S+I and <code>combine_RI = TRUE</code> to test R+I vs. S.</p>
|
||||
<p>The function <code>format</code> calculated the resistance per bug-drug combination. Use <code>combine_IR = FALSE</code> (default) to test R vs. S+I and <code>combine_IR = TRUE</code> to test R+I vs. S.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
|
||||
|
||||
|
@ -78,7 +78,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.7.1.9063</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9064</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -16,13 +16,13 @@ bug_drug_combinations(x, col_mo = NULL, minimum = 30)
|
||||
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.}
|
||||
|
||||
\item{combine_RI}{logical to indicate whether values R and I should be summed}
|
||||
\item{combine_IR}{logical to indicate whether values R and I should be summed}
|
||||
}
|
||||
\description{
|
||||
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{format} on the result to prettify it to a printable format, see Examples.
|
||||
}
|
||||
\details{
|
||||
The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_RI = FALSE} (default) to test R vs. S+I and \code{combine_RI = TRUE} to test R+I vs. S.
|
||||
The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
}
|
||||
\section{Read more on our website!}{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user