diff --git a/DESCRIPTION b/DESCRIPTION index 53a4494b..a98bd5c5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.7.1.9063 +Version: 0.7.1.9064 Date: 2019-08-27 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index a310a5a4..46346e50 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9063 +# AMR 0.7.1.9064 ### Breaking * Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`: @@ -37,7 +37,7 @@ ``` You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R `format()` function: ```r - format(x, combine_SI = TRUE) + format(x, combine_IR = FALSE) ``` * Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the `portion` and `count` help pages), where the %SI is being determined: diff --git a/R/bug_drug_combinations.R b/R/bug_drug_combinations.R index f928df72..120ddcfb 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -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 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index b97e60ba..34e1b6df 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@
diff --git a/docs/articles/index.html b/docs/articles/index.html index 3698fe81..40c9b2f4 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ diff --git a/docs/authors.html b/docs/authors.html index c12f631e..c9f93bae 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ diff --git a/docs/index.html b/docs/index.html index 0d987f8b..545233f8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ diff --git a/docs/news/index.html b/docs/news/index.html index 3494fc55..615896bf 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ @@ -225,9 +225,9 @@ -"testvalue"
could never be
#> 4 AMC B_PSDMN_AER 0 0 30 30
#> 5 AMC B_STPHY_AUR 234 0 1 235You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R format()
function:
Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for portion_*
functions or count_*
functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter only_all_tested
(which defaults to FALSE
) replaces the old also_single_tested
and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the portion
and count
help pages), where the %SI is being determined:
as.mo(..., allow_uncertain = 3)
Contents
the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum
will return NA
with a warning. The default number of 30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
logical to indicate whether values R and I should be summed
The function format
calculated the resistance per bug-drug combination. Use combine_RI = FALSE
(default) to test R vs. S+I and combine_RI = TRUE
to test R+I vs. S.
The function format
calculated the resistance per bug-drug combination. Use combine_IR = FALSE
(default) to test R vs. S+I and combine_IR = TRUE
to test R+I vs. S.