1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:46:11 +01:00
AMR/man/isolate_identifier.Rd

51 lines
3.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/isolate_identifier.R
\name{isolate_identifier}
\alias{isolate_identifier}
\alias{all.equal.isolate_identifier}
\title{Create Identifier of an Isolate}
\usage{
isolate_identifier(x, col_mo = NULL, cols_ab = NULL)
\method{all.equal}{isolate_identifier}(target, current, ignore_empty_results = TRUE, ...)
}
\arguments{
\item{x}{data with antibiotic columns, such as \code{amox}, \code{AMX} and \code{AMC}}
\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()}}.}
\item{cols_ab}{a character vector of column names of \code{x}, or (a combination with) an \href{[ab_class()]}{antibiotic selector function}, such as \code{\link[=carbapenems]{carbapenems()}} and \code{\link[=aminoglycosides]{aminoglycosides()}}}
\item{target}{\R object.}
\item{current}{other \R object, to be compared with \code{target}.}
\item{ignore_empty_results}{a logical to indicate whether empty results must be ignored, so that only values R, S and I will be compared}
\item{...}{column name of an antibiotic, see section \emph{Antibiotics} below}
}
\description{
This function will paste the microorganism code with all antimicrobial results into one string for each row in a data set. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available.
}
\section{Experimental Lifecycle}{
\if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr}
The \link[=lifecycle]{lifecycle} of this function is \strong{experimental}. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this \code{AMR} package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.
}
\section{Read more on Our Website!}{
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
}
\examples{
# automatic selection of microorganism and antibiotics (i.e., all <rsi> columns, see ?as.rsi)
x <- isolate_identifier(example_isolates)
# ignore microorganism codes, only use antimicrobial results
x <- isolate_identifier(example_isolates, col_mo = FALSE, cols_ab = c("AMX", "TZP", "GEN", "TOB"))
# select antibiotics from certain antibiotic classes
x <- isolate_identifier(example_isolates, cols_ab = c(carbapenems(), aminoglycosides()))
}