mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 00:02:38 +02:00
(v1.7.1.9064) eucast 3.3 for mdro(), major change to repeated calling
This commit is contained in:
@ -62,7 +62,7 @@ set_ab_names(
|
||||
|
||||
\item{tolower}{a \link{logical} to indicate whether the first \link{character} of every output should be transformed to a lower case \link{character}. This will lead to e.g. "polymyxin B" and not "polymyxin b".}
|
||||
|
||||
\item{...}{in case of \code{\link[=set_ab_names]{set_ab_names()}} and \code{data} is a \link{data.frame}: variables to select (supports tidy selection like \code{AMX:VAN}), otherwise other arguments passed on to \code{\link[=as.ab]{as.ab()}}}
|
||||
\item{...}{in case of \code{\link[=set_ab_names]{set_ab_names()}} and \code{data} is a \link{data.frame}: variables to select (supports tidy selection such as \code{column1:column4}), otherwise other arguments passed on to \code{\link[=as.ab]{as.ab()}}}
|
||||
|
||||
\item{only_first}{a \link{logical} to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)}
|
||||
|
||||
|
@ -60,7 +60,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
\arguments{
|
||||
\item{x}{vector of values (for class \code{\link{mic}}: MIC values in mg/L, for class \code{\link{disk}}: a disk diffusion radius in millimetres)}
|
||||
|
||||
\item{...}{for using on a \link{data.frame}: names of columns to apply \code{\link[=as.rsi]{as.rsi()}} on (supports tidy selection like \code{AMX:VAN}). Otherwise: arguments passed on to methods.}
|
||||
\item{...}{for using on a \link{data.frame}: names of columns to apply \code{\link[=as.rsi]{as.rsi()}} on (supports tidy selection such as \code{column1:column4}). Otherwise: arguments passed on to methods.}
|
||||
|
||||
\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, see \emph{Examples}}
|
||||
|
||||
@ -74,7 +74,7 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
|
||||
\item{conserve_capped_values}{a \link{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 \link{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 \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020).}
|
||||
\item{add_intrinsic_resistance}{\emph{(only useful when using a EUCAST guideline)} a \link{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 \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021).}
|
||||
|
||||
\item{reference_data}{a \link{data.frame} to be used for interpretation, which defaults to the \link{rsi_translation} data set. Changing this argument allows for using own interpretation guidelines. This argument must contain a data set that is equal in structure to the \link{rsi_translation} data set (same column names and column types). Please note that the \code{guideline} argument will be ignored when \code{reference_data} is manually set.}
|
||||
|
||||
@ -105,7 +105,7 @@ your_data \%>\% mutate(across(where(is.mic), as.rsi)) # since dplyr 1.0.0
|
||||
your_data \%>\% mutate(across(where(is.disk), as.rsi)) # since dplyr 1.0.0
|
||||
}
|
||||
}
|
||||
\item For \strong{interpreting a complete data set}, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running \code{as.rsi(data)}.
|
||||
\item For \strong{interpreting a complete data set}, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running \code{as.rsi(your_data)}.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
\alias{intrinsic_resistant}
|
||||
\title{Data Set with Bacterial Intrinsic Resistance}
|
||||
\format{
|
||||
A \link{data.frame} with 93,892 observations and 2 variables:
|
||||
A \link{data.frame} with 134,956 observations and 2 variables:
|
||||
\itemize{
|
||||
\item \code{microorganism}\cr Name of the microorganism
|
||||
\item \code{antibiotic}\cr Name of the antibiotic drug
|
||||
\item \code{microorganism}\cr Official taxonomic name of the microorganism, according to the LPSN
|
||||
\item \code{antibiotic}\cr Official name of the antibiotic drug, according to the WHOCC
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
@ -20,7 +20,7 @@ Data set containing defined intrinsic resistance by EUCAST of all bug-drug combi
|
||||
\details{
|
||||
The repository of this \code{AMR} package contains a file comprising this exact data set: \url{https://github.com/msberends/AMR/blob/main/data-raw/intrinsic_resistant.txt}. This file \strong{allows for machine reading EUCAST guidelines about intrinsic resistance}, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.
|
||||
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020).
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021).
|
||||
}
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
@ -33,12 +33,16 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
|
||||
}
|
||||
|
||||
\examples{
|
||||
subset(intrinsic_resistant,
|
||||
antibiotic == "Vancomycin" & microorganism \%like\% "Enterococcus")$microorganism
|
||||
#> [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
|
||||
|
||||
\donttest{
|
||||
if (require("dplyr")) {
|
||||
intrinsic_resistant \%>\%
|
||||
filter(antibiotic == "Vancomycin", microorganism \%like\% "Enterococcus") \%>\%
|
||||
filter(antibiotic == "Vancomycin" & microorganism \%like\% "Enterococcus") \%>\%
|
||||
pull(microorganism)
|
||||
# [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
|
||||
#> [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ a \%like\% b[1]
|
||||
# get isolates whose name start with 'Ent' or 'ent'
|
||||
example_isolates[which(mo_name(example_isolates$mo) \%like\% "^ent"), ]
|
||||
\donttest{
|
||||
# faster way, only works in R 3.2 and later:
|
||||
# faster way, since mo_name() is context-aware:
|
||||
example_isolates[which(mo_name() \%like\% "^ent"), ]
|
||||
|
||||
if (require("dplyr")) {
|
||||
|
@ -94,7 +94,10 @@ Currently supported guidelines are (case-insensitive):
|
||||
\item \code{guideline = "CMI2012"} (default)
|
||||
|
||||
Magiorakos AP, Srinivasan A \emph{et al.} "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." Clinical Microbiology and Infection (2012) (\href{https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext}{link})
|
||||
\item \code{guideline = "EUCAST3.2"} (or simply \code{guideline = "EUCAST"})
|
||||
\item \code{guideline = "EUCAST3.3"} (or simply \code{guideline = "EUCAST"})
|
||||
|
||||
The European international guideline - EUCAST Expert Rules Version 3.3 "Intrinsic Resistance and Unusual Phenotypes" (\href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf}{link})
|
||||
\item \code{guideline = "EUCAST3.2"}
|
||||
|
||||
The European international guideline - EUCAST Expert Rules Version 3.2 "Intrinsic Resistance and Unusual Phenotypes" (\href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf}{link})
|
||||
\item \code{guideline = "EUCAST3.1"}
|
||||
|
@ -131,7 +131,7 @@ The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - will be determine
|
||||
|
||||
Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be based on the taxonomic kingdom and class. \emph{Budding yeasts} are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). \emph{True yeasts} are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will return \code{TRUE}. It returns \code{FALSE} otherwise (except when the input is \code{NA} or the MO code is \code{UNKNOWN}).
|
||||
|
||||
Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics).
|
||||
Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics).
|
||||
|
||||
All output \link[=translate]{will be translated} where possible.
|
||||
|
||||
|
Reference in New Issue
Block a user