#' @param na.rm a [logical] indicating whether missing values should be removed
#' @param ... arguments passed on to methods
#' @details To interpret MIC values as RSI values, use [as.rsi()] on MIC values. It supports guidelines from EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`).
#'
#' This class for MIC values is a quite a special data type: formally it is an ordered [factor] with valid MIC values as [factor] levels (to make sure only valid MIC values are retained), but for any mathematical operation it acts as decimal numbers:
<h3id="last-updated-may-1-8-1-9009"><small>Last updated: 16 May 2022</small><aclass="anchor"aria-label="anchor"href="#last-updated-may-1-8-1-9009"></a></h3>
<h3id="last-updated-may-1-8-1-9010"><small>Last updated: 16 May 2022</small><aclass="anchor"aria-label="anchor"href="#last-updated-may-1-8-1-9010"></a></h3>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<ul><li>Fix for <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</li>
<li>Removed <code><ahref="https://rdrr.io/r/base/integer.html"class="external-link">as.integer()</a></code> for MIC values, since MIC are not integer values and running <code><ahref="https://rdrr.io/r/base/table.html"class="external-link">table()</a></code> on MIC values consequently failed for not being able to retrieve the level position (as that’s how normally <code><ahref="https://rdrr.io/r/base/integer.html"class="external-link">as.integer()</a></code> on <code>factor</code>s work)</li>
<dd><p>a <ahref="https://rdrr.io/r/base/character.html"class="external-link">character</a> or <ahref="https://rdrr.io/r/base/numeric.html"class="external-link">numeric</a> vector</p></dd>
<dt>na.rm</dt>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> indicating whether missing values should be removed</p></dd>
<dt>exclude</dt>
<dd><p>factor levels which should be excluded from the result even if present, see <ahref="https://rdrr.io/r/base/droplevels.html"class="external-link">droplevels()</a></p></dd>
<dt>as.mic</dt>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether the <code><mic></code> class should be kept, defaults to <code>FALSE</code></p></dd>
exclude = if (any(is.na(levels(x)))) NULL else NA,
as.mic = FALSE,
...
)
\method{droplevels}{mic}(x, as.mic = FALSE, ...)
}
\arguments{
\item{x}{a \link{character} or \link{numeric} vector}
\item{na.rm}{a \link{logical} indicating whether missing values should be removed}
\item{exclude}{factor levels which should be excluded from the result even if present, see \link[base:droplevels]{droplevels()}}
\item{as.mic}{a \link{logical} to indicate whether the \verb{<mic>} class should be kept, defaults to \code{FALSE}}
\item{...}{arguments passed on to methods}
}
\value{
Ordered \link{factor} with additional class \code{\link{mic}}, that in mathematical operations acts as decimal numbers. Bare in mind that the outcome of any mathematical operation on MICs will return a \link{numeric} value.