diff --git a/DESCRIPTION b/DESCRIPTION index 6f1722f0..66fdea47 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.8.0.9037 -Date: 2019-11-28 +Version: 0.9.0 +Date: 2019-11-29 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 9b3b0669..40415ffa 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,4 @@ -# AMR 0.8.0.9037 -## Last updated: 28-Nov-2019 +# AMR 0.9.0 ### Breaking * Adopted Adeolu *et al.* (2016), [PMID 27620848](https://www.ncbi.nlm.nih.gov/pubmed/27620848) for the `microorganisms` data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like *Morganellaceae* and *Yersiniaceae*). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with `mdro()` will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family. diff --git a/R/count.R b/R/count.R index c2ac1b71..b0a58f42 100755 --- a/R/count.R +++ b/R/count.R @@ -26,7 +26,7 @@ #' [count_resistant()] should be used to count resistant isolates, [count_susceptible()] should be used to count susceptible isolates. #' @param ... one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with [as.rsi()] if needed. #' @inheritParams proportion -#' @inheritSection as.rsi Interpretation of S, I and R +#' @inheritSection as.rsi Interpretation of R and S/I #' @details These functions are meant to count isolates. Use the [resistance()]/[susceptibility()] functions to calculate microbial resistance/susceptibility. #' #' The function [count_resistant()] is equal to the function [count_R()]. The function [count_susceptible()] is equal to the function [count_SI()]. diff --git a/R/freq.R b/R/freq.R index b7c49fcc..db46a7ab 100755 --- a/R/freq.R +++ b/R/freq.R @@ -46,8 +46,8 @@ freq.mo <- function(x, ...) { decimal.mark = "."), " (", percentage(sum(grams == "Gram-positive", na.rm = TRUE) / length(grams), digits = digits), ")"), - `Nr of genera` = n_distinct(mo_genus(x_noNA, language = NULL)), - `Nr of species` = n_distinct(paste(mo_genus(x_noNA, language = NULL), + `No of genera` = n_distinct(mo_genus(x_noNA, language = NULL)), + `No of species` = n_distinct(paste(mo_genus(x_noNA, language = NULL), mo_species(x_noNA, language = NULL))))) } diff --git a/R/like.R b/R/like.R index 7ab7b623..a9c8d794 100755 --- a/R/like.R +++ b/R/like.R @@ -22,7 +22,9 @@ #' Pattern Matching #' #' Convenient wrapper around [base::grep()] to match a pattern: `a %like% b`. It always returns a [`logical`] vector and is always case-insensitive (use `a %like_case% b` for case-sensitive matching). Also, `pattern` (*b*) can be as long as `x` (*a*) to compare items of each index in both vectors, or can both have the same length to iterate over all cases. -#' @inheritParams base::grepl +#' @param x a character vector where matches are sought, or an object which can be coerced by [as.character()] to a character vector. +#' @param pattern a character string containing a regular expression (or [`character`] string for `fixed = TRUE`) to be matched in the given character vector. Coerced by [as.character()] to a character string if possible. If a [`character`] vector of length 2 or more is supplied, the first element is used with a warning. +#' @param ignore.case if `FALSE`, the pattern matching is *case sensitive* and if `TRUE`, case is ignored during matching. #' @return A [`logical`] vector #' @name like #' @rdname like @@ -83,10 +85,12 @@ like <- function(x, pattern, ignore.case = TRUE) { as.integer(x) %in% base::grep(pattern, levels(x), ignore.case = ignore.case) } else { tryCatch(base::grepl(pattern, x, ignore.case = ignore.case), - error = function(e) ifelse(test = grepl("Invalid regexp", e$message), + error = function(e) ifelse(grepl("Invalid regexp", e$message), # try with perl = TRUE: - yes = return(base::grepl(pattern, x, ignore.case = ignore.case, perl = TRUE)), - no = stop(e$message))) + return(base::grepl(pattern = pattern, x = x, + ignore.case = ignore.case, perl = TRUE)), + # stop otherwise + stop(e$message))) } } diff --git a/R/mdro.R b/R/mdro.R index b960986e..c4908872 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -48,7 +48,7 @@ #' Please suggest your own (country-specific) guidelines by letting us know: . #' #' **Note:** Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named order Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu *et al.* in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this [mdro()] function makes sure that results from before 2016 and after 2016 are identical. -#' @inheritSection as.rsi Interpretation of S, I and R +#' @inheritSection as.rsi Interpretation of R and S/I #' @return #' - CMI 2012 paper - function [mdr_cmi2012()] or [mdro()]:\cr #' Ordered [`factor`] with levels `Negative` < `Multi-drug-resistant (MDR)` < `Extensively drug-resistant (XDR)` < `Pandrug-resistant (PDR)` diff --git a/R/proportion.R b/R/proportion.R index 89554361..e3c451ef 100755 --- a/R/proportion.R +++ b/R/proportion.R @@ -33,7 +33,7 @@ #' @inheritParams ab_property #' @param combine_SI a logical to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the parameter `combine_IR`, but this now follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is `TRUE`. #' @param combine_IR a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see parameter `combine_SI`. -#' @inheritSection as.rsi Interpretation of S, I and R +#' @inheritSection as.rsi Interpretation of R and S/I #' @details #' The function [resistance()] is equal to the function [proportion_R()]. The function [susceptibility()] is equal to the function [proportion_SI()]. #' diff --git a/R/resistance_predict.R b/R/resistance_predict.R index 21fd8a4b..311b36bf 100755 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -35,7 +35,7 @@ #' @param main title of the plot #' @param ribbon a logical to indicate whether a ribbon should be shown (default) or error bars #' @param ... parameters passed on to functions -#' @inheritSection as.rsi Interpretation of S, I and R +#' @inheritSection as.rsi Interpretation of R and S/I #' @inheritParams first_isolate #' @inheritParams graphics::plot #' @details Valid options for the statistical model (parameter `model`) are: diff --git a/R/rsi.R b/R/rsi.R index 0a56789c..41889a13 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -21,7 +21,7 @@ #' Class 'rsi' #' -#' Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class [`rsi`], which is an ordered factor with levels `S < I < R`. Invalid antimicrobial interpretations will be translated as `NA` with a warning. +#' Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class [`rsi`], which is an ordered factor with levels `S < I < R`. Invalid antimicrobial interpretations will be translated as `NA` with a warning. #' @rdname as.rsi #' @param x vector of values (for class [`mic`]: an MIC value in mg/L, for class [`disk`]: a disk diffusion radius in millimeters) #' @param mo a microorganism code, generated with [as.mo()] @@ -35,14 +35,15 @@ #' After using [as.rsi()], you can use [eucast_rules()] to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism. #' #' The function [is.rsi.eligible()] returns `TRUE` when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and `FALSE` otherwise. The threshold of 5% can be set with the `threshold` parameter. -#' @section Interpretation of S, I and R: -#' In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +#' @section Interpretation of R and S/I: +#' In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". #' -#' - **S** - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -#' - **I** - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -#' - **R** - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. -#' -#' Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +#' - **R = Resistant**\cr +#' A microorganism is categorised as *Resistant* when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +#' - **S = Susceptible**\cr +#' A microorganism is categorised as *Susceptible, standard dosing regimen*, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +#' - **I = Increased exposure, but still susceptible**\cr +#' A microorganism is categorised as *Susceptible, Increased exposure* when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. #' #' This AMR package honours this new insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates. #' @return Ordered factor with new class [`rsi`] diff --git a/docs/404.html b/docs/404.html index 49190f5a..1cc1b722 100644 --- a/docs/404.html +++ b/docs/404.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 225ad7ed..e9139bef 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 897c734e..553d33c0 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9033 + 0.9.0 @@ -187,7 +187,7 @@

How to conduct AMR analysis

Matthijs S. Berends

-

23 November 2019

+

29 November 2019

@@ -196,7 +196,7 @@ -

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 23 November 2019.

+

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 29 November 2019.

Introduction

@@ -212,21 +212,21 @@ -2019-11-23 +2019-11-29 abcd Escherichia coli S S -2019-11-23 +2019-11-29 abcd Escherichia coli S R -2019-11-23 +2019-11-29 efgh Escherichia coli R @@ -321,43 +321,43 @@ -2016-08-29 -I4 -Hospital B -Streptococcus pneumoniae -S -S -S -S -M - - -2016-04-25 -U3 -Hospital A -Streptococcus pneumoniae -R -S -S -S -F - - -2013-06-29 -W2 -Hospital B +2015-06-06 +I1 +Hospital D Staphylococcus aureus +R S S +S +M + + +2016-06-07 +Z6 +Hospital D +Staphylococcus aureus +R +S R S F + +2013-01-19 +D3 +Hospital B +Streptococcus pneumoniae +S +S +R +S +M + -2011-12-21 -D5 -Hospital C -Escherichia coli +2013-10-19 +M2 +Hospital B +Klebsiella pneumoniae S S S @@ -365,26 +365,26 @@ M -2016-10-19 -G6 +2011-04-28 +F10 Hospital B -Escherichia coli +Streptococcus pneumoniae +R R -S S S M -2017-08-29 -Y5 -Hospital B -Escherichia coli +2014-02-17 +I9 +Hospital D +Klebsiella pneumoniae +S S S R -S -F +M @@ -406,8 +406,8 @@ # # Item Count Percent Cum. Count Cum. Percent # --- ----- ------- -------- ----------- ------------- -# 1 M 10,451 52.26% 10,451 52.26% -# 2 F 9,549 47.75% 20,000 100.00% +# 1 M 10,446 52.23% 10,446 52.23% +# 2 F 9,554 47.77% 20,000 100.00%

So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values M and F. From a researchers perspective: there are slightly more men. Nothing we didn’t already know.

The data is already quite clean, but we still need to transform some variables. The bacteria column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The mutate() function of the dplyr package makes this really easy:

data <- data %>%
@@ -422,8 +422,8 @@
 # Other rules by this AMR package
 # Non-EUCAST: inherit amoxicillin results for unavailable ampicillin (no changes)
 # Non-EUCAST: inherit ampicillin results for unavailable amoxicillin (no changes)
-# Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (2,952 values changed)
-# Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (155 values changed)
+# Non-EUCAST: set amoxicillin/clav acid = S where ampicillin = S (2,987 values changed)
+# Non-EUCAST: set ampicillin = R where amoxicillin/clav acid = R (122 values changed)
 # Non-EUCAST: set piperacillin = R where piperacillin/tazobactam = R (no changes)
 # Non-EUCAST: set piperacillin/tazobactam = S where piperacillin = S (no changes)
 # Non-EUCAST: set trimethoprim = R where trimethoprim/sulfa = R (no changes)
@@ -448,31 +448,31 @@
 # Pasteurella multocida (no changes)
 # Staphylococcus (no changes)
 # Streptococcus groups A, B, C, G (no changes)
-# Streptococcus pneumoniae (984 values changed)
+# Streptococcus pneumoniae (1,064 values changed)
 # Viridans group streptococci (no changes)
 # 
 # EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
-# Table 01: Intrinsic resistance in Enterobacteriaceae (1,309 values changed)
+# Table 01: Intrinsic resistance in Enterobacteriaceae (1,300 values changed)
 # Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)
 # Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)
-# Table 04: Intrinsic resistance in Gram-positive bacteria (2,719 values changed)
+# Table 04: Intrinsic resistance in Gram-positive bacteria (2,722 values changed)
 # Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)
 # Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)
 # Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)
 # Table 12: Interpretive rules for aminoglycosides (no changes)
 # Table 13: Interpretive rules for quinolones (no changes)
 # 
-# --------------------------------------------------------------------------
-# EUCAST rules affected 6,464 out of 20,000 rows, making a total of 8,119 edits
+# -------------------------------------------------------------------------------
+# EUCAST rules affected 6,539 out of 20,000 rows, making a total of 8,195 edits
 # => added 0 test results
 # 
-# => changed 8,119 test results
-#    - 109 test results changed from S to I
-#    - 4,710 test results changed from S to R
-#    - 1,166 test results changed from I to S
-#    - 348 test results changed from I to R
-#    - 1,786 test results changed from R to S
-# --------------------------------------------------------------------------
+# => changed 8,195 test results
+#    - 125 test results changed from S to I
+#    - 4,759 test results changed from S to R
+#    - 1,206 test results changed from I to S
+#    - 324 test results changed from I to R
+#    - 1,781 test results changed from R to S
+# -------------------------------------------------------------------------------
 # 
 # Use eucast_rules(..., verbose = TRUE) (on your original data) to get a data.frame with all specified edits instead.
@@ -499,8 +499,8 @@ # NOTE: Using column `bacteria` as input for `col_mo`. # NOTE: Using column `date` as input for `col_date`. # NOTE: Using column `patient_id` as input for `col_patient_id`. -# => Found 5,669 first isolates (28.3% of total) -

So only 28.3% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

+# => Found 5,689 first isolates (28.4% of total) +

So only 28.4% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

For future use, the above two syntaxes can be shortened with the filter_first_isolate() function:

@@ -510,7 +510,7 @@

First weighted isolates

-

We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient T6, sorted on date:

+

We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient N6, sorted on date:

@@ -526,19 +526,19 @@ - - + + - - - + + + - - + + @@ -548,21 +548,21 @@ - - + + - - + + - - + + - + @@ -570,10 +570,10 @@ - - + + - + @@ -581,52 +581,52 @@ - - + + - + - - + + + + - - - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + @@ -636,7 +636,7 @@
isolate
12010-02-28T62010-02-23N6 B_ESCHR_COLISSS RSSS TRUE
22010-03-01T62010-04-09N6 B_ESCHR_COLI S S
32010-05-20T62010-04-23N6 B_ESCHR_COLISS RRS S FALSE
42010-06-21T62010-05-12N6 B_ESCHR_COLISR S R R
52010-09-24T62010-06-27N6 B_ESCHR_COLIRI S S S
62010-11-18T62010-08-09N6 B_ESCHR_COLI R S SRS FALSE
72011-02-07T62010-09-01N6 B_ESCHR_COLIIS R SSS FALSE
82011-03-09T62010-10-18N6 B_ESCHR_COLI S SRSTRUE
92011-03-23T6B_ESCHR_COLIRS S S FALSE
92011-01-18N6B_ESCHR_COLIRIRSFALSE
102011-04-01T62011-02-15N6 B_ESCHR_COLI S S
-

Only 2 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The key_antibiotics() function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.

+

Only 1 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The key_antibiotics() function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.

If a column exists with a name like ‘key(…)ab’ the first_isolate() function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:

+# => Found 15,038 first weighted isolates (75.2% of total)
@@ -664,20 +664,20 @@ - - + + - - - + + + - - + + @@ -688,22 +688,22 @@ - - + + - - + + - - + + - + @@ -712,10 +712,10 @@ - - + + - + @@ -724,56 +724,56 @@ - - + + - + + - - - + + + + - - - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + @@ -784,11 +784,11 @@
isolate
12010-02-28T62010-02-23N6 B_ESCHR_COLISSS RSSS TRUE TRUE
22010-03-01T62010-04-09N6 B_ESCHR_COLI S S
32010-05-20T62010-04-23N6 B_ESCHR_COLISS RRS S FALSE TRUE
42010-06-21T62010-05-12N6 B_ESCHR_COLISR S R R
52010-09-24T62010-06-27N6 B_ESCHR_COLIRI S S S
62010-11-18T62010-08-09N6 B_ESCHR_COLI R S SRSFALSE FALSETRUE
72011-02-07T62010-09-01N6 B_ESCHR_COLIIS R SSS FALSE TRUE
82011-03-09T62010-10-18N6 B_ESCHR_COLI S SRSTRUETRUE
92011-03-23T6B_ESCHR_COLIRS S S FALSE TRUE
92011-01-18N6B_ESCHR_COLIRIRSFALSETRUE
102011-04-01T62011-02-15N6 B_ESCHR_COLI S S
-

Instead of 2, now 10 isolates are flagged. In total, 75.5% of all isolates are marked ‘first weighted’ - 47.1% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.

+

Instead of 1, now 9 isolates are flagged. In total, 75.2% of all isolates are marked ‘first weighted’ - 46.7% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.

As with filter_first_isolate(), there’s a shortcut for this new algorithm too:

-

So we end up with 15,096 isolates for analysis.

+

So we end up with 15,038 isolates for analysis.

We can remove unneeded columns:

@@ -813,44 +813,12 @@ -1 -2016-08-29 -I4 -Hospital B -B_STRPT_PNMN -S -S -S -R -M -Gram-positive -Streptococcus -pneumoniae -TRUE - - 2 -2016-04-25 -U3 -Hospital A -B_STRPT_PNMN -R -R -S -R -F -Gram-positive -Streptococcus -pneumoniae -TRUE - - -3 -2013-06-29 -W2 -Hospital B +2016-06-07 +Z6 +Hospital D B_STPHY_AURS -S +R S R S @@ -861,42 +829,10 @@ TRUE -5 -2016-10-19 -G6 +3 +2013-01-19 +D3 Hospital B -B_ESCHR_COLI -R -S -S -S -M -Gram-negative -Escherichia -coli -TRUE - - -6 -2017-08-29 -Y5 -Hospital B -B_ESCHR_COLI -S -S -R -S -F -Gram-negative -Escherichia -coli -TRUE - - -10 -2016-02-16 -L3 -Hospital D B_STRPT_PNMN S S @@ -908,6 +844,70 @@ pneumoniae TRUE + +5 +2011-04-28 +F10 +Hospital B +B_STRPT_PNMN +R +R +S +R +M +Gram-positive +Streptococcus +pneumoniae +TRUE + + +6 +2014-02-17 +I9 +Hospital D +B_KLBSL_PNMN +R +S +S +R +M +Gram-negative +Klebsiella +pneumoniae +TRUE + + +7 +2016-03-10 +C8 +Hospital D +B_STRPT_PNMN +R +R +S +R +M +Gram-positive +Streptococcus +pneumoniae +TRUE + + +8 +2014-02-08 +M8 +Hospital B +B_ESCHR_COLI +S +S +S +S +M +Gram-negative +Escherichia +coli +TRUE +

Time for the analysis!

@@ -927,7 +927,7 @@
data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 15,096 (of which NA: 0 = 0%)
+Length: 15,038 (of which NA: 0 = 0%)
Unique: 4

Shortest: 16
Longest: 24

@@ -944,33 +944,33 @@ Longest: 24

1 Escherichia coli -7,646 -50.65% -7,646 -50.65% +7,487 +49.79% +7,487 +49.79% 2 Staphylococcus aureus -3,610 -23.91% -11,256 -74.56% +3,697 +24.58% +11,184 +74.37% 3 Streptococcus pneumoniae -2,315 -15.34% -13,571 -89.90% +2,303 +15.31% +13,487 +89.69% 4 Klebsiella pneumoniae -1,525 -10.10% -15,096 +1,551 +10.31% +15,038 100.00% @@ -982,7 +982,7 @@ Longest: 24

The functions resistance() and susceptibility() can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions proportion_S(), proportion_SI(), proportion_I(), proportion_IR() and proportion_R() can be used to determine the proportion of a specific antimicrobial outcome.

As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R(), equal to resistance()) and susceptibility as the proportion of S and I (proportion_SI(), equal to susceptibility()). These functions can be used on their own:

+# [1] 0.4674824

Or can be used in conjuction with group_by() and summarise(), both from the dplyr package:

data_1st %>% 
   group_by(hospital) %>% 
@@ -995,19 +995,19 @@ Longest: 24

Hospital A -0.4740061 +0.4688268 Hospital B -0.4707669 +0.4681135 Hospital C -0.4640934 +0.4541020 Hospital D -0.4622766 +0.4743044 @@ -1025,23 +1025,23 @@ Longest: 24

Hospital A -0.4740061 -4578 +0.4688268 +4475 Hospital B -0.4707669 -5268 +0.4681135 +5253 Hospital C -0.4640934 -2228 +0.4541020 +2255 Hospital D -0.4622766 -3022 +0.4743044 +3055 @@ -1061,27 +1061,27 @@ Longest: 24

Escherichia -0.9193042 -0.8966780 -0.9935914 +0.9244023 +0.8946173 +0.9929211 Klebsiella -0.9285246 -0.8878689 -0.9940984 +0.9174726 +0.8891038 +0.9929078 Staphylococcus -0.9166205 -0.9171745 -0.9919668 +0.9193941 +0.9248039 +0.9940492 Streptococcus -0.6241901 +0.6070343 0.0000000 -0.6241901 +0.6070343 @@ -1129,7 +1129,7 @@ Longest: 24

geom_rsi(x = "genus") + # split plots on antibiotic facet_rsi(facet = "antibiotic") + - # make R red, I yellow and S green + # set colours to the R/SI interpretations scale_rsi_colours() + # show percentages on y axis scale_y_percent(breaks = 0:4 * 25) + diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png index 32ddf375..ad242a4d 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png index 146d8308..6d92d711 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png index 462c348c..6560b52b 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png index 1c8dcc0b..2c2c9b73 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html index cfdb6474..7dc377a0 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0
@@ -187,7 +187,7 @@

How to apply EUCAST rules

Matthijs S. Berends

-

18 November 2019

+

29 November 2019

diff --git a/docs/articles/MDR.html b/docs/articles/MDR.html index cf19b982..43a9fdb6 100644 --- a/docs/articles/MDR.html +++ b/docs/articles/MDR.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9033 + 0.9.0 @@ -187,7 +187,7 @@

How to determine multi-drug resistance (MDR)

Matthijs S. Berends

-

23 November 2019

+

29 November 2019

@@ -243,9 +243,8 @@ The German national guideline - Mueller et al. (2015) Antimicrobial Resistance a # Table 3 - Enterobacteriaceae ... OK # Table 4 - Pseudomonas aeruginosa ... OK # Table 5 - Acinetobacter spp. ... OK -# Warning in mdro(.): NA introduced for isolates where the available -# percentage of antimicrobial classes was below 50% (set with -# `pct_required_classes`)
+# Warning in mdro(.): NA introduced for isolates where the available percentage of +# antimicrobial classes was below 50% (set with `pct_required_classes`)

Frequency table

Class: factor > ordered (numeric)
Length: 2,000 (of which NA: 289 = 14.45%)
@@ -307,19 +306,19 @@ Unique: 2

The data set now looks like this:

+# 5 R +# 6 S

We can now add the interpretation of MDR-TB to our data set. You can use:

mdro(my_TB_data, guideline = "TB")

or its shortcut mdr_tb():

@@ -336,7 +335,7 @@ Unique: 2

# Author: WHO (World Health Organization) # Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/ # -# => Found 4367 MDROs out of 5000 tested isolates (87.3%) +# => Found 4377 MDROs out of 5000 tested isolates (87.5%)

Create a frequency table of the results:

freq(my_TB_data$mdr)

Frequency table

@@ -357,40 +356,40 @@ Unique: 5

1 Mono-resistant -3272 -65.44% -3272 -65.44% +3240 +64.80% +3240 +64.80% 2 -Negative -633 -12.66% -3905 -78.10% +Multi-drug-resistant +647 +12.94% +3887 +77.74% 3 -Multi-drug-resistant -584 -11.68% -4489 -89.78% +Negative +623 +12.46% +4510 +90.20% 4 Poly-resistant -293 -5.86% -4782 -95.64% +304 +6.08% +4814 +96.28% 5 Extensively drug-resistant -218 -4.36% +186 +3.72% 5000 100.00% diff --git a/docs/articles/SPSS.html b/docs/articles/SPSS.html index da2b9b85..74b27fb3 100644 --- a/docs/articles/SPSS.html +++ b/docs/articles/SPSS.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0 @@ -187,7 +187,7 @@

How to import data from SPSS / SAS / Stata

Matthijs S. Berends

-

18 November 2019

+

29 November 2019

diff --git a/docs/articles/WHONET.html b/docs/articles/WHONET.html index f26bcf94..7d3ad01e 100644 --- a/docs/articles/WHONET.html +++ b/docs/articles/WHONET.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0 @@ -187,7 +187,7 @@

How to work with WHONET data

Matthijs S. Berends

-

18 November 2019

+

29 November 2019

@@ -226,16 +226,14 @@

No errors or warnings, so all values are transformed succesfully.

We also created a package dedicated to data cleaning and checking, called the cleaner package. It gets automatically installed with the AMR package. For its freq() function to create frequency tables, you don’t even need to load it yourself as it is available through the AMR package as well.

So let’s check our data, with a couple of frequency tables:

- +

Frequency table

-

Class: mo (character)
+

Class: character
Length: 500 (of which NA: 0 = 0%)
Unique: 39

-

Gram-negative: 280 (56.00%)
-Gram-positive: 220 (44.00%)
-Nr of genera: 17
-Nr of species: 39

+

Shortest: 11
+Longest: 40

@@ -248,7 +246,7 @@ Nr of species: 39

- + @@ -256,7 +254,7 @@ Nr of species: 39

- + @@ -264,7 +262,7 @@ Nr of species: 39

- + @@ -272,7 +270,7 @@ Nr of species: 39

- + @@ -280,7 +278,7 @@ Nr of species: 39

- + @@ -288,7 +286,7 @@ Nr of species: 39

- + @@ -296,7 +294,7 @@ Nr of species: 39

- + @@ -304,7 +302,7 @@ Nr of species: 39

- + @@ -312,7 +310,7 @@ Nr of species: 39

- + @@ -320,7 +318,7 @@ Nr of species: 39

- + @@ -329,10 +327,9 @@ Nr of species: 39

1B_ESCHR_COLIEscherichia coli 245 49.0% 245
2B_STPHY_CONSCoagulase-negative Staphylococcus (CoNS) 74 14.8% 319
3B_STPHY_EPDRStaphylococcus epidermidis 38 7.6% 357
4B_STRPT_PNMNStreptococcus pneumoniae 31 6.2% 388
5B_STPHY_HMNSStaphylococcus hominis 21 4.2% 409
6B_PROTS_MRBLProteus mirabilis 9 1.8% 418
7B_ENTRC_FACMEnterococcus faecium 8 1.6% 426
8B_STPHY_CPTSStaphylococcus capitis 8 1.6% 434
9B_ENTRB_CLOCEnterobacter cloacae 5 1.0% 439
10B_ENTRC_CLMBEnterococcus columbae 4 0.8% 443

(omitted 29 entries, n = 57 [11.40%])

- +

Frequency table

Class: factor > ordered > rsi (numeric)
Length: 500 (of which NA: 19 = 3.8%)
@@ -379,9 +376,12 @@ Unique: 3

A first glimpse at results

-

An easy ggplot will already give a lot of information, using the included ggplot_rsi() function:

-
ggplot_rsi(data, translate_ab = 'ab')
-

+

An easy ggplot will already give a lot of information, using the included ggplot_rsi() function:

+
data %>%
+  group_by(Country) %>%
+  select(Country, AMP_ND2, AMC_ED20, CAZ_ED10, CIP_ED5) %>%
+  ggplot_rsi(translate_ab = 'ab', facet = "Country", datalabels = FALSE)
+

diff --git a/docs/articles/WHONET_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/WHONET_files/figure-html/unnamed-chunk-7-1.png new file mode 100644 index 00000000..b8cb65ef Binary files /dev/null and b/docs/articles/WHONET_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index d4cd63f6..7172e978 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0 @@ -187,7 +187,7 @@

Benchmarks

Matthijs S. Berends

-

18 November 2019

+

29 November 2019

@@ -222,20 +222,20 @@ print(S.aureus, unit = "ms", signif = 2) # Unit: milliseconds # expr min lq mean median uq max neval -# as.mo("sau") 10 10 16 11 13 58 10 -# as.mo("stau") 33 34 50 45 67 80 10 -# as.mo("STAU") 34 38 44 39 43 72 10 -# as.mo("staaur") 10 11 16 12 15 44 10 -# as.mo("STAAUR") 11 11 17 12 14 59 10 -# as.mo("S. aureus") 26 30 37 33 48 54 10 -# as.mo("S aureus") 26 27 31 28 32 48 10 -# as.mo("Staphylococcus aureus") 31 35 37 37 40 44 10 -# as.mo("Staphylococcus aureus (MRSA)") 650 690 750 710 840 900 10 -# as.mo("Sthafilokkockus aaureuz") 380 410 430 430 440 500 10 -# as.mo("MRSA") 10 11 20 11 37 44 10 -# as.mo("VISA") 20 22 51 29 47 220 10 -# as.mo("VRSA") 21 23 32 25 41 57 10 -# as.mo(22242419) 20 21 23 22 23 27 10 +# as.mo("sau") 11 11 15 12 14 39 10 +# as.mo("stau") 36 38 49 48 60 65 10 +# as.mo("STAU") 36 38 46 40 59 71 10 +# as.mo("staaur") 11 11 21 11 37 37 10 +# as.mo("STAAUR") 11 11 12 12 12 17 10 +# as.mo("S. aureus") 26 29 36 32 48 53 10 +# as.mo("S aureus") 25 27 37 29 52 64 10 +# as.mo("Staphylococcus aureus") 33 34 39 36 45 53 10 +# as.mo("Staphylococcus aureus (MRSA)") 660 720 740 740 760 800 10 +# as.mo("Sthafilokkockus aaureuz") 350 360 410 380 400 660 10 +# as.mo("MRSA") 11 11 14 12 12 36 10 +# as.mo("VISA") 21 23 27 26 28 47 10 +# as.mo("VRSA") 21 22 30 23 44 52 10 +# as.mo(22242419) 20 20 24 21 21 52 10

In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.

To achieve this speed, the as.mo function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of Methanosarcina semesiae (B_MTHNSR_SEMS), a bug probably never found before in humans:

@@ -247,19 +247,19 @@ times = 10) print(M.semesiae, unit = "ms", signif = 4) # Unit: milliseconds -# expr min lq mean median uq -# as.mo("metsem") 1415.00 1467.00 1505.00 1493.00 1537.00 -# as.mo("METSEM") 1447.00 1488.00 1530.00 1521.00 1555.00 -# as.mo("M. semesiae") 2216.00 2239.00 2293.00 2284.00 2351.00 -# as.mo("M. semesiae") 2143.00 2212.00 2304.00 2307.00 2332.00 -# as.mo("Methanosarcina semesiae") 32.44 35.59 43.59 38.19 45.88 -# max neval -# 1627.00 10 -# 1628.00 10 -# 2395.00 10 -# 2535.00 10 -# 69.48 10 -

That takes 13.8 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like Methanosarcina semesiae) are almost fast - these are the most probable input from most data sets.

+# expr min lq mean median uq max +# as.mo("metsem") 1501.0 1506.00 1665.0 1569.00 1788.00 2141.00 +# as.mo("METSEM") 1586.0 1610.00 1727.0 1675.00 1793.00 2002.00 +# as.mo("M. semesiae") 2266.0 2335.00 2587.0 2418.00 2524.00 3676.00 +# as.mo("M. semesiae") 2143.0 2252.00 2334.0 2331.00 2396.00 2540.00 +# as.mo("Methanosarcina semesiae") 34.8 35.74 46.3 39.64 62.28 65.83 +# neval +# 10 +# 10 +# 10 +# 10 +# 10 +

That takes 15.6 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like Methanosarcina semesiae) are almost fast - these are the most probable input from most data sets.

In the figure below, we compare Escherichia coli (which is very common) with Prevotella brevis (which is moderately common) and with Methanosarcina semesiae (which is uncommon):

In reality, the as.mo() functions learns from its own output to speed up determinations for next times. In above figure, this effect was disabled to show the difference with the boxplot below - when you would use as.mo() yourself:

@@ -296,8 +296,8 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# mo_name(x) 642 674 702 687 713 843 10 -

So transforming 500,000 values (!!) of 50 unique values only takes 0.69 seconds (686 ms). You only lose time on your unique input values.

+# mo_name(x) 655 668 715 717 751 797 10 +

So transforming 500,000 values (!!) of 50 unique values only takes 0.72 seconds (717 ms). You only lose time on your unique input values.

+# expr min lq mean median uq max neval +# A 6.70 6.710 9.690 7.18 7.850 31.90 10 +# B 26.20 27.100 32.400 28.80 32.100 58.80 10 +# C 0.78 0.837 0.924 0.88 0.965 1.24 10

So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0009 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

+# A 0.444 0.449 0.473 0.460 0.466 0.630 10 +# B 0.483 0.496 0.511 0.505 0.535 0.539 10 +# C 0.709 0.839 0.850 0.846 0.886 0.921 10 +# D 0.463 0.483 0.521 0.499 0.548 0.694 10 +# E 0.433 0.451 0.493 0.484 0.513 0.611 10 +# F 0.434 0.450 0.481 0.458 0.484 0.582 10 +# G 0.434 0.443 0.471 0.455 0.489 0.577 10 +# H 0.434 0.436 0.471 0.451 0.480 0.614 10

Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.

+# en 22.05 22.65 29.93 25.35 27.03 53.36 10 +# de 22.86 23.16 30.45 27.22 28.33 62.68 10 +# nl 28.99 29.69 34.37 30.32 31.78 65.15 10 +# es 22.45 23.17 30.84 23.73 28.02 64.67 10 +# it 22.76 24.59 30.36 26.23 29.97 66.70 10 +# fr 23.00 24.20 30.70 27.00 29.22 51.23 10 +# pt 23.31 24.41 26.92 27.31 28.39 31.00 10

Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.

diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-11-1.png index a0ab03d1..5702abb8 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png index 8189a9e9..e0d2422f 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-9-1.png index 07b95fbd..6ee94219 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 1d94262f..7b5c5307 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index 95212fe6..bf4224fb 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -41,7 +41,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0 @@ -187,7 +187,7 @@

How to predict antimicrobial resistance

Matthijs S. Berends

-

18 November 2019

+

29 November 2019

diff --git a/docs/authors.html b/docs/authors.html index 7315946e..cb641dac 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/extra.css b/docs/extra.css index ae63a9a9..9aa02497 100644 --- a/docs/extra.css +++ b/docs/extra.css @@ -200,11 +200,17 @@ table a:not(.btn):hover, .table a:not(.btn):hover { /* text below header in manual overview */ .template-reference-index h2 ~ p { - font-size: 16px; + font-size: 15px; } .template-reference-topic h2 { font-size: 24px; } +.template-reference-topic h3 { + font-size: 18px; +} +.template-reference-topic h4 { + font-size: 15px; +} /* logos on index page */ .logo_img { diff --git a/docs/index.html b/docs/index.html index 3cee3e91..6f8fc070 100644 --- a/docs/index.html +++ b/docs/index.html @@ -45,7 +45,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/news/index.html b/docs/news/index.html index 621c021b..819ec46b 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 @@ -231,14 +231,10 @@ -
+

-AMR 0.8.0.9037 Unreleased +AMR 0.9.0 Unreleased

-
-

-Last updated: 28-Nov-2019 -

Breaking

@@ -333,7 +329,6 @@
  • Added Dr. Sofia Ny as contributor
  • -

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

    Contents

    diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index 7c954b6c..f65c6ac1 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0
    diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index ca04d429..317160f1 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index 37be3172..71857470 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index 5683b164..4355ac34 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/age.html b/docs/reference/age.html index caa74f6d..1430a25a 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 54a07cab..8668ae7c 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index 08531756..616fa705 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 6eb992d9..24dbcb55 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index 125956fd..25c4e9df 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index be281cc5..f820920e 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 90e8042a..d52bbd38 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index d12ad1f1..aa96b141 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -51,7 +51,7 @@ - + @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 @@ -234,7 +234,7 @@
    -

    Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class rsi, which is an ordered factor with levels S < I < R. Invalid antimicrobial interpretations will be translated as NA with a warning.

    +

    Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class rsi, which is an ordered factor with levels S < I < R. Invalid antimicrobial interpretations will be translated as NA with a warning.

    as.rsi(x, ...)
    @@ -293,17 +293,19 @@
         

    Run unique(AMR::rsi_translation$guideline) for a list of all supported guidelines.

    After using as.rsi(), you can use eucast_rules() to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.

    The function is.rsi.eligible() returns TRUE when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and FALSE otherwise. The threshold of 5% can be set with the threshold parameter.

    -

    Interpretation of S, I and R

    +

    Interpretation of R and S/I

    -

    In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

      -
    • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

    • -
    • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

    • -
    • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

    • +

      In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

        +
      • R = Resistant
        +A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      • +
      • S = Susceptible
        +A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

      • +
      • I = Increased exposure, but still susceptible
        +A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

      -

      Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      This AMR package honours this new insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

      Read more on our website!

      @@ -357,7 +359,7 @@
    • Arguments
    • Value
    • Details
    • -
    • Interpretation of S, I and R
    • +
    • Interpretation of R and S/I
    • Read more on our website!
    • See also
    • Examples
    • diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index c6c63352..ea8d32bb 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -86,7 +86,7 @@ This function requires an internet connection." /> AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/availability.html b/docs/reference/availability.html index fc0c2082..4ef6ef04 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index cb62482f..a59b53de 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 2d1a97ca..e0aaebcf 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 82c8f543..5c7debe5 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/count.html b/docs/reference/count.html index 22307f5a..f6917b09 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -86,7 +86,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -278,7 +278,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( data -

      a data.frame containing columns with class rsi (see as.rsi())

      +

      a data.frame containing columns with class rsi (see as.rsi())

      translate_ab @@ -306,18 +306,20 @@ count_resistant() should be used to count resistant isolates, count_susceptible(

      These functions are meant to count isolates. Use the resistance()/susceptibility() functions to calculate microbial resistance/susceptibility.

      The function count_resistant() is equal to the function count_R(). The function count_susceptible() is equal to the function count_SI().

      The function n_rsi() is an alias of count_all(). They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to n_distinct(). Their function is equal to count_susceptible(...) + count_resistant(...).

      -

      The function count_df() takes any variable from data that has an rsi class (created with as.rsi()) and counts the number of S's, I's and R's. The function rsi_df() works exactly like count_df(), but adds the percentage of S, I and R.

      -

      Interpretation of S, I and R

      +

      The function count_df() takes any variable from data that has an rsi class (created with as.rsi()) and counts the number of S's, I's and R's. The function rsi_df() works exactly like count_df(), but adds the percentage of S, I and R.

      +

      Interpretation of R and S/I

      -

      In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

        -
      • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

      • -
      • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

      • -
      • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

      • +

        In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

          +
        • R = Resistant
          +A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

        • +
        • S = Susceptible
          +A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

        • +
        • I = Increased exposure, but still susceptible
          +A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

        -

        Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

        This AMR package honours this new insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

        Combination therapy

        @@ -423,7 +425,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
      • Arguments
      • Value
      • Details
      • -
      • Interpretation of S, I and R
      • +
      • Interpretation of R and S/I
      • Combination therapy
      • Read more on our website!
      • See also
      • diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index f4a2dbff..856e6bd4 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -86,7 +86,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index 5db02055..d46311a3 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -252,7 +252,7 @@
      • gender
        gender of the patient

      • patient_id
        ID of the patient

      • mo
        ID of microorganism created with as.mo(), see also microorganisms

      • -
      • PEN:RIF
        40 different antibiotics with class rsi (see as.rsi()); these column names occur in antibiotics data set and can be translated with ab_name()

      • +
      • PEN:RIF
        40 different antibiotics with class rsi (see as.rsi()); these column names occur in antibiotics data set and can be translated with ab_name()

      Read more on our website!

      diff --git a/docs/reference/extended-functions.html b/docs/reference/extended-functions.html index ec19c987..b205d4ac 100644 --- a/docs/reference/extended-functions.html +++ b/docs/reference/extended-functions.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9032 + 0.9.0 diff --git a/docs/reference/filter_ab_class.html b/docs/reference/filter_ab_class.html index 2fbb21bd..c2a10af2 100644 --- a/docs/reference/filter_ab_class.html +++ b/docs/reference/filter_ab_class.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index e0f4a60f..847c85e6 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 662a0ebb..061a4e3a 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 60b7ff6c..020c193b 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -300,7 +300,7 @@ data -

      a data.frame with column(s) of class rsi (see as.rsi())

      +

      a data.frame with column(s) of class rsi (see as.rsi())

      position @@ -393,7 +393,7 @@

      At default, the names of antibiotics will be shown on the plots using ab_name(). This can be set with the translate_ab parameter. See count_df().

      The functions

      -

      geom_rsi() will take any variable from the data that has an rsi class (created with as.rsi()) using rsi_df() and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.

      +

      geom_rsi() will take any variable from the data that has an rsi class (created with as.rsi()) using rsi_df() and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.

      facet_rsi() creates 2d plots (at default based on S/I/R) using ggplot2::facet_wrap().

      scale_y_percent() transforms the y axis to a 0 to 100% range using ggplot2::scale_continuous().

      scale_rsi_colours() sets colours to the bars: pastel blue for S, pastel turquoise for I and pastel red for R, using ggplot2::scale_brewer().

      diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 4a279f99..9e08dbb5 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/index.html b/docs/reference/index.html index e1f0eda9..d98a074d 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/join.html b/docs/reference/join.html index 83c9c22f..f3efbfaf 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index ca78ccff..89153089 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index fbfe601e..64a68478 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/like.html b/docs/reference/like.html index 930dd498..a4f22262 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -248,24 +248,15 @@ x -

      a character vector where matches are sought, or an - object which can be coerced by as.character to a character - vector. Long vectors are supported.

      +

      a character vector where matches are sought, or an object which can be coerced by as.character() to a character vector.

      pattern -

      character string containing a regular expression - (or character string for fixed = TRUE) to be matched - in the given character vector. Coerced by - as.character to a character string if possible. If a - character vector of length 2 or more is supplied, the first element - is used with a warning. Missing values are allowed except for - regexpr and gregexpr.

      +

      a character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector. Coerced by as.character() to a character string if possible. If a character vector of length 2 or more is supplied, the first element is used with a warning.

      ignore.case -

      if FALSE, the pattern matching is case - sensitive and if TRUE, case is ignored during matching.

      +

      if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching.

      diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index dbb427b3..7388d1db 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 @@ -415,17 +415,19 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI TMP: trimethoprim (J01EA01), SXT: trimethoprim/sulfamethoxazole (J01EE01), VAN: vancomycin (J01XA01).

      -

      Interpretation of S, I and R

      +

      Interpretation of R and S/I

      -

      In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

        -
      • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

      • -
      • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

      • -
      • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

      • +

        In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

          +
        • R = Resistant
          +A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

        • +
        • S = Susceptible
          +A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

        • +
        • I = Increased exposure, but still susceptible
          +A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

        -

        Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

        This AMR package honours this new insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

        Read more on our website!

        @@ -455,7 +457,7 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI
      • Value
      • Details
      • Antibiotics
      • -
      • Interpretation of S, I and R
      • +
      • Interpretation of R and S/I
      • Read more on our website!
      • Examples
      diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 43f20731..5fd3ef69 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index cf38ddd2..46715dda 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9037 + 0.9.0 diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 5d9e79b9..5f8d5b2b 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index d6cd466f..82f39d28 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 7e9f0944..6b7cc4c9 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -86,7 +86,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/p_symbol.html b/docs/reference/p_symbol.html index fbbd17ad..69713532 100644 --- a/docs/reference/p_symbol.html +++ b/docs/reference/p_symbol.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index e16e1f16..680f08f4 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -86,7 +86,7 @@ resistance() should be used to calculate resistance, susceptibility() should be AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -294,7 +294,7 @@ resistance() should be used to calculate resistance, susceptibility() should be data -

      a data.frame containing columns with class rsi (see as.rsi())

      +

      a data.frame containing columns with class rsi (see as.rsi())

      translate_ab @@ -325,7 +325,7 @@ resistance() should be used to calculate resistance, susceptibility() should be

      The function resistance() is equal to the function proportion_R(). The function susceptibility() is equal to the function proportion_SI().

      Remember that you should filter your table to let it contain only first isolates! This is needed to exclude duplicates and to reduce selection bias. Use first_isolate() to determine them in your data set.

      These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the AMR::count() functions to count isolates. The function susceptibility() is essentially equal to count_susceptible() / count_all(). Low counts can infuence the outcome - the proportion functions may camouflage this, since they only return the proportion (albeit being dependent on the minimum parameter).

      -

      The function proportion_df() takes any variable from data that has an rsi class (created with as.rsi()) and calculates the proportions R, I and S. The function rsi_df() works exactly like proportion_df(), but adds the number of isolates.

      +

      The function proportion_df() takes any variable from data that has an rsi class (created with as.rsi()) and calculates the proportions R, I and S. The function rsi_df() works exactly like proportion_df(), but adds the number of isolates.

      Combination therapy

      @@ -357,17 +357,19 @@ resistance() should be used to calculate resistance, susceptibility() should be

    Using only_all_tested has no impact when only using one antibiotic as input.

    -

    Interpretation of S, I and R

    +

    Interpretation of R and S/I

    -

    In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

      -
    • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

    • -
    • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

    • -
    • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

    • +

      In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

        +
      • R = Resistant
        +A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      • +
      • S = Susceptible
        +A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

      • +
      • I = Increased exposure, but still susceptible
        +A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

      -

      Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      This AMR package honours this new insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

      Read more on our website!

      @@ -468,7 +470,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
    • Value
    • Details
    • Combination therapy
    • -
    • Interpretation of S, I and R
    • +
    • Interpretation of R and S/I
    • Read more on our website!
    • See also
    • Examples
    • diff --git a/docs/reference/read.4D.html b/docs/reference/read.4D.html index 60c43fa1..8b562917 100644 --- a/docs/reference/read.4D.html +++ b/docs/reference/read.4D.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index f3a5db5e..d8a57d81 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -90,7 +90,7 @@ below to see their documentation. AMR (for R) - 0.8.0.9032 + 0.9.0 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 161340a5..c8bc4bb1 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 @@ -359,17 +359,19 @@
    • "lin" or "linear": a linear regression model

    -

    Interpretation of S, I and R

    +

    Interpretation of R and S/I

    -

    In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

      -
    • S - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

    • -
    • I - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

    • -
    • R - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.

    • +

      In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (http://www.eucast.org/newsiandr/). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".

        +
      • R = Resistant
        +A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      • +
      • S = Susceptible
        +A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.

      • +
      • I = Increased exposure, but still susceptible
        +A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.

      -

      Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.

      This AMR package honours this new insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

      Read more on our website!

      @@ -437,7 +439,7 @@
    • Arguments
    • Value
    • Details
    • -
    • Interpretation of S, I and R
    • +
    • Interpretation of R and S/I
    • Read more on our website!
    • See also
    • Examples
    • diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index 4d5776f8..acec260d 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index fec2d660..830449c8 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -86,7 +86,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 1bed50af..e8341521 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -85,7 +85,7 @@ AMR (for R) - 0.8.0.9036 + 0.9.0 diff --git a/git_commit.sh b/git_commit.sh deleted file mode 100755 index e71cf26e..00000000 --- a/git_commit.sh +++ /dev/null @@ -1,38 +0,0 @@ -####################################################################### -# To push new commits to the premaster branch, run: # -# bash git_premaster.sh "commit message" # -# # -# After successful CRAN checks, merge it to the master branch with: # -# bash git_merge.sh # -####################################################################### - -if [ -z "$1" ]; then - echo "FATAL - no commit message" - exit 1 -fi - -echo "••••••••••••••••••••••••••••••••••••••••••••" -echo "• Updating package date and version number •" -echo "••••••••••••••••••••••••••••••••••••••••••••" -sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION -# get latest tags -git pull --tags --quiet -# get version number: latest tag + .90 + number of commits (like 0.6.1.9033) -newversion=`git describe --tags | sed 's/-/.90/' | sed 's/-.*//' | sed 's/v//'` -sed -i -- "s/^Version: .*/Version: ${newversion}/" DESCRIPTION -echo "First 3 lines of DESCRIPTION:" -head -3 DESCRIPTION -echo -echo "•••••••••••••••••••••••" -echo "• Documenting package •" -echo "•••••••••••••••••••••••" -Rscript -e "devtools::document()" -echo -echo "••••••••••••••" -echo "• Committing •" -echo "••••••••••••••" -git add . -git commit -a -m "$1" --quiet - -echo -echo "Done." diff --git a/git_merge.sh b/git_merge.sh index 027f15bc..e9fe463e 100755 --- a/git_merge.sh +++ b/git_merge.sh @@ -1,9 +1,13 @@ ####################################################################### # To push new commits to the premaster branch, run: # # bash git_premaster.sh "commit message" # +# This creates auto version numbering in DESCRIPTION and NEWS.md. # # # # After successful CRAN checks, merge it to the master branch with: # # bash git_merge.sh # +# # +# To prerelease a new version number, run: # +# bash git_premaster.sh "v0.x.x" FALSE "0.x.x" # ####################################################################### # stash current changes diff --git a/git_premaster.sh b/git_premaster.sh index 190194a5..ad0e2d5f 100755 --- a/git_premaster.sh +++ b/git_premaster.sh @@ -20,24 +20,31 @@ echo "•••••••••••••••••••••••• echo "• Updating package date and version number •" echo "••••••••••••••••••••••••••••••••••••••••••••" sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION -# get latest tags -git pull --tags --quiet -current_tag=`git describe --tags --abbrev=0 | sed 's/v//'` -current_commit=`git describe --tags | sed 's/.*-\(.*\)-.*/\1/'` -# combine tag (e.g. 0.1.0) and commit number (like 40) increased by 9000 to indicate beta version -new_version="$current_tag.$((current_commit + 9000))" # results in 0.1.0.9040 -if [ -z "$new_version" ]; then - new_version="$current_tag.9000" - echo - echo "** COULD NOT CREATE NEW VERSION NUMBER! **" - echo "Are there some unpushed changes in a new tag? Then mind NEWS.md. Assuming sequence number 9000." - echo +if [ -z "$3" ]; then + # no version number set, so get latest tags to create it + git pull --tags --quiet + current_tag=`git describe --tags --abbrev=0 | sed 's/v//'` + current_commit=`git describe --tags | sed 's/.*-\(.*\)-.*/\1/'` + # combine tag (e.g. 0.1.0) and commit number (like 40) increased by 9000 to indicate beta version + new_version="$current_tag.$((current_commit + 9000))" # results in 0.1.0.9040 + if [ -z "$new_version" ]; then + new_version="$current_tag.9000" + echo + echo "** COULD NOT CREATE NEW VERSION NUMBER! **" + echo "Are there some unpushed changes in a new tag? Then mind NEWS.md. Assuming sequence number 9000." + echo + fi + # add date to 2nd line of NEWS.md when no version number was set + sed -i -- "2s/.*/## \Last updated: $(date '+%d-%b-%Y')\<\/small\>/" NEWS.md +else + new_version=$3 + # rmove 2nd line of NEWS.md (the last changed date) + sed -i -- "2s/.*//" NEWS.md + echo "Run devtools::release() or devtools::submit_cran() after this script. Non-interactive mode will not work." fi +# set version number to DESCRIPTION and NEWS files sed -i -- "s/^Version: .*/Version: ${new_version}/" DESCRIPTION -# update 1st line of NEWS.md sed -i -- "1s/.*/# AMR ${new_version}/" NEWS.md -# add date to 2nd line of NEWS.md -sed -i -- "2s/.*/## \Last updated: $(date '+%d-%b-%Y')\<\/small\>/" NEWS.md rm *-- || true echo "• First 3 lines of DESCRIPTION:" head -3 DESCRIPTION diff --git a/git_release.sh b/git_release.sh deleted file mode 100755 index 7216ec77..00000000 --- a/git_release.sh +++ /dev/null @@ -1,46 +0,0 @@ -####################################################################### -# To push new commits to the premaster branch, run: # -# bash git_premaster.sh "commit message" # -# # -# After successful CRAN checks, merge it to the master branch with: # -# bash git_merge.sh # -# # -# Initiate a new release with: # -# bash git_release.sh "new_version_number" # -# This will edit the DESCRIPTION file and the NEWS.md file. # -####################################################################### - -if [ -z "$1" ]; then - echo "FATAL - no version number" - exit 1 -fi - -echo "••••••••••••••••••••••••••••••••••••••••••••" -echo "• Updating package date and version number •" -echo "••••••••••••••••••••••••••••••••••••••••••••" -new_version=${1} -sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION -sed -i -- "s/^Version: .*/Version: ${new_version}/" DESCRIPTION -# update 1st line of NEWS.md -sed -i -- "1s/.*/# AMR ${new_version}/" NEWS.md -# rmove 2nd line of NEWS.md -sed -i -- "2s/.*//" NEWS.md -rm *-- || true -echo "• First 3 lines of DESCRIPTION:" -head -3 DESCRIPTION -echo -echo "• First 2 lines of NEWS.md:" -head -2 NEWS.md -echo -echo "••••••••••••••••••••••••••" -echo "• Building complete site •" -echo "••••••••••••••••••••••••••" -echo "• Installing..." -Rscript -e "devtools::load_all(quiet = TRUE)" -Rscript -e "devtools::install(quiet = TRUE, dependencies = FALSE)" -rm -rf docs -Rscript -e "pkgdown::init_site()" -Rscript -e "suppressMessages(pkgdown::build_site(lazy = FALSE, examples = FALSE))" -echo -echo "Run devtools::release() or devtools::submit_cran(). Non-interactive mode (this script) will not work." - diff --git a/git_siteonly.sh b/git_siteonly.sh index c50b7e51..289558a0 100755 --- a/git_siteonly.sh +++ b/git_siteonly.sh @@ -1,9 +1,13 @@ ####################################################################### # To push new commits to the premaster branch, run: # # bash git_premaster.sh "commit message" # +# This creates auto version numbering in DESCRIPTION and NEWS.md. # # # # After successful CRAN checks, merge it to the master branch with: # # bash git_merge.sh # +# # +# To prerelease a new version number, run: # +# bash git_premaster.sh "v0.x.x" FALSE "0.x.x" # ####################################################################### bash git_premaster.sh "website update" FALSE diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 9450be42..5c77be2c 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -41,7 +41,7 @@ is.rsi.eligible(x, threshold = 0.05) Ordered factor with new class \code{\link{rsi}} } \description{ -Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class \code{\link{rsi}}, which is an ordered factor with levels \verb{S < I < R}. Invalid antimicrobial interpretations will be translated as \code{NA} with a warning. +Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class \code{\link{rsi}}, which is an ordered factor with levels \verb{S < I < R}. Invalid antimicrobial interpretations will be translated as \code{NA} with a warning. } \details{ Run \code{unique(AMR::rsi_translation$guideline)} for a list of all supported guidelines. @@ -50,17 +50,18 @@ After using \code{\link[=as.rsi]{as.rsi()}}, you can use \code{\link[=eucast_rul The function \code{\link[=is.rsi.eligible]{is.rsi.eligible()}} returns \code{TRUE} when a columns contains at most 5\% invalid antimicrobial interpretations (not S and/or I and/or R), and \code{FALSE} otherwise. The threshold of 5\% can be set with the \code{threshold} parameter. } -\section{Interpretation of S, I and R}{ +\section{Interpretation of R and S/I}{ -In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". \itemize{ -\item \strong{S} - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -\item \strong{I} - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -\item \strong{R} - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. +\item \strong{R = Resistant}\cr +A microorganism is categorised as \emph{Resistant} when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +\item \strong{S = Susceptible}\cr +A microorganism is categorised as \emph{Susceptible, standard dosing regimen}, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +\item \strong{I = Increased exposure, but still susceptible}\cr +A microorganism is categorised as \emph{Susceptible, Increased exposure} when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. } -Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. - This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } diff --git a/man/count.Rd b/man/count.Rd index 1ad0d81a..447c7f87 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -72,17 +72,18 @@ The function \code{\link[=n_rsi]{n_rsi()}} is an alias of \code{\link[=count_all The function \code{\link[=count_df]{count_df()}} takes any variable from \code{data} that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) and counts the number of S's, I's and R's. The function \code{\link[=rsi_df]{rsi_df()}} works exactly like \code{\link[=count_df]{count_df()}}, but adds the percentage of S, I and R. } -\section{Interpretation of S, I and R}{ +\section{Interpretation of R and S/I}{ -In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". \itemize{ -\item \strong{S} - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -\item \strong{I} - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -\item \strong{R} - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. +\item \strong{R = Resistant}\cr +A microorganism is categorised as \emph{Resistant} when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +\item \strong{S = Susceptible}\cr +A microorganism is categorised as \emph{Susceptible, standard dosing regimen}, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +\item \strong{I = Increased exposure, but still susceptible}\cr +A microorganism is categorised as \emph{Susceptible, Increased exposure} when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. } -Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. - This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } diff --git a/man/like.Rd b/man/like.Rd index b4ea7b07..3c8675a1 100755 --- a/man/like.Rd +++ b/man/like.Rd @@ -16,20 +16,11 @@ x \%like\% pattern x \%like_case\% pattern } \arguments{ -\item{x}{a character vector where matches are sought, or an - object which can be coerced by \code{as.character} to a character - vector. \link[base]{Long vectors} are supported.} +\item{x}{a character vector where matches are sought, or an object which can be coerced by \code{\link[=as.character]{as.character()}} to a character vector.} -\item{pattern}{character string containing a \link[base]{regular expression} - (or character string for \code{fixed = TRUE}) to be matched - in the given character vector. Coerced by - \code{\link[base]{as.character}} to a character string if possible. If a - character vector of length 2 or more is supplied, the first element - is used with a warning. Missing values are allowed except for - \code{regexpr} and \code{gregexpr}.} +\item{pattern}{a character string containing a regular expression (or \code{\link{character}} string for \code{fixed = TRUE}) to be matched in the given character vector. Coerced by \code{\link[=as.character]{as.character()}} to a character string if possible. If a \code{\link{character}} vector of length 2 or more is supplied, the first element is used with a warning.} -\item{ignore.case}{if \code{FALSE}, the pattern matching is \emph{case - sensitive} and if \code{TRUE}, case is ignored during matching.} +\item{ignore.case}{if \code{FALSE}, the pattern matching is \emph{case sensitive} and if \code{TRUE}, case is ignored during matching.} } \value{ A \code{\link{logical}} vector diff --git a/man/mdro.Rd b/man/mdro.Rd index 29a6499c..0829aa87 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -179,17 +179,18 @@ The following antibiotics are used for the functions \code{\link[=eucast_rules]{ \strong{VAN}: vancomycin (\href{https://www.whocc.no/atc_ddd_index/?code=J01XA01}{J01XA01}). } -\section{Interpretation of S, I and R}{ +\section{Interpretation of R and S/I}{ -In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". \itemize{ -\item \strong{S} - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -\item \strong{I} - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -\item \strong{R} - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. +\item \strong{R = Resistant}\cr +A microorganism is categorised as \emph{Resistant} when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +\item \strong{S = Susceptible}\cr +A microorganism is categorised as \emph{Susceptible, standard dosing regimen}, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +\item \strong{I = Increased exposure, but still susceptible}\cr +A microorganism is categorised as \emph{Susceptible, Increased exposure} when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. } -Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. - This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } diff --git a/man/proportion.Rd b/man/proportion.Rd index 7b4f4670..184c2c06 100644 --- a/man/proportion.Rd +++ b/man/proportion.Rd @@ -118,17 +118,18 @@ and that, in combination therapies, for \code{only_all_tested = FALSE} applies t Using \code{only_all_tested} has no impact when only using one antibiotic as input. } -\section{Interpretation of S, I and R}{ +\section{Interpretation of R and S/I}{ -In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". \itemize{ -\item \strong{S} - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -\item \strong{I} - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -\item \strong{R} - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. +\item \strong{R = Resistant}\cr +A microorganism is categorised as \emph{Resistant} when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +\item \strong{S = Susceptible}\cr +A microorganism is categorised as \emph{Susceptible, standard dosing regimen}, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +\item \strong{I = Increased exposure, but still susceptible}\cr +A microorganism is categorised as \emph{Susceptible, Increased exposure} when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. } -Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. - This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd index 0a8a2d1b..f6161955 100644 --- a/man/resistance_predict.Rd +++ b/man/resistance_predict.Rd @@ -100,17 +100,18 @@ Valid options for the statistical model (parameter \code{model}) are: \item \code{"lin"} or \code{"linear"}: a linear regression model } } -\section{Interpretation of S, I and R}{ +\section{Interpretation of R and S/I}{ -In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". +In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (\url{http://www.eucast.org/newsiandr/}). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations". \itemize{ -\item \strong{S} - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. -\item \strong{I} - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. -\item \strong{R} - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure. +\item \strong{R = Resistant}\cr +A microorganism is categorised as \emph{Resistant} when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. +\item \strong{S = Susceptible}\cr +A microorganism is categorised as \emph{Susceptible, standard dosing regimen}, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent. +\item \strong{I = Increased exposure, but still susceptible}\cr +A microorganism is categorised as \emph{Susceptible, Increased exposure} when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. } -Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. - This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } diff --git a/pkgdown/extra.css b/pkgdown/extra.css index ae63a9a9..9aa02497 100644 --- a/pkgdown/extra.css +++ b/pkgdown/extra.css @@ -200,11 +200,17 @@ table a:not(.btn):hover, .table a:not(.btn):hover { /* text below header in manual overview */ .template-reference-index h2 ~ p { - font-size: 16px; + font-size: 15px; } .template-reference-topic h2 { font-size: 24px; } +.template-reference-topic h3 { + font-size: 18px; +} +.template-reference-topic h4 { + font-size: 15px; +} /* logos on index page */ .logo_img { diff --git a/vignettes/AMR.Rmd b/vignettes/AMR.Rmd index 774a5eb5..5f8f8579 100755 --- a/vignettes/AMR.Rmd +++ b/vignettes/AMR.Rmd @@ -431,7 +431,7 @@ ggplot(data_1st %>% group_by(genus)) + geom_rsi(x = "genus") + # split plots on antibiotic facet_rsi(facet = "antibiotic") + - # make R red, I yellow and S green + # set colours to the R/SI interpretations scale_rsi_colours() + # show percentages on y axis scale_y_percent(breaks = 0:4 * 25) + diff --git a/vignettes/WHONET.Rmd b/vignettes/WHONET.Rmd index 478db8a4..0f3c38e9 100644 --- a/vignettes/WHONET.Rmd +++ b/vignettes/WHONET.Rmd @@ -67,9 +67,10 @@ We also created a package dedicated to data cleaning and checking, called the `c So let's check our data, with a couple of frequency tables: ```{r, results = 'asis'} -# our newly created `mo` variable -data %>% freq(mo, nmax = 10) - +# our newly created `mo` variable, put in the mo_name() function +data %>% freq(mo_name(mo), nmax = 10) +``` +```{r, results = 'asis'} # our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) @@ -77,8 +78,21 @@ data %>% freq(AMC_ND2) ### A first glimpse at results -An easy ggplot will already give a lot of information, using the included `ggplot_rsi()` function: +An easy `ggplot` will already give a lot of information, using the included `ggplot_rsi()` function: -```{r} -ggplot_rsi(data, translate_ab = 'ab') +```{r, eval = FALSE} +data %>% + group_by(Country) %>% + select(Country, AMP_ND2, AMC_ED20, CAZ_ED10, CIP_ED5) %>% + ggplot_rsi(translate_ab = 'ab', facet = "Country", datalabels = FALSE) +``` + +```{r, echo = FALSE} +# on very old and some new releases of R, this may lead to an error +tryCatch(data %>% + group_by(Country) %>% + select(Country, AMP_ND2, AMC_ED20, CAZ_ED10, CIP_ED5) %>% + ggplot_rsi(translate_ab = 'ab', facet = "Country", datalabels = FALSE) %>% + print(), + error = function(e) base::invisible()) ```