as.mic.Rd
This transforms a vector to a new class mic
, which is an ordered factor with valid MIC values as levels. Invalid MIC values will be translated as NA
with a warning.
as.mic(x, na.rm = FALSE) is.mic(x)
x | vector |
---|---|
na.rm | a logical indicating whether missing values should be removed |
Ordered factor with new class mic
Interpret MIC values as RSI values with as.rsi
. It supports guidelines from EUCAST and CLSI.
On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16")) is.mic(mic_data) # this can also coerce combined MIC/RSI values: as.mic("<=0.002; S") # will return <=0.002 # 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") plot(mic_data) barplot(mic_data) library(clean) freq(mic_data)