mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 21:22:01 +02:00
(v1.3.0.9004) data sets, as.disk() improvement
This commit is contained in:
@ -23,6 +23,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
guideline = "EUCAST",
|
||||
uti = FALSE,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
...
|
||||
)
|
||||
|
||||
@ -32,6 +33,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
ab = deparse(substitute(x)),
|
||||
guideline = "EUCAST",
|
||||
uti = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
...
|
||||
)
|
||||
|
||||
@ -41,6 +43,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
guideline = "EUCAST",
|
||||
uti = NULL,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
...
|
||||
)
|
||||
}
|
||||
@ -61,6 +64,8 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
|
||||
\item{conserve_capped_values}{a logical to indicate that MIC values starting with \code{">"} (but not \code{">="}) must always return "R" , and that MIC values starting with \code{"<"} (but not \code{"<="}) must always return "S"}
|
||||
|
||||
\item{add_intrinsic_resistance}{\emph{(only useful when using a EUCAST guideline)} a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in \emph{Klebsiella} species. Determination is based on the \link{intrinsic_resistant} data set, that itself is based on 'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes', version 3.1, 2016.}
|
||||
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
}
|
||||
\value{
|
||||
@ -160,6 +165,9 @@ as.rsi(df)
|
||||
|
||||
# the dplyr way
|
||||
library(dplyr)
|
||||
df \%>\% mutate_if(is.mic, as.rsi)
|
||||
df \%>\% mutate_if(function(x) is.mic(x) | is.disk(x), as.rsi)
|
||||
df \%>\% mutate(across(where(is.mic), as.rsi))
|
||||
df \%>\% mutate_at(vars(AMP:TOB), as.rsi)
|
||||
df \%>\% mutate(across(AMP:TOB), as.rsi)
|
||||
|
||||
|
@ -23,7 +23,7 @@ A \code{\link{data.frame}} with 18,650 observations and 10 variables:
|
||||
rsi_translation
|
||||
}
|
||||
\description{
|
||||
Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2020). Use \code{\link[=as.rsi]{as.rsi()}} to transform MICs or disks measurements to R/SI values.
|
||||
Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (2010-2019) and EUCAST (2011-2020). Use \code{\link[=as.rsi]{as.rsi()}} to transform MICs or disks measurements to R/SI values.
|
||||
}
|
||||
\details{
|
||||
The repository of this \code{AMR} package contains a file comprising this exact data set: \url{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}. This file \strong{allows for machine reading EUCAST and CLSI guidelines}, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically.
|
||||
|
Reference in New Issue
Block a user