mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 07:51:57 +02:00
new EUCAST rules: clinical breakpoints
This commit is contained in:
3
R/data.R
3
R/data.R
@ -186,7 +186,7 @@
|
||||
#' Data set with 2000 blood culture isolates of septic patients
|
||||
#'
|
||||
#' An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This \code{data.frame} can be used to practice AMR analysis. For examples, press F1.
|
||||
#' @format A \code{\link{tibble}} with 2,000 observations and 49 variables:
|
||||
#' @format A \code{\link{data.frame}} with 2,000 observations and 49 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{date}}{date of receipt at the laboratory}
|
||||
#' \item{\code{hospital_id}}{ID of the hospital, from A to D}
|
||||
@ -199,7 +199,6 @@
|
||||
#' \item{\code{mo}}{ID of microorganism, see \code{\link{microorganisms}}}
|
||||
#' \item{\code{peni:rifa}}{40 different antibiotics with class \code{rsi} (see \code{\link{as.rsi}}); these column names occur in \code{\link{antibiotics}} data set and can be translated with \code{\link{abname}}}
|
||||
#' }
|
||||
# source MOLIS (LIS of Certe) - \url{https://www.certe.nl}
|
||||
#' @examples
|
||||
#' # ----------- #
|
||||
#' # PREPARATION #
|
||||
|
1104
R/eucast.R
1104
R/eucast.R
File diff suppressed because it is too large
Load Diff
7
R/mic.R
7
R/mic.R
@ -22,7 +22,7 @@
|
||||
#' @rdname as.mic
|
||||
#' @param x vector
|
||||
#' @param na.rm a logical indicating whether missing values should be removed
|
||||
#' @return Ordered factor with new class \code{mic} and new attribute \code{package}
|
||||
#' @return Ordered factor with new class \code{mic}
|
||||
#' @keywords mic
|
||||
#' @export
|
||||
#' @importFrom dplyr %>%
|
||||
@ -148,11 +148,8 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
list_missing, call. = FALSE)
|
||||
}
|
||||
|
||||
x <- factor(x = x,
|
||||
levels = lvls,
|
||||
ordered = TRUE)
|
||||
x <- factor(x, levels = lvls, ordered = TRUE)
|
||||
class(x) <- c('mic', 'ordered', 'factor')
|
||||
attr(x, 'package') <- 'AMR'
|
||||
x
|
||||
}
|
||||
}
|
||||
|
5
R/rsi.R
5
R/rsi.R
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user