mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 04:46:11 +01:00
(v0.7.1.9065) bug-drug fix
This commit is contained in:
parent
f3276592b7
commit
248638ad91
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 0.7.1.9064
|
||||
Version: 0.7.1.9065
|
||||
Date: 2019-08-27
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
|
@ -23,7 +23,7 @@ S3method(c,ab)
|
||||
S3method(c,mo)
|
||||
S3method(droplevels,mic)
|
||||
S3method(droplevels,rsi)
|
||||
S3method(format,bugdrug)
|
||||
S3method(format,bug_drug_combinations)
|
||||
S3method(freq,mo)
|
||||
S3method(freq,rsi)
|
||||
S3method(kurtosis,data.frame)
|
||||
@ -38,7 +38,7 @@ S3method(plot,mic)
|
||||
S3method(plot,resistance_predict)
|
||||
S3method(plot,rsi)
|
||||
S3method(print,ab)
|
||||
S3method(print,bugdrug)
|
||||
S3method(print,bug_drug_combinations)
|
||||
S3method(print,catalogue_of_life_version)
|
||||
S3method(print,disk)
|
||||
S3method(print,mic)
|
||||
@ -201,7 +201,7 @@ exportMethods(c.ab)
|
||||
exportMethods(c.mo)
|
||||
exportMethods(droplevels.mic)
|
||||
exportMethods(droplevels.rsi)
|
||||
exportMethods(format.bugdrug)
|
||||
exportMethods(format.bug_drug_combinations)
|
||||
exportMethods(freq.mo)
|
||||
exportMethods(freq.rsi)
|
||||
exportMethods(kurtosis)
|
||||
@ -211,7 +211,7 @@ exportMethods(kurtosis.matrix)
|
||||
exportMethods(plot.mic)
|
||||
exportMethods(plot.rsi)
|
||||
exportMethods(print.ab)
|
||||
exportMethods(print.bugdrug)
|
||||
exportMethods(print.bug_drug_combinations)
|
||||
exportMethods(print.catalogue_of_life_version)
|
||||
exportMethods(print.disk)
|
||||
exportMethods(print.mic)
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 0.7.1.9064
|
||||
# AMR 0.7.1.9065
|
||||
|
||||
### 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`:
|
||||
|
@ -24,12 +24,14 @@
|
||||
#' 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_IR logical to indicate whether values R and I should be summed
|
||||
#' @param add_ab_group logical to indicate where the group of the antimicrobials must be included as a first column
|
||||
#' @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_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
#' @details The function \code{format} calculates 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
|
||||
#' @rdname bug_drug_combinations
|
||||
#' @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!
|
||||
#' @examples
|
||||
@ -65,14 +67,15 @@ bug_drug_combinations <- function(x, col_mo = NULL, minimum = 30) {
|
||||
filter(total >= minimum) %>%
|
||||
rename(ab = antibiotic)
|
||||
|
||||
structure(.Data = x, class = c("bugdrug", class(x)))
|
||||
structure(.Data = x, class = c("bug_drug_combinations", class(x)))
|
||||
}
|
||||
|
||||
#' @importFrom dplyr everything rename
|
||||
#' @importFrom tidyr spread
|
||||
#' @exportMethod format.bugdrug
|
||||
#' @exportMethod format.bug_drug_combinations
|
||||
#' @export
|
||||
format.bugdrug <- function(x, combine_IR = FALSE, add_ab_group = TRUE, ...) {
|
||||
#' @rdname bug_drug_combinations
|
||||
format.bug_drug_combinations <- function(x, combine_IR = FALSE, add_ab_group = TRUE) {
|
||||
if (combine_IR == FALSE) {
|
||||
x$isolates <- x$R
|
||||
} else {
|
||||
@ -100,10 +103,10 @@ format.bugdrug <- function(x, combine_IR = FALSE, add_ab_group = TRUE, ...) {
|
||||
y
|
||||
}
|
||||
|
||||
#' @exportMethod print.bugdrug
|
||||
#' @exportMethod print.bug_drug_combinations
|
||||
#' @export
|
||||
#' @importFrom crayon blue
|
||||
print.bugdrug <- function(x, ...) {
|
||||
print.bug_drug_combinations <- function(x, ...) {
|
||||
print(as.data.frame(x, stringsAsFactors = FALSE))
|
||||
message(blue("NOTE: Use 'format()' on this result to get a format that is ready for export or printing."))
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
#' @param x a \code{data.frame} containing isolates.
|
||||
#' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column of with a date class
|
||||
#' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)
|
||||
#' @param col_mo column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.
|
||||
#' @param col_mo column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.
|
||||
#' @param col_testcode column name of the test codes. Use \code{col_testcode = NULL} to \strong{not} exclude certain test codes (like test codes for screening). In that case \code{testcodes_exclude} will be ignored.
|
||||
#' @param col_specimen column name of the specimen type or group
|
||||
#' @param col_icu column name of the logicals (\code{TRUE}/\code{FALSE}) whether a ward or department is an Intensive Care Unit (ICU)
|
||||
|
@ -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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -225,9 +225,9 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="amr-0-7-1-9064" class="section level1">
|
||||
<div id="amr-0-7-1-9065" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-7-1-9064" class="anchor"></a>AMR 0.7.1.9064<small> Unreleased </small>
|
||||
<a href="#amr-0-7-1-9065" class="anchor"></a>AMR 0.7.1.9065<small> Unreleased </small>
|
||||
</h1>
|
||||
<div id="breaking" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@ -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-9064">0.7.1.9064</a></li>
|
||||
<li><a href="#amr-0-7-1-9065">0.7.1.9065</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.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>threshold</th>
|
||||
|
@ -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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -234,7 +234,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>bug_drug_combinations</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>)</pre>
|
||||
<pre class="usage"><span class='fu'>bug_drug_combinations</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>)
|
||||
|
||||
<span class='co'># S3 method for bug_drug_combinations</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>x</span>, <span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
|
||||
<span class='kw'>add_ab_group</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
@ -245,7 +249,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>minimum</th>
|
||||
@ -255,6 +259,10 @@
|
||||
<th>combine_IR</th>
|
||||
<td><p>logical to indicate whether values R and I should be summed</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>add_ab_group</th>
|
||||
<td><p>logical to indicate where the group of the antimicrobials must be included as a first column</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||
@ -263,7 +271,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_IR = FALSE</code> (default) to test R vs. S+I and <code>combine_IR = TRUE</code> to test R+I vs. S.</p>
|
||||
<p>The function <code>format</code> calculates 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>
|
||||
|
||||
|
@ -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.9055</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -246,7 +246,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>info</th>
|
||||
@ -438,7 +438,7 @@
|
||||
|
||||
<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.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/'>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>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
|
@ -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.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -265,7 +265,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_testcode</th>
|
||||
|
@ -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.9064</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -416,7 +416,7 @@
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="bug_drug_combinations.html">bug_drug_combinations()</a></code> </p>
|
||||
<p><code><a href="bug_drug_combinations.html">bug_drug_combinations()</a></code> <code><a href="bug_drug_combinations.html">format(<i><bug_drug_combinations></i>)</a></code> </p>
|
||||
</td>
|
||||
<td><p>Determine bug-drug combinations</p></td>
|
||||
</tr><tr>
|
||||
|
@ -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.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>universal_1, universal_2, universal_3, universal_4, universal_5, universal_6</th>
|
||||
|
@ -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.9065</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -258,7 +258,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
<td><p>column name of the unique IDs of the microorganisms (see <code><a href='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>info</th>
|
||||
|
@ -33,7 +33,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
|
||||
\item{guideline}{defaults to the latest included EUCAST guideline, run \code{unique(AMR::rsi_translation$guideline)} for all options}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, see Examples}
|
||||
}
|
||||
|
@ -2,27 +2,33 @@
|
||||
% Please edit documentation in R/bug_drug_combinations.R
|
||||
\name{bug_drug_combinations}
|
||||
\alias{bug_drug_combinations}
|
||||
\alias{format.bug_drug_combinations}
|
||||
\title{Determine bug-drug combinations}
|
||||
\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/}.
|
||||
}
|
||||
\usage{
|
||||
bug_drug_combinations(x, col_mo = NULL, minimum = 30)
|
||||
|
||||
\method{format}{bug_drug_combinations}(x, combine_IR = FALSE,
|
||||
add_ab_group = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{data with antibiotic columns, like e.g. \code{AMX} and \code{AMC}}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\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_IR}{logical to indicate whether values R and I should be summed}
|
||||
|
||||
\item{add_ab_group}{logical to indicate where the group of the antimicrobials must be included as a first column}
|
||||
}
|
||||
\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_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
The function \code{format} calculates 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!}{
|
||||
|
||||
|
@ -27,7 +27,7 @@ eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints",
|
||||
\arguments{
|
||||
\item{x}{data with antibiotic columns, like e.g. \code{AMX} and \code{AMC}}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\item{info}{print progress}
|
||||
|
||||
|
@ -30,7 +30,7 @@ filter_first_weighted_isolate(x, col_date = NULL,
|
||||
|
||||
\item{col_patient_id}{column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\item{col_testcode}{column name of the test codes. Use \code{col_testcode = NULL} to \strong{not} exclude certain test codes (like test codes for screening). In that case \code{testcodes_exclude} will be ignored.}
|
||||
|
||||
|
@ -28,7 +28,7 @@ key_antibiotics_equal(y, z, type = c("keyantibiotics", "points"),
|
||||
\arguments{
|
||||
\item{x}{table with antibiotics coloms, like \code{AMX} or \code{amox}}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\item{universal_1, universal_2, universal_3, universal_4, universal_5, universal_6}{column names of \strong{broad-spectrum} antibiotics, case-insensitive. At default, the columns containing these antibiotics will be guessed with \code{\link{guess_ab_col}}.}
|
||||
|
||||
|
@ -31,7 +31,7 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
|
||||
|
||||
\item{guideline}{a specific guideline to mention, see Details. EUCAST guidelines will be used when left empty, see Details.}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link{as.mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
\item{info}{print progress}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user