mirror of
https://github.com/msberends/AMR.git
synced 2025-09-02 13:04:03 +02:00
(v2.1.1.9232) is.mic() iteration, documentation cleanup
This commit is contained in:
@@ -16,15 +16,15 @@ mean_amr_distance(x, ...)
|
||||
amr_distance_from_row(amr_distance, row)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{a vector of class \link[=as.sir]{sir}, \link[=as.mic]{mic} or \link[=as.disk]{disk}, or a \link{data.frame} containing columns of any of these classes}
|
||||
\item{x}{A vector of class \link[=as.sir]{sir}, \link[=as.mic]{mic} or \link[=as.disk]{disk}, or a \link{data.frame} containing columns of any of these classes}
|
||||
|
||||
\item{...}{variables to select (supports \link[tidyselect:language]{tidyselect language} such as \code{column1:column4} and \code{where(is.mic)}, and can thus also be \link[=amr_selector]{antimicrobial selectors}}
|
||||
\item{...}{Variables to select. Supports \link[tidyselect:language]{tidyselect language} (such as \code{column1:column4} and \code{where(is.mic)}), and can thus also be \link[=amr_selector]{antimicrobial selectors}}
|
||||
|
||||
\item{combine_SI}{a \link{logical} to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is \code{TRUE}}
|
||||
\item{combine_SI}{A \link{logical} to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is \code{TRUE}}
|
||||
|
||||
\item{amr_distance}{the outcome of \code{\link[=mean_amr_distance]{mean_amr_distance()}}}
|
||||
\item{amr_distance}{The outcome of \code{\link[=mean_amr_distance]{mean_amr_distance()}}}
|
||||
|
||||
\item{row}{an index, such as a row number}
|
||||
\item{row}{An index, such as a row number}
|
||||
}
|
||||
\description{
|
||||
Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand.
|
||||
@@ -69,7 +69,7 @@ y <- data.frame(
|
||||
)
|
||||
y
|
||||
mean_amr_distance(y)
|
||||
y$amr_distance <- mean_amr_distance(y, where(is.mic))
|
||||
y$amr_distance <- mean_amr_distance(y, is.mic(y))
|
||||
y[order(y$amr_distance), ]
|
||||
|
||||
if (require("dplyr")) {
|
||||
|
Reference in New Issue
Block a user