From f3276592b7e28eda7087262870e28cdd16656ac7 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Tue, 27 Aug 2019 19:15:04 +0200 Subject: [PATCH] (v0.7.1.9064) bug-drug fix --- DESCRIPTION | 2 +- NEWS.md | 4 ++-- R/bug_drug_combinations.R | 8 ++++---- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 10 +++++----- docs/reference/bug_drug_combinations.html | 6 +++--- docs/reference/index.html | 2 +- man/bug_drug_combinations.Rd | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) 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 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064 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 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064 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 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064 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 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064 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 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064 @@ -225,9 +225,9 @@ -
+

-AMR 0.7.1.9063 Unreleased +AMR 0.7.1.9064 Unreleased

@@ -269,7 +269,7 @@ This is important, because a value like "testvalue" could never be #> 4 AMC B_PSDMN_AER 0 0 30 30 #> 5 AMC B_STPHY_AUR 234 0 1 235

You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R format() function:

-
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:

    @@ -1258,7 +1258,7 @@ Using as.mo(..., allow_uncertain = 3)

    Contents

  • @@ -252,7 +252,7 @@

    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.

    - combine_RI + combine_IR

    logical to indicate whether values R and I should be summed

    @@ -263,7 +263,7 @@

    Details

    -

    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.

    Read more on our website!

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 229fefdd..d5bd2180 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9064
    diff --git a/man/bug_drug_combinations.Rd b/man/bug_drug_combinations.Rd index c209b277..89537561 100644 --- a/man/bug_drug_combinations.Rd +++ b/man/bug_drug_combinations.Rd @@ -16,13 +16,13 @@ bug_drug_combinations(x, col_mo = NULL, minimum = 30) \item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.} -\item{combine_RI}{logical to indicate whether values R and I should be summed} +\item{combine_IR}{logical to indicate whether values R and I should be summed} } \description{ 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. } \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. +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. } \section{Read more on our website!}{