1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-27 06:46:12 +01:00
AMR/man/as.mic.Rd

63 lines
2.6 KiB
Plaintext
Raw Normal View History

2018-02-21 11:52:31 +01:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mic.R
2018-02-21 11:52:31 +01:00
\name{as.mic}
\alias{as.mic}
\alias{mic}
2018-02-21 11:52:31 +01:00
\alias{is.mic}
\title{Transform input to minimum inhibitory concentrations (MIC)}
2018-02-21 11:52:31 +01:00
\usage{
as.mic(x, na.rm = FALSE)
is.mic(x)
}
\arguments{
\item{x}{vector}
\item{na.rm}{a logical indicating whether missing values should be removed}
}
\value{
Ordered \link{factor} with additional class \code{\link{mic}}
2018-02-21 11:52:31 +01:00
}
\description{
This transforms a vector to a new class \code{\link{mic}}, which is an ordered \link{factor} with valid minimum inhibitory concentrations (MIC) as levels. Invalid MIC values will be translated as \code{NA} with a warning.
2018-02-21 11:52:31 +01:00
}
2019-05-10 16:44:59 +02:00
\details{
To interpret MIC values as RSI values, use \code{\link[=as.rsi]{as.rsi()}} on MIC values. It supports guidelines from EUCAST and CLSI.
2019-05-10 16:44:59 +02:00
}
\section{Stable lifecycle}{
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
2020-07-08 14:48:06 +02:00
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a parameter will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
}
2019-01-02 23:24:07 +01:00
\section{Read more on our website!}{
2020-10-08 11:16:03 +02:00
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 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}!
2019-01-02 23:24:07 +01:00
}
2018-02-22 20:48:48 +01:00
\examples{
mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16"))
is.mic(mic_data)
2018-03-14 09:58:58 +01:00
2018-06-19 10:05:38 +02:00
# this can also coerce combined MIC/RSI values:
as.mic("<=0.002; S") # will return <=0.002
2018-06-19 10:05:38 +02:00
2019-05-10 16:44:59 +02:00
# interpret MIC values
as.rsi(x = as.mic(2),
mo = as.mo("S. pneumoniae"),
ab = "AMX",
guideline = "EUCAST")
as.rsi(x = as.mic(4),
mo = as.mo("S. pneumoniae"),
ab = "AMX",
guideline = "EUCAST")
2018-02-22 20:48:48 +01:00
plot(mic_data)
2018-03-13 14:34:10 +01:00
barplot(mic_data)
2018-02-22 20:48:48 +01:00
}
\seealso{
\code{\link[=as.rsi]{as.rsi()}}
}