mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 08:32:04 +02:00
(v0.7.1.9064) bug-drug fix
This commit is contained in:
@ -23,12 +23,12 @@
|
||||
#'
|
||||
#' Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{format} on the result to prettify it to a printable format, see Examples.
|
||||
#' @inheritParams eucast_rules
|
||||
#' @param combine_RI logical to indicate whether values R and I should be summed
|
||||
#' @param combine_IR logical to indicate whether values R and I should be summed
|
||||
#' @inheritParams rsi_df
|
||||
#' @importFrom dplyr rename
|
||||
#' @importFrom tidyr spread
|
||||
#' @importFrom clean freq
|
||||
#' @details The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_RI = FALSE} (default) to test R vs. S+I and \code{combine_RI = TRUE} to test R+I vs. S.
|
||||
#' @details The function \code{format} calculated the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
#' @export
|
||||
#' @source \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
@ -72,8 +72,8 @@ bug_drug_combinations <- function(x, col_mo = NULL, minimum = 30) {
|
||||
#' @importFrom tidyr spread
|
||||
#' @exportMethod format.bugdrug
|
||||
#' @export
|
||||
format.bugdrug <- function(x, combine_RI = FALSE, add_ab_group = TRUE, ...) {
|
||||
if (combine_RI == FALSE) {
|
||||
format.bugdrug <- function(x, combine_IR = FALSE, add_ab_group = TRUE, ...) {
|
||||
if (combine_IR == FALSE) {
|
||||
x$isolates <- x$R
|
||||
} else {
|
||||
x$isolates <- x$R + x$I
|
||||
|
Reference in New Issue
Block a user