1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 05:21:50 +02:00

new EUCAST rules: clinical breakpoints

This commit is contained in:
2018-10-17 17:32:34 +02:00
parent d5a41de711
commit 693f64bdbf
20 changed files with 1165 additions and 171 deletions

View File

@ -22,7 +22,7 @@
#' @rdname as.rsi
#' @param x vector
#' @details The function \code{is.rsi.eligible} returns \code{TRUE} when a columns contains only valid antimicrobial interpretations (S and/or I and/or R), and \code{FALSE} otherwise.
#' @return Ordered factor with new class \code{rsi} and new attribute \code{package}
#' @return Ordered factor with new class \code{rsi}
#' @keywords rsi
#' @export
#' @importFrom dplyr %>%
@ -81,9 +81,8 @@ as.rsi <- function(x) {
list_missing, call. = FALSE)
}
x <- x %>% factor(levels = c("S", "I", "R"), ordered = TRUE)
x <- factor(x, levels = c("S", "I", "R"), ordered = TRUE)
class(x) <- c('rsi', 'ordered', 'factor')
attr(x, 'package') <- 'AMR'
x
}
}