From a2c2be23c124f9a2c9d2c3d515fd5e268d2c106f Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Sun, 9 Mar 2025 10:41:11 +0100 Subject: [PATCH] (v2.1.1.9190) `antibiotics` deprecation in `antibiogram()` --- .github/workflows/lintr.yaml | 3 +- DESCRIPTION | 4 +- NEWS.md | 7 +- PythonPackage/AMR/AMR.egg-info/PKG-INFO | 2 +- PythonPackage/AMR/dist/amr-2.1.1.9189.tar.gz | Bin 10091 -> 0 bytes ...ny.whl => amr-2.1.1.9190-py3-none-any.whl} | Bin 10281 -> 10280 bytes PythonPackage/AMR/dist/amr-2.1.1.9190.tar.gz | Bin 0 -> 10081 bytes PythonPackage/AMR/setup.py | 2 +- R/antibiogram.R | 180 +++++++++--------- R/proportion.R | 2 +- R/sir_calc.R | 2 +- R/zz_deprecated.R | 23 ++- R/zzz.R | 4 +- data-raw/_pre_commit_checks.R | 4 +- .../{antibiotics.dta => antimicrobials.dta} | Bin 468187 -> 468187 bytes ...biotics.feather => antimicrobials.feather} | Bin ...biotics.parquet => antimicrobials.parquet} | Bin .../{antibiotics.rds => antimicrobials.rds} | Bin .../{antibiotics.sav => antimicrobials.sav} | Bin 372940 -> 372940 bytes .../{antibiotics.txt => antimicrobials.txt} | 0 .../{antibiotics.xlsx => antimicrobials.xlsx} | Bin 75871 -> 75870 bytes ....txt => gpt_training_text_v2.1.1.9190.txt} | 76 ++++---- index.md | 10 +- man/antibiogram.Rd | 60 +++--- man/count.Rd | 2 +- man/proportion.Rd | 2 +- 26 files changed, 203 insertions(+), 180 deletions(-) delete mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9189.tar.gz rename PythonPackage/AMR/dist/{amr-2.1.1.9189-py3-none-any.whl => amr-2.1.1.9190-py3-none-any.whl} (52%) create mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9190.tar.gz rename data-raw/{antibiotics.dta => antimicrobials.dta} (99%) rename data-raw/{antibiotics.feather => antimicrobials.feather} (100%) rename data-raw/{antibiotics.parquet => antimicrobials.parquet} (100%) rename data-raw/{antibiotics.rds => antimicrobials.rds} (100%) rename data-raw/{antibiotics.sav => antimicrobials.sav} (99%) rename data-raw/{antibiotics.txt => antimicrobials.txt} (100%) rename data-raw/{antibiotics.xlsx => antimicrobials.xlsx} (97%) rename data-raw/{gpt_training_text_v2.1.1.9189.txt => gpt_training_text_v2.1.1.9190.txt} (99%) diff --git a/.github/workflows/lintr.yaml b/.github/workflows/lintr.yaml index 776d8e991..cceb37261 100644 --- a/.github/workflows/lintr.yaml +++ b/.github/workflows/lintr.yaml @@ -65,6 +65,7 @@ jobs: # do not check these folders rm -rf data-raw rm -rf tests + rm -rf vignettes - name: Lint run: | @@ -76,7 +77,7 @@ jobs: linters <- linters[!grepl("^(closed_curly|open_curly|paren_brace|semicolon_terminator|consecutive_stopifnot|no_tab|single_quotes|unnecessary_nested_if|unneeded_concatenation)_linter$", linters)] linters <- linters[linters != "linter"] # and the ones we find unnnecessary - linters <- linters[!grepl("^(extraction_operator|implicit_integer|line_length|object_length|object_name|object_usage|nonportable_path|is)_linter$", linters)] + linters <- linters[!grepl("^(commented_code|extraction_operator|implicit_integer|indentation|line_length|namespace|nonportable_path|object_length|object_name|object_usage|is)_linter$", linters)] # put the functions in a list linters_list <- lapply(linters, function(l) eval(parse(text = paste0("lintr::", l, "()")), envir = asNamespace("lintr"))) names(linters_list) <- linters diff --git a/DESCRIPTION b/DESCRIPTION index 3d3eab7eb..325bd5761 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 2.1.1.9189 -Date: 2025-03-07 +Version: 2.1.1.9190 +Date: 2025-03-09 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NEWS.md b/NEWS.md index 069e4e0cb..b1c800194 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9189 +# AMR 2.1.1.9190 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)* @@ -48,8 +48,9 @@ This package now supports not only tools for AMR data analysis in clinical setti * To get quantitative values, `as.double()` on a `sir` object will return 1 for S, 2 for SDD/I, and 3 for R (NI will become `NA`). Other functions using `sir` classes (e.g., `summary()`) are updated to reflect the change to contain NI and SDD. * Fix for `conserve_capped_values`, which now again works as expected: in MIC values, `x` will always be R * `antibiogram()` function - * New argument `formatting_type` to set any of the 22 options for the formatting of all 'cells'. This defaults to `10` for non-WISCA and `14` for WISCA, changing the output of antibiograms to cells with more info. - * For this reason, `add_total_n` is now `FALSE` at default since the denominators are added to the cells + * Argument `antibiotics` has been renamed to `antimicrobials`. Using `antibiotics` will still work, but now returns a warning. + * Added argument `formatting_type` to set any of the 22 options for the formatting of all 'cells'. This defaults to `18` for non-WISCA and `14` for WISCA, changing the output of antibiograms to cells with more info. + * For this reason, `add_total_n` is now `FALSE` at default since the denominators are added to the cells for non-WISCA. For WISCA, the denominator is not useful anyway. * The `ab_transform` argument now defaults to `"name"`, displaying antibiotic column names instead of codes * Antimicrobial selectors (previously: *antibiotic selectors*) * 'Antibiotic selectors' are now called 'antimicrobial selectors' since their scope is broader than just antibiotics. All documentation have been updated, and `ab_class()` and `ab_selector()` have been replaced with `amr_class()` and `amr_selector()`. The old functions are now deprecated and will be removed in a future version. diff --git a/PythonPackage/AMR/AMR.egg-info/PKG-INFO b/PythonPackage/AMR/AMR.egg-info/PKG-INFO index bdfd3c311..4ed58b8b5 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.2 Name: AMR -Version: 2.1.1.9189 +Version: 2.1.1.9190 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Matthijs Berends diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9189.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9189.tar.gz deleted file mode 100644 index c3394bc9285c0de3fc5f98c8e79b1bfd7d1747f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10091 zcmch7RZtv2yDTojg1fsr!NTHhfdqGl1Pc&+7Ypu?z~Y49?vM@c4#9%EyTdN*p8U7Y z!>zhi_wAgT>6-p}x~ArBs`?xHI4rEJ&tr}#2y55Ryh40}|AvI1xCEcK^=G8BV1M5g z@dkJJLg{AP1&xM8OV!$#f1dCW&suxhz|i?Qc*S4hQ*;DNQ#&5{(lN`yYOQD2I*g_E z71|p$G<)A|4K^$Ok`SiLO8LSNlpgtqvcTI1oX;?3R<=9(;FL;oOM6gY#})@<=oaWc zO)ve&js9&nDLUg-Ayj2!UsQbNGew_Fd~6ilnF=wUd-zozS?y@U4QC zD3CUcy;Q}r3PGPVbhV-O-1^4oQuIv~3`=r28I7s*&B(T(kP_ReP_rnPm&JYDF`ri?z zEr?%}G-SsCi>ASyZ~$e3`Y9k2I$~9gNQ&y%Q8Bq-gdyIzARIeCel$;uU@5RJ5M1$k z(JgB2zvroF>~2<74PW>olug-r0`=Oi>*ix-!v9Ook|SjEjgXS;Fh`Cj_*nn*S^GFP z@gL(|3P!Kos_t?(BbMYn%()-RhfpG-@fn2xYIP?X8-2=G4x<89G>gVdLYajG;d};6 z%vmtEUA1d9r(v%hA}HiF9*ZKGNNg3`tjJz_0Gfl+Ag7l@4U5z@uUgFkgzm2I11C0; zKtZEIrThGF0w!)85yCBL_xSI!=&sM{Jr-DB&0sZtj{ucge}6LACL?9FuA9LgEQ1%U zobmqP{V$aQ1}eR--}2cK=c^`^Zrz$(>^B^lNDiT_$=gx=?NxYn#RZ+5f=HQF%_Sl% zWV(cb8L}iDW4B7)Fob# zOX($!aXK38LeIOHom|FzM!$tt#;J7ZmIw+6t)&9YKH8rZh$Umb!cu4BoVLk>=ue1+ zy1A%vnnhLSE7o@tLC<-v)g%rx0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T{m13?iAcz!k zLrsfl9YWCDM~(6Xh3_B^UOjz@x&oO#w{F=<>+T>F%(&p$v51oGuJT9s{{?yst1ST` zM0Gbn!4O#2tcO)T|tG)FFSV^0OgL9Sj06$#xhl9%V0%yz01d{{~>y6*d}T) z00P!MP8ChObfGpQ9^~#3d7lyx(lUAR?=fHQ?-7GhNYsr_eFOhmY4i&Zh@{9NF8EEj z*~MW{&5kqug()NWWH#EkR`9Zt36iSEwnnr)a935n#cgxvzorO(xRK6K_~{xQ3o&+U{Ui7<=|X z+Wk+!5=|y{|L5PjMiAnI*tLxSqJG4)Ikz$H%FsOXJ1oRRlJGEl{|dfR>|ah=dP|Sa zE?`JMP{#D2lsf0aT|!xYdM{BBNz7OBKwjFp9bYr|a}tEkXBl>s;RDO9AqaP63i0`D zPLtK$r6;+;pYz1v5*-v`;S;UI^x}8Yfj@eyo@AYp(eJN1+%s P2m)ebGIyj+WTgKBAUF+r diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9189-py3-none-any.whl b/PythonPackage/AMR/dist/amr-2.1.1.9190-py3-none-any.whl similarity index 52% rename from PythonPackage/AMR/dist/amr-2.1.1.9189-py3-none-any.whl rename to PythonPackage/AMR/dist/amr-2.1.1.9190-py3-none-any.whl index 5f7c51a1c656c5dd9c034f522156b0957389f54c..1c331b1819cd0e646330fb75021ef96b54757541 100644 GIT binary patch delta 4426 zcmZvgXEfaFx5u^7MTu?_4AFZTJrbGGiQa2;Q6l;%KPGBM??eqzql`|}NDw8;=z>E; zpAbTbcAc~C{oixXxzApE?dQdQ_TFnfpEuuKp;N9yp`(FMK#PNeLyRM*<$|UFK=?PY zArVAJ@Ykh`WRDD@pygtAXJD*rjsgeAh8qWm{U+bm{kfo+km!xch{}khHqiwFQCgdP zWRLO%!g_@0w=Lj%LaSZ^G*CkljZNgTeWt+1GDQK&W;`iep&t`7ijkNpR<`591VX(O z=%7jp)Uh$aOKhP;OvGFqenS`^Az)(9q02;I3O?u{@}#J0X|1W-u}I3hxJ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FJ2bzNVt&%{*K$Tchr*`8el*q5W_hy{f@xHP+413t-=VuaQs3vM$Y<>jun1 z47aSn_2SpQX~$?Bu=zHSQ}?KWDnk>|XQQ}db8sFoD2;f{>x=t`nsSQTxZ0rvH`9rQ z;x?uN*1xYu5N%5;h@g+N0Jx~wYf8ECJ4o@A+t;08g4fi+0~j;YgBfd#Nabb$K%w=? zA0Fy_nUIP|>obXv8O+EX-w1bL6x%ve^O0_~^fZ=YJk*-yTHGCk)GO>n-e+X@S)!ip zqFP_#s+q;4OGHfxpn`d_goaNRY6wq9740Y2Uy`ZU!qe;FA0h4%9s6~gHsqwv)V>`P zA`WaWY%4Gh4BSHjXh4Zy;kLXT<={)fR@w=VNvklAq+kc1gLu7*?0mN z_q-n6jW<;}`H%zx-*vxRLAt|@@bx#1XA*bRiuD7OuUx2KgrOO4&v(C@o z4*G~8OD}aJ5XS=u?*^E51Y+du2qu4sM-<`t5F0A%?EJs`0G^MkTR;GK#?Q!j9&(M2 zVE+#BfjYDU1A<}zyrckn7Ev^<0LeIr9a#IIue0~@7UEu0rv-wX-$LReMsfdhSlCY6 zFQdW{03PI?gbdO)0wH}+p{Ji<^Y=S|oS?jVMce}P!EJjM+-e69DFddDoM=e-e&4Sb z=l=zJ2C6FuKzOuv00CW~z6BSPf-VSo!l)&v5ApqAPY*)=7|!%D8ERl>U%gIT)jIOK zrs03e8t*OZ;6ZeU0UufiVuKbJI-ax6&JbsRq8Ewb=0@0+-T%1cH#J%1@0o_)*cTr6Yz|JfBjmv_MJ MOM@%aE;Q7C0e;p1f&c&j literal 0 HcmV?d00001 diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index 45c40b7be..32d4a3300 100644 --- a/PythonPackage/AMR/setup.py +++ b/PythonPackage/AMR/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='AMR', - version='2.1.1.9189', + version='2.1.1.9190', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/antibiogram.R b/R/antibiogram.R index f9307d9bd..4d4015829 100755 --- a/R/antibiogram.R +++ b/R/antibiogram.R @@ -34,7 +34,7 @@ #' #' Adhering to previously described approaches (see *Source*) and especially the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki *et al.*, these functions provide flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports. #' @param x a [data.frame] containing at least a column with microorganisms and columns with antimicrobial results (class 'sir', see [as.sir()]) -#' @param antibiotics vector of any antimicrobial name or code (will be evaluated with [as.ab()], column name of `x`, or (any combinations of) [antimicrobial selectors][antimicrobial_selectors] such as [aminoglycosides()] or [carbapenems()]. For combination antibiograms, this can also be set to values separated with `"+"`, such as `"TZP+TOB"` or `"cipro + genta"`, given that columns resembling such antimicrobials exist in `x`. See *Examples*. +#' @param antimicrobials vector of any antimicrobial name or code (will be evaluated with [as.ab()], column name of `x`, or (any combinations of) [antimicrobial selectors][antimicrobial_selectors] such as [aminoglycosides()] or [carbapenems()]. For combination antibiograms, this can also be set to values separated with `"+"`, such as `"TZP+TOB"` or `"cipro + genta"`, given that columns resembling such antimicrobials exist in `x`. See *Examples*. #' @param mo_transform a character to transform microorganism input - must be `"name"`, `"shortname"` (default), `"gramstain"`, or one of the column names of the [microorganisms] data set: `r vector_or(colnames(microorganisms), sort = FALSE, quotes = TRUE)`. Can also be `NULL` to not transform the input or `NA` to consider all microorganisms 'unknown'. #' @param ab_transform a character to transform antimicrobial input - must be one of the column names of the [antimicrobials] data set (defaults to `"name"`): `r vector_or(colnames(antimicrobials), sort = FALSE, quotes = TRUE)`. Can also be `NULL` to not transform the input. #' @param syndromic_group a column name of `x`, or values calculated to split rows of `x`, e.g. by using [ifelse()] or [`case_when()`][dplyr::case_when()]. See *Examples*. @@ -107,7 +107,7 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = "TZP") +#' antimicrobials = "TZP") #' ``` #' #' 2. **Combination Antibiogram** @@ -118,7 +118,7 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) +#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) #' ``` #' #' 3. **Syndromic Antibiogram** @@ -129,7 +129,7 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = penicillins(), +#' antimicrobials = penicillins(), #' syndromic_group = "ward") #' ``` #' @@ -141,12 +141,12 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), +#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), #' wisca = TRUE) #' #' # this is equal to: #' wisca(your_data, -#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) +#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) #' ``` #' #' WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs). @@ -161,7 +161,7 @@ #' library(dplyr) #' your_data %>% #' group_by(has_sepsis, is_neonate, sex) %>% -#' wisca(antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) +#' wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) #' ``` #' #' ### Stepped Approach for Clinical Insight @@ -177,12 +177,12 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = selected_regimens, +#' antimicrobials = selected_regimens, #' mo_transform = NA) # all pathogens set to `NA` #' #' # preferred: use WISCA #' wisca(your_data, -#' antibiotics = selected_regimens) +#' antimicrobials = selected_regimens) #' ``` #' #' 2. **Refinement with Gram Stain Results** @@ -194,7 +194,7 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = selected_regimens, +#' antimicrobials = selected_regimens, #' mo_transform = "gramstain") # all pathogens set to Gram-pos/Gram-neg #' ``` #' @@ -207,7 +207,7 @@ #' #' ```r #' antibiogram(your_data, -#' antibiotics = selected_regimens, +#' antimicrobials = selected_regimens, #' mo_transform = "shortname") # all pathogens set to 'G. species', e.g., E. coli #' ``` #' @@ -301,17 +301,17 @@ #' # Traditional antibiogram ---------------------------------------------- #' #' antibiogram(example_isolates, -#' antibiotics = c(aminoglycosides(), carbapenems()) +#' antimicrobials = c(aminoglycosides(), carbapenems()) #' ) #' #' antibiogram(example_isolates, -#' antibiotics = aminoglycosides(), +#' antimicrobials = aminoglycosides(), #' ab_transform = "atc", #' mo_transform = "gramstain" #' ) #' #' antibiogram(example_isolates, -#' antibiotics = carbapenems(), +#' antimicrobials = carbapenems(), #' ab_transform = "name", #' mo_transform = "name" #' ) @@ -319,15 +319,15 @@ #' #' # Combined antibiogram ------------------------------------------------- #' -#' # combined antibiotics yield higher empiric coverage +#' # combined antimicrobials yield higher empiric coverage #' antibiogram(example_isolates, -#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), +#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), #' mo_transform = "gramstain" #' ) #' -#' # names of antibiotics do not need to resemble columns exactly: +#' # names of antimicrobials do not need to resemble columns exactly: #' antibiogram(example_isolates, -#' antibiotics = c("Cipro", "cipro + genta"), +#' antimicrobials = c("Cipro", "cipro + genta"), #' mo_transform = "gramstain", #' ab_transform = "name", #' sep = " & " @@ -338,7 +338,7 @@ #' #' # the data set could contain a filter for e.g. respiratory specimens #' antibiogram(example_isolates, -#' antibiotics = c(aminoglycosides(), carbapenems()), +#' antimicrobials = c(aminoglycosides(), carbapenems()), #' syndromic_group = "ward" #' ) #' @@ -348,7 +348,7 @@ #' # with a custom language, though this will be determined automatically #' # (i.e., this table will be in Spanish on Spanish systems) #' antibiogram(ex1, -#' antibiotics = aminoglycosides(), +#' antimicrobials = aminoglycosides(), #' ab_transform = "name", #' syndromic_group = ifelse(ex1$ward == "ICU", #' "UCI", "No UCI" @@ -361,7 +361,7 @@ #' #' # WISCA are not stratified by species, but rather on syndromes #' antibiogram(example_isolates, -#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), +#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), #' syndromic_group = "ward", #' wisca = TRUE #' ) @@ -370,7 +370,7 @@ #' # Print the output for R Markdown / Quarto ----------------------------- #' #' ureido <- antibiogram(example_isolates, -#' antibiotics = ureidopenicillins(), +#' antimicrobials = ureidopenicillins(), #' syndromic_group = "ward", #' wisca = TRUE #' ) @@ -385,11 +385,11 @@ #' # Generate plots with ggplot2 or base R -------------------------------- #' #' ab1 <- antibiogram(example_isolates, -#' antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), +#' antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), #' mo_transform = "gramstain" #' ) #' ab2 <- antibiogram(example_isolates, -#' antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), +#' antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), #' mo_transform = "gramstain", #' syndromic_group = "ward" #' ) @@ -405,7 +405,7 @@ #' plot(ab2) #' } antibiogram <- function(x, - antibiotics = where(is.sir), + antimicrobials = where(is.sir), mo_transform = "shortname", ab_transform = "name", syndromic_group = NULL, @@ -422,14 +422,15 @@ antibiogram <- function(x, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) { + info = interactive(), + ...) { UseMethod("antibiogram") } #' @method antibiogram default #' @export antibiogram.default <- function(x, - antibiotics = where(is.sir), + antimicrobials = where(is.sir), mo_transform = "shortname", ab_transform = "name", syndromic_group = NULL, @@ -446,7 +447,8 @@ antibiogram.default <- function(x, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) { + info = interactive(), + ...) { meet_criteria(x, allow_class = "data.frame") x <- ascertain_sir_classes(x, "x") meet_criteria(wisca, allow_class = "logical", has_length = 1) @@ -456,6 +458,10 @@ antibiogram.default <- function(x, } mo_transform <- function(x) suppressMessages(suppressWarnings(paste(mo_genus(x, keep_synonyms = TRUE, language = NULL), mo_species(x, keep_synonyms = TRUE, language = NULL)))) } + if ("antibiotics" %in% names(list(...))) { + deprecation_warning("antibiotics", "antimicrobials", fn = "antibiogram", is_argument = TRUE) + antimicrobials <- list(...)$antibiotics + } if (!is.function(mo_transform)) { meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE, allow_NA = TRUE) } @@ -514,17 +520,17 @@ antibiogram.default <- function(x, has_syndromic_group <- FALSE } - # get antibiotics - ab_trycatch <- tryCatch(colnames(suppressWarnings(x[, antibiotics, drop = FALSE])), error = function(e) NULL) + # get antimicrobials + ab_trycatch <- tryCatch(colnames(suppressWarnings(x[, antimicrobials, drop = FALSE])), error = function(e) NULL) if (is.null(ab_trycatch)) { - stop_ifnot(is.character(suppressMessages(antibiotics)), "`antibiotics` must be an antimicrobial selector, or a character vector.") - antibiotics.bak <- antibiotics - # split antibiotics on separator and make it a list - antibiotics <- strsplit(gsub(" ", "", antibiotics), "+", fixed = TRUE) - # get available antibiotics in data set + stop_ifnot(is.character(suppressMessages(antimicrobials)), "`antimicrobials` must be an antimicrobial selector, or a character vector.") + antimicrobials.bak <- antimicrobials + # split antimicrobials on separator and make it a list + antimicrobials <- strsplit(gsub(" ", "", antimicrobials), "+", fixed = TRUE) + # get available antimicrobials in data set df_ab <- get_column_abx(x, verbose = FALSE, info = FALSE) - # get antibiotics from user - user_ab <- suppressMessages(suppressWarnings(lapply(antibiotics, as.ab, flag_multiple_results = FALSE, info = FALSE))) + # get antimicrobials from user + user_ab <- suppressMessages(suppressWarnings(lapply(antimicrobials, as.ab, flag_multiple_results = FALSE, info = FALSE))) non_existing <- character(0) user_ab <- lapply(user_ab, function(x) { out <- unname(df_ab[match(x, names(df_ab))]) @@ -535,14 +541,14 @@ antibiogram.default <- function(x, user_ab <- user_ab[unlist(lapply(user_ab, length)) > 0] if (length(non_existing) > 0) { - warning_("The following antibiotics were not available and ignored: ", vector_and(ab_name(non_existing, language = NULL, tolower = TRUE), quotes = FALSE)) + warning_("The following antimicrobials were not available and ignored: ", vector_and(ab_name(non_existing, language = NULL, tolower = TRUE), quotes = FALSE)) } # make list unique - antibiotics <- unique(user_ab) + antimicrobials <- unique(user_ab) # go through list to set AMR in combinations - for (i in seq_len(length(antibiotics))) { - abx <- antibiotics[[i]] + for (i in seq_len(length(antimicrobials))) { + abx <- antimicrobials[[i]] for (ab in abx) { # make sure they are SIR columns x[, ab] <- as.sir(x[, ab, drop = TRUE]) @@ -568,20 +574,20 @@ antibiogram.default <- function(x, )) } } - antibiotics[[i]] <- new_colname + antimicrobials[[i]] <- new_colname } - antibiotics <- unlist(antibiotics) + antimicrobials <- unlist(antimicrobials) } else { - antibiotics <- ab_trycatch + antimicrobials <- ab_trycatch } if (isTRUE(has_syndromic_group)) { out <- x %pm>% - pm_select(.syndromic_group, .mo, antibiotics) %pm>% + pm_select(.syndromic_group, .mo, antimicrobials) %pm>% pm_group_by(.syndromic_group) } else { out <- x %pm>% - pm_select(.mo, antibiotics) + pm_select(.mo, antimicrobials) } @@ -613,8 +619,6 @@ antibiogram.default <- function(x, if (isTRUE(info) && mins > 0) { message_("NOTE: ", mins, " combinations had less than `minimum = ", minimum, "` results and were ignored", add_fn = font_red) } - } else if (isTRUE(info)) { - warning_("Number of tested isolates per regimen should exceed ", minimum, " for each species. Coverage estimates might be inaccurate.", call = FALSE) } } if (NROW(out) == 0) { @@ -678,6 +682,10 @@ antibiogram.default <- function(x, n_susceptible = sum(n_susceptible, na.rm = TRUE) ) + if (any(out_wisca$n_tested < minimum, na.rm = TRUE) && message_not_thrown_before("antibiogram", wisca)) { + warning_("Number of tested isolates should exceed ", minimum, " for each regimen (and group). WISCA coverage estimates might be inaccurate.", call = FALSE) + } + out_wisca$p_susceptible <- out_wisca$n_susceptible / out_wisca$n_tested if (isTRUE(has_syndromic_group)) { @@ -690,8 +698,8 @@ antibiogram.default <- function(x, # create the WISCA parameters, including our priors/posteriors out$gamma_posterior <- NA_real_ - out$beta_posterior1 <- NA_real_ - out$beta_posterior2 <- NA_real_ + out$beta_posterior_1 <- NA_real_ + out$beta_posterior_2 <- NA_real_ for (i in seq_len(NROW(out))) { if (out$n_tested[i] == 0) { @@ -699,10 +707,22 @@ antibiogram.default <- function(x, } out_current <- out[i, , drop = FALSE] - priors <- calculate_priors(out_current, combine_SI = combine_SI) - out$gamma_posterior[i] <- priors$gamma_posterior - out$beta_posterior1[i] <- priors$beta_posterior_1 - out$beta_posterior2[i] <- priors$beta_posterior_2 + + ## calculate priors ---- + # pathogen incidence (Dirichlet distribution) + gamma_prior <- rep(1, length(unique(out_current$mo))) # Dirichlet prior + gamma_posterior <- gamma_prior + out_current$n_total # Posterior parameters + + # regimen susceptibility (Beta distribution) + beta_prior <- rep(1, length(unique(out_current$mo))) # Beta prior + r <- out_current$n_susceptible + n <- out_current$n_tested + beta_posterior_1 <- beta_prior + r # Posterior alpha + beta_posterior_2 <- beta_prior + (n - r) # Posterior beta + + out$gamma_posterior[i] <- gamma_posterior + out$beta_posterior_1[i] <- beta_posterior_1 + out$beta_posterior_2[i] <- beta_posterior_2 } wisca_parameters <- out @@ -742,8 +762,8 @@ antibiogram.default <- function(x, random_susceptibity <- stats::runif(1, min = 0, max = 1) simulated_susceptibility <- stats::qbeta( p = random_susceptibity, - shape1 = params_current$beta_posterior1, - shape2 = params_current$beta_posterior2 + shape1 = params_current$beta_posterior_1, + shape2 = params_current$beta_posterior_2 ) sum(simulated_incidence * simulated_susceptibility, na.rm = TRUE) }) @@ -825,6 +845,9 @@ antibiogram.default <- function(x, # 20. 5% (4-6%,15/300) # 21. 5 (4-6,N=15/300) # 22. 5% (4-6%,N=15/300) + if (wisca == TRUE && !formatting_type %in% c(1, 2, 13, 14) && info == TRUE && message_not_thrown_before("antibiogram", wisca, formatting_type)) { + message_("Using WISCA with a `formatting_type` that includes the denominator is not useful") + } if (formatting_type == 1) out <- out %pm>% pm_summarise(out_value = round(coverage * 100, digits = digits)) if (formatting_type == 2) out <- out %pm>% pm_summarise(out_value = n_susceptible) if (formatting_type == 3) out <- out %pm>% pm_summarise(out_value = n_tested) @@ -847,8 +870,9 @@ antibiogram.default <- function(x, if (formatting_type == 20) out <- out %pm>% pm_summarise(out_value = paste0(round(coverage * 100, digits = digits), "% (", round(lower_ci * 100, digits = digits), "-", round(upper_ci * 100, digits = digits), "%,", n_susceptible, "/", n_tested, ")")) if (formatting_type == 21) out <- out %pm>% pm_summarise(out_value = paste0(round(coverage * 100, digits = digits), " (", round(lower_ci * 100, digits = digits), "-", round(upper_ci * 100, digits = digits), ",N=", n_susceptible, "/", n_tested, ")")) if (formatting_type == 22) out <- out %pm>% pm_summarise(out_value = paste0(round(coverage * 100, digits = digits), "% (", round(lower_ci * 100, digits = digits), "-", round(upper_ci * 100, digits = digits), "%,N=", n_susceptible, "/", n_tested, ")")) + out$out_value[out$out_value %like% "^NA"] <- NA_character_ - # transform names of antibiotics + # transform names of antimicrobials ab_naming_function <- function(x, t, l, s) { x <- strsplit(x, s, fixed = TRUE) out <- character(length = length(x)) @@ -979,7 +1003,7 @@ antibiogram.default <- function(x, #' @method antibiogram grouped_df #' @export antibiogram.grouped_df <- function(x, - antibiotics = where(is.sir), + antimicrobials = where(is.sir), mo_transform = NULL, ab_transform = "name", syndromic_group = NULL, @@ -996,7 +1020,8 @@ antibiogram.grouped_df <- function(x, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) { + info = interactive(), + ...) { stop_ifnot(is.null(mo_transform), "`mo_transform` must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, which could include the pathogen information (though not necessary). Nonetheless, this makes `mo_transform` redundant.", call = FALSE) stop_ifnot(is.null(syndromic_group), "`syndromic_group` must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, making `syndromic_groups` redundant.", call = FALSE) groups <- attributes(x)$groups @@ -1020,7 +1045,7 @@ antibiogram.grouped_df <- function(x, next } new_out <- antibiogram(as.data.frame(x)[rows, , drop = FALSE], - antibiotics = antibiotics, + antimicrobials = antimicrobials, mo_transform = NULL, ab_transform = ab_transform, syndromic_group = NULL, @@ -1037,7 +1062,8 @@ antibiogram.grouped_df <- function(x, simulations = simulations, conf_interval = conf_interval, interval_side = interval_side, - info = FALSE + info = FALSE, + ... ) new_wisca_parameters <- attributes(new_out)$wisca_parameters new_long_numeric <- attributes(new_out)$long_numeric @@ -1098,7 +1124,7 @@ antibiogram.grouped_df <- function(x, #' @export #' @rdname antibiogram wisca <- function(x, - antibiotics = where(is.sir), + antimicrobials = where(is.sir), ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE, @@ -1113,10 +1139,11 @@ wisca <- function(x, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) { + info = interactive(), + ...) { antibiogram( x = x, - antibiotics = antibiotics, + antimicrobials = antimicrobials, ab_transform = ab_transform, mo_transform = NULL, syndromic_group = syndromic_group, @@ -1133,7 +1160,8 @@ wisca <- function(x, simulations = simulations, conf_interval = conf_interval, interval_side = interval_side, - info = info + info = info, + ... ) } @@ -1145,26 +1173,6 @@ retrieve_wisca_parameters <- function(wisca_model, ...) { attributes(wisca_model)$wisca_parameters } -calculate_priors <- function(data, combine_SI = TRUE) { - # Pathogen incidence (Dirichlet distribution) - gamma_prior <- rep(1, length(unique(data$mo))) # Dirichlet prior - gamma_posterior <- gamma_prior + data$n_total # Posterior parameters - - # Regimen susceptibility (Beta distribution) - beta_prior <- rep(1, length(unique(data$mo))) # Beta prior - r <- data$n_susceptible # Number of pathogens tested susceptible - n <- data$n_tested # n_tested tested - beta_posterior_1 <- beta_prior + r # Posterior alpha - beta_posterior_2 <- beta_prior + (n - r) # Posterior beta - - # Return parameters as a list - list( - gamma_posterior = gamma_posterior, - beta_posterior_1 = beta_posterior_1, - beta_posterior_2 = beta_posterior_2 - ) -} - # will be exported in R/zzz.R tbl_sum.antibiogram <- function(x, ...) { dims <- paste(format(NROW(x), big.mark = ","), AMR_env$cross_icon, format(NCOL(x), big.mark = ",")) @@ -1185,7 +1193,7 @@ tbl_format_footer.antibiogram <- function(x, ...) { return(footer) } c(footer, font_subtle(paste0( - "# Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,\n", + "# Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,\n", "# or use it directly in R Markdown or ", font_url("https://quarto.org", "Quarto"), ", see ", word_wrap("?antibiogram") ))) diff --git a/R/proportion.R b/R/proportion.R index 94cfb434c..f27f70bad 100644 --- a/R/proportion.R +++ b/R/proportion.R @@ -58,7 +58,7 @@ #' #' The function [proportion_df()] takes any variable from `data` that has an [`sir`] class (created with [as.sir()]) and calculates the proportions S, I, and R. It also supports grouped variables. The function [sir_df()] works exactly like [proportion_df()], but adds the number of isolates. #' @section Combination Therapy: -#' When using more than one variable for `...` (= combination therapy), use `only_all_tested` to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how [susceptibility()] works to calculate the %SI: +#' When using more than one variable for `...` (= combination therapy), use `only_all_tested` to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how [susceptibility()] works to calculate the %SI: #' #' #' ``` diff --git a/R/sir_calc.R b/R/sir_calc.R index 8ca9bbeaa..4505e4b0b 100755 --- a/R/sir_calc.R +++ b/R/sir_calc.R @@ -235,7 +235,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both" translate_ab <- get_translate_ab(translate_ab) data.bak <- data - # select only groups and antibiotics + # select only groups and antimicrobials if (is_null_or_grouped_tbl(data)) { data_has_groups <- TRUE groups <- get_group_names(data) diff --git a/R/zz_deprecated.R b/R/zz_deprecated.R index e03ef4c2b..a6dd98fcc 100755 --- a/R/zz_deprecated.R +++ b/R/zz_deprecated.R @@ -40,22 +40,25 @@ NULL #' @export "antibiotics" +# REMEMBER to also remove the deprecated `antibiotics` argument in `antibiogram()` + #' @rdname AMR-deprecated #' @export ab_class <- function(...) { - deprecation_warning("ab_class", "amr_class") + deprecation_warning("ab_class", "amr_class", is_function = TRUE) amr_class(...) } #' @rdname AMR-deprecated #' @export ab_selector <- function(...) { - deprecation_warning("ab_selector", "amr_selector") + deprecation_warning("ab_selector", "amr_selector", is_function = TRUE) amr_selector(...) } +## Helper function ---- -deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL, is_function = TRUE, is_dataset = FALSE) { +deprecation_warning <- function(old = NULL, new = NULL, fn = NULL, extra_msg = NULL, is_function = FALSE, is_dataset = FALSE, is_argument = FALSE) { if (is.null(old)) { warning_(extra_msg) } else { @@ -68,22 +71,30 @@ deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL, is_fun type <- "function" } else if (isTRUE(is_dataset)) { type <- "dataset" - } else { + } else if (isTRUE(is_argument)) { type <- "argument" + if (is.null(fn)) { + stop("Set 'fn' in deprecation_warning()") + } + } else { + stop("Set either 'is_function', 'is_dataset', or 'is_argument' to TRUE in deprecation_warning()") } warning_( ifelse(is.null(new), paste0("The `", old, "` ", type, " is no longer in use"), ifelse(type == "dataset", paste0("The `", old, "` ", type, " has been renamed to `", new, "`"), - paste0("The `", old, "` ", type, " has been replaced with `", new, "` and will be removed in a future version") + ifelse(type == "argument", + paste0("The `", old, "` ", type, " in `", fn, "()` has been renamed to `", new, "`: `", fn, "(", new, " = ...)`"), + paste0("The `", old, "` ", type, " has been replaced with `", new, "`") + ) ) ), ifelse(type == "dataset", ". The old name will be removed in future version, so please update your code.", ifelse(type == "argument", ". While the old argument still works, it will be removed in a future version, so please update your code.", - ", see `?AMR-deprecated`." + " and will be removed in a future version, see `?AMR-deprecated`." ) ), ifelse(!is.null(extra_msg), diff --git a/R/zzz.R b/R/zzz.R index 9ee8a7e1f..6183697d8 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -204,14 +204,14 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x" # reference data - they have additional data to improve algorithm speed # they cannot be part of R/sysdata.rda since CRAN thinks it would make the package too large (+3 MB) if (NROW(AB_LOOKUP) != NROW(AMR::antimicrobials)) { - # antibiotics data set was updated - run create_AB_AV_lookup() again + # antimicrobials data set was updated - run create_AB_AV_lookup() again AB_LOOKUP <- create_AB_AV_lookup(AMR::antimicrobials) } # deprecated antibiotics data set makeActiveBinding("antibiotics", function() { if (interactive()) { - deprecation_warning(old = "antibiotics", new = "antimicrobials", is_function = FALSE, is_dataset = TRUE) + deprecation_warning(old = "antibiotics", new = "antimicrobials", is_dataset = TRUE) } AMR::antimicrobials }, env = asNamespace(pkgname)) diff --git a/data-raw/_pre_commit_checks.R b/data-raw/_pre_commit_checks.R index 3d055cc10..70c97a659 100644 --- a/data-raw/_pre_commit_checks.R +++ b/data-raw/_pre_commit_checks.R @@ -492,9 +492,11 @@ write_md5 <- function(object) { close(conn) } changed_md5 <- function(object) { + path <- paste0("data-raw/", deparse(substitute(object)), ".md5") + if (!file.exists(path)) return(TRUE) tryCatch( { - conn <- file(paste0("data-raw/", deparse(substitute(object)), ".md5")) + conn <- file(path) compared <- md5(object) != readLines(con = conn) close(conn) compared diff --git a/data-raw/antibiotics.dta b/data-raw/antimicrobials.dta similarity index 99% rename from data-raw/antibiotics.dta rename to data-raw/antimicrobials.dta index 16e97b848a2b0808d6ed94fa8ae131f395e157da..879e710f74091732f6b1978e4ec40938ca283483 100644 GIT binary patch delta 50 zcmcb8Qs(wanF*BwmI}U!MG8g+My3je23979jh(HXjIEtat)0xRoh+@LtgW4FTRYi< FQ~=J@5lR36 delta 50 zcmcb8Qs(wanF*Bw<_d19NeV^=My3jeW>&@~jh(HXjIEtat)0xRoh+@LtgW4FTRYi< FQ~=DH5j_9^ diff --git a/data-raw/antibiotics.feather b/data-raw/antimicrobials.feather similarity index 100% rename from data-raw/antibiotics.feather rename to data-raw/antimicrobials.feather diff --git a/data-raw/antibiotics.parquet b/data-raw/antimicrobials.parquet similarity index 100% rename from data-raw/antibiotics.parquet rename to data-raw/antimicrobials.parquet diff --git a/data-raw/antibiotics.rds b/data-raw/antimicrobials.rds similarity index 100% rename from data-raw/antibiotics.rds rename to data-raw/antimicrobials.rds diff --git a/data-raw/antibiotics.sav b/data-raw/antimicrobials.sav similarity index 99% rename from data-raw/antibiotics.sav rename to data-raw/antimicrobials.sav index a451c617ac72f6c46f5461fa69da18cb679544cd..79976627e97aee40ba0f4cf67d07961f3333ea73 100644 GIT binary patch delta 50 zcmV-20L}l*;TFu{7LZ*KIUr48av(A_F)%tbF*-3ck#RhcfCPc9g{=XFtpbIu1BI;w IwXFpou-dp1tN;K2 delta 50 zcmV-20L}l*;TFu{7LZ*KHy}o3Vjwa#F*Z6gG&(glk#RhcfCPc9g{=XFtpbIu1BI;w IwXFpou-P^er2qf` diff --git a/data-raw/antibiotics.txt b/data-raw/antimicrobials.txt similarity index 100% rename from data-raw/antibiotics.txt rename to data-raw/antimicrobials.txt diff --git a/data-raw/antibiotics.xlsx b/data-raw/antimicrobials.xlsx similarity index 97% rename from data-raw/antibiotics.xlsx rename to data-raw/antimicrobials.xlsx index b4110efa5e67d14e9c47426ce0631d4e5a4390cc..ca42ed00517ddf3c39e9faa46c5855e74a021d1f 100644 GIT binary patch delta 623 zcmcbAf#u!>7Ty4FW)=|!4h{|m_0Y_Xyb6rWKzg$QV+EKoc{S4ukig_=%=-1R3nr#X zcS_AuF%(?TX=+h8SCoaHX+#qi(NwtymuCUc+@5NzJtp$H>KTjOa5U-J#-Te{cJw1=wSkw13$k7@MVPthU!1H9QeqCfZ;YcMh}Br-8D zpoHt@e=K5=60zq{~X~qxJb=4U)!RjJ`d>c+S28N0p{o<0!oYZ2yirkz4Z$>6@ zW_UzL{aaqvx(TT0h9U!lFarWCX%wBlL7h=a9%NIb_+-CopntYAGcfQY)G#b*~$YpjUCyOW}!)AUq1_=~J2d3+3Flw`LsR4~(0031l+X4Up delta 636 zcmcb2f#v=M7Ty4FW)=|!4h{~6m=^bqyb6rWKzg$QV+EKoc{S4ukig_=%=-1W1x(JG z37Oh>CMmf+j?UG;u;ZU+e(8s|y3A}Y_iEl)KL1yhpTGL0+xC`O$LFV+6u#_r*`kd;?WL3dNr zyiJUIj;&_hTRiQGR*q~;uiRP1y^f|VyVsrG6)4~PSNu!uzb}{iXK8J&)?{3=a!JA= zX8vpDQuYU%Cq`T}-fFdFm$-x4N3L!8FJA2Fm6H=UzBHxM((kj;*?jS%GkWuGRD9Z) z9DBujeuI@>{>p!jHcY>Cx62&AOZg47u8z>LXi zjMkh$sVJ~5)33u62&gkkGk%<|qt2)q4U%3M_2$_{pd)6pFfi~kAi$DFE;a^+iX8po zlFFRaV!evooB(e|CUItX^hf<$Ue>w^sOW|w1A{O^C&Q9PF^lJVbNUB$Mmey<1vP*UJUCrfgHfA}TMek10RV7J+o%8l diff --git a/data-raw/gpt_training_text_v2.1.1.9189.txt b/data-raw/gpt_training_text_v2.1.1.9190.txt similarity index 99% rename from data-raw/gpt_training_text_v2.1.1.9189.txt rename to data-raw/gpt_training_text_v2.1.1.9190.txt index dcec36b26..5175c93ed 100644 --- a/data-raw/gpt_training_text_v2.1.1.9189.txt +++ b/data-raw/gpt_training_text_v2.1.1.9190.txt @@ -1,6 +1,6 @@ This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse. -First and foremost, you are trained on version 2.1.1.9189. Remember this whenever someone asks which AMR package version you’re at. +First and foremost, you are trained on version 2.1.1.9190. Remember this whenever someone asks which AMR package version you’re at. Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens. ---------------------------------------------------------------------------------------------------- @@ -420,7 +420,7 @@ The `AMR` package is a [free and open-source](#copyright) R package with [zero d This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). -After installing this package, R knows [**~52,000 distinct microbial species**](./reference/microorganisms.html) (updated December 2022) and all [**~600 antimicrobial and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). +After installing this package, R knows [**~52,000 distinct microbial species**](./reference/microorganisms.html) (updated December 2022) and all [**~600 antimicrobial and antiviral drugs**](./reference/antimicrobials.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). ##### Used in over 175 countries, available in 20 languages @@ -475,7 +475,7 @@ If used inside [R Markdown](https://rmarkdown.rstudio.com) or [Quarto](https://q ```r antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()), + antimicrobials = c(aminoglycosides(), carbapenems()), formatting_type = 14) ``` @@ -492,11 +492,11 @@ antibiogram(example_isolates, | *S. hominis* | | 92% (84-97%) | | | | 85% (74-93%) | | *S. pneumoniae* | 0% (0-3%) | 0% (0-3%) | | 0% (0-3%) | | 0% (0-3%) | -In combination antibiograms, it is clear that combined antibiotics yield higher empiric coverage: +In combination antibiograms, it is clear that combined antimicrobials yield higher empiric coverage: ```r antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain", formatting_type = 14) ``` @@ -510,7 +510,7 @@ Like many other functions in this package, `antibiogram()` comes with support fo ```r antibiogram(example_isolates, - antibiotics = c("cipro", "tobra", "genta"), # any arbitrary name or code will work + antimicrobials = c("cipro", "tobra", "genta"), # any arbitrary name or code will work mo_transform = "gramstain", ab_transform = "name", formatting_type = 14, @@ -1670,23 +1670,23 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antibiogram.Rd': } } \usage{ -antibiogram(x, antibiotics = where(is.sir), mo_transform = "shortname", +antibiogram(x, antimicrobials = where(is.sir), mo_transform = "shortname", ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE, only_all_tested = FALSE, digits = ifelse(wisca, 1, 0), formatting_type = getOption("AMR_antibiogram_formatting_type", ifelse(wisca, 14, 18)), col_mo = NULL, language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, sep = " + ", wisca = FALSE, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) + info = interactive(), ...) -wisca(x, antibiotics = where(is.sir), ab_transform = "name", +wisca(x, antimicrobials = where(is.sir), ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE, only_all_tested = FALSE, digits = 1, formatting_type = getOption("AMR_antibiogram_formatting_type", 14), col_mo = NULL, language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, sep = " + ", simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) + info = interactive(), ...) retrieve_wisca_parameters(wisca_model, ...) @@ -1700,7 +1700,7 @@ retrieve_wisca_parameters(wisca_model, ...) \arguments{ \item{x}{a \link{data.frame} containing at least a column with microorganisms and columns with antimicrobial results (class 'sir', see \code{\link[=as.sir]{as.sir()}})} -\item{antibiotics}{vector of any antimicrobial name or code (will be evaluated with \code{\link[=as.ab]{as.ab()}}, column name of \code{x}, or (any combinations of) \link[=antimicrobial_selectors]{antimicrobial selectors} such as \code{\link[=aminoglycosides]{aminoglycosides()}} or \code{\link[=carbapenems]{carbapenems()}}. For combination antibiograms, this can also be set to values separated with \code{"+"}, such as \code{"TZP+TOB"} or \code{"cipro + genta"}, given that columns resembling such antimicrobials exist in \code{x}. See \emph{Examples}.} +\item{antimicrobials}{vector of any antimicrobial name or code (will be evaluated with \code{\link[=as.ab]{as.ab()}}, column name of \code{x}, or (any combinations of) \link[=antimicrobial_selectors]{antimicrobial selectors} such as \code{\link[=aminoglycosides]{aminoglycosides()}} or \code{\link[=carbapenems]{carbapenems()}}. For combination antibiograms, this can also be set to values separated with \code{"+"}, such as \code{"TZP+TOB"} or \code{"cipro + genta"}, given that columns resembling such antimicrobials exist in \code{x}. See \emph{Examples}.} \item{mo_transform}{a character to transform microorganism input - must be \code{"name"}, \code{"shortname"} (default), \code{"gramstain"}, or one of the column names of the \link{microorganisms} data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". Can also be \code{NULL} to not transform the input or \code{NA} to consider all microorganisms 'unknown'.} @@ -1736,10 +1736,10 @@ retrieve_wisca_parameters(wisca_model, ...) \item{info}{a \link{logical} to indicate info should be printed - the default is \code{TRUE} only in interactive mode} -\item{wisca_model}{the outcome of \code{\link[=wisca]{wisca()}} or \code{\link[=antibiogram]{antibiogram(..., wisca = TRUE)}}} - \item{...}{when used in \link[knitr:kable]{R Markdown or Quarto}: arguments passed on to \code{\link[knitr:kable]{knitr::kable()}} (otherwise, has no use)} +\item{wisca_model}{the outcome of \code{\link[=wisca]{wisca()}} or \code{\link[=antibiogram]{antibiogram(..., wisca = TRUE)}}} + \item{object}{an \code{\link[=antibiogram]{antibiogram()}} object} \item{italicise}{a \link{logical} to indicate whether the microorganism names in the \link[knitr:kable]{knitr} table should be made italic, using \code{\link[=italicise_taxonomy]{italicise_taxonomy()}}.} @@ -1805,7 +1805,7 @@ Case example: Susceptibility of \emph{Pseudomonas aeruginosa} to piperacillin/ta Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = "TZP") + antimicrobials = "TZP") }\if{html}{\out{
}} \item \strong{Combination Antibiogram} @@ -1814,7 +1814,7 @@ Case example: Additional susceptibility of \emph{Pseudomonas aeruginosa} to TZP Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} \item \strong{Syndromic Antibiogram} @@ -1823,7 +1823,7 @@ Case example: Susceptibility of \emph{Pseudomonas aeruginosa} to TZP among respi Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = penicillins(), + antimicrobials = penicillins(), syndromic_group = "ward") }\if{html}{\out{
}} \item \strong{Weighted-Incidence Syndromic Combination Antibiogram (WISCA)} @@ -1833,12 +1833,12 @@ WISCA can be applied to any antibiogram, see the section \emph{Explaining WISCA} Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), wisca = TRUE) # this is equal to: wisca(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs). @@ -1854,7 +1854,7 @@ Code example: \if{html}{\out{
}}\preformatted{library(dplyr) your_data \%>\% group_by(has_sepsis, is_neonate, sex) \%>\% - wisca(antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} } @@ -1870,12 +1870,12 @@ At admission, no pathogen information is available. \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = NA) # all pathogens set to `NA` # preferred: use WISCA wisca(your_data, - antibiotics = selected_regimens) + antimicrobials = selected_regimens) }\if{html}{\out{
}} } \item \strong{Refinement with Gram Stain Results} @@ -1886,7 +1886,7 @@ When a blood culture becomes positive, the Gram stain provides an initial and cr \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = "gramstain") # all pathogens set to Gram-pos/Gram-neg }\if{html}{\out{
}} } @@ -1898,7 +1898,7 @@ After cultivation of the pathogen, full pathogen identification allows precise t \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = "shortname") # all pathogens set to 'G. species', e.g., E. coli }\if{html}{\out{
}} } @@ -1989,17 +1989,17 @@ example_isolates # Traditional antibiogram ---------------------------------------------- antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()) + antimicrobials = c(aminoglycosides(), carbapenems()) ) antibiogram(example_isolates, - antibiotics = aminoglycosides(), + antimicrobials = aminoglycosides(), ab_transform = "atc", mo_transform = "gramstain" ) antibiogram(example_isolates, - antibiotics = carbapenems(), + antimicrobials = carbapenems(), ab_transform = "name", mo_transform = "name" ) @@ -2007,15 +2007,15 @@ antibiogram(example_isolates, # Combined antibiogram ------------------------------------------------- -# combined antibiotics yield higher empiric coverage +# combined antimicrobials yield higher empiric coverage antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain" ) -# names of antibiotics do not need to resemble columns exactly: +# names of antimicrobials do not need to resemble columns exactly: antibiogram(example_isolates, - antibiotics = c("Cipro", "cipro + genta"), + antimicrobials = c("Cipro", "cipro + genta"), mo_transform = "gramstain", ab_transform = "name", sep = " & " @@ -2026,7 +2026,7 @@ antibiogram(example_isolates, # the data set could contain a filter for e.g. respiratory specimens antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()), + antimicrobials = c(aminoglycosides(), carbapenems()), syndromic_group = "ward" ) @@ -2036,7 +2036,7 @@ ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ] # with a custom language, though this will be determined automatically # (i.e., this table will be in Spanish on Spanish systems) antibiogram(ex1, - antibiotics = aminoglycosides(), + antimicrobials = aminoglycosides(), ab_transform = "name", syndromic_group = ifelse(ex1$ward == "ICU", "UCI", "No UCI" @@ -2049,7 +2049,7 @@ antibiogram(ex1, # WISCA are not stratified by species, but rather on syndromes antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), syndromic_group = "ward", wisca = TRUE ) @@ -2058,7 +2058,7 @@ antibiogram(example_isolates, # Print the output for R Markdown / Quarto ----------------------------- ureido <- antibiogram(example_isolates, - antibiotics = ureidopenicillins(), + antimicrobials = ureidopenicillins(), syndromic_group = "ward", wisca = TRUE ) @@ -2073,11 +2073,11 @@ if (requireNamespace("knitr")) { # Generate plots with ggplot2 or base R -------------------------------- ab1 <- antibiogram(example_isolates, - antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), + antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), mo_transform = "gramstain" ) ab2 <- antibiogram(example_isolates, - antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), + antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), mo_transform = "gramstain", syndromic_group = "ward" ) @@ -4287,7 +4287,7 @@ This AMR package honours this insight. Use \code{\link[=susceptibility]{suscepti \section{Combination Therapy}{ -When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: +When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: \if{html}{\out{
}}\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE @@ -7852,7 +7852,7 @@ The function \code{\link[=proportion_df]{proportion_df()}} takes any variable fr } \section{Combination Therapy}{ -When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: +When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: \if{html}{\out{
}}\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE diff --git a/index.md b/index.md index 4782b8e08..70a62db30 100644 --- a/index.md +++ b/index.md @@ -26,7 +26,7 @@ The `AMR` package is a [free and open-source](#copyright) R package with [zero d This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). -After installing this package, R knows [**~52,000 distinct microbial species**](./reference/microorganisms.html) (updated December 2022) and all [**~600 antimicrobial and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). +After installing this package, R knows [**~52,000 distinct microbial species**](./reference/microorganisms.html) (updated December 2022) and all [**~600 antimicrobial and antiviral drugs**](./reference/antimicrobials.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). ##### Used in over 175 countries, available in 20 languages @@ -81,7 +81,7 @@ If used inside [R Markdown](https://rmarkdown.rstudio.com) or [Quarto](https://q ```r antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()), + antimicrobials = c(aminoglycosides(), carbapenems()), formatting_type = 14) ``` @@ -98,11 +98,11 @@ antibiogram(example_isolates, | *S. hominis* | | 92% (84-97%) | | | | 85% (74-93%) | | *S. pneumoniae* | 0% (0-3%) | 0% (0-3%) | | 0% (0-3%) | | 0% (0-3%) | -In combination antibiograms, it is clear that combined antibiotics yield higher empiric coverage: +In combination antibiograms, it is clear that combined antimicrobials yield higher empiric coverage: ```r antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain", formatting_type = 14) ``` @@ -116,7 +116,7 @@ Like many other functions in this package, `antibiogram()` comes with support fo ```r antibiogram(example_isolates, - antibiotics = c("cipro", "tobra", "genta"), # any arbitrary name or code will work + antimicrobials = c("cipro", "tobra", "genta"), # any arbitrary name or code will work mo_transform = "gramstain", ab_transform = "name", formatting_type = 14, diff --git a/man/antibiogram.Rd b/man/antibiogram.Rd index 0412272f0..a5c87d67b 100644 --- a/man/antibiogram.Rd +++ b/man/antibiogram.Rd @@ -18,23 +18,23 @@ } } \usage{ -antibiogram(x, antibiotics = where(is.sir), mo_transform = "shortname", +antibiogram(x, antimicrobials = where(is.sir), mo_transform = "shortname", ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE, only_all_tested = FALSE, digits = ifelse(wisca, 1, 0), formatting_type = getOption("AMR_antibiogram_formatting_type", ifelse(wisca, 14, 18)), col_mo = NULL, language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, sep = " + ", wisca = FALSE, simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) + info = interactive(), ...) -wisca(x, antibiotics = where(is.sir), ab_transform = "name", +wisca(x, antimicrobials = where(is.sir), ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE, only_all_tested = FALSE, digits = 1, formatting_type = getOption("AMR_antibiogram_formatting_type", 14), col_mo = NULL, language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, sep = " + ", simulations = 1000, conf_interval = 0.95, interval_side = "two-tailed", - info = interactive()) + info = interactive(), ...) retrieve_wisca_parameters(wisca_model, ...) @@ -48,7 +48,7 @@ retrieve_wisca_parameters(wisca_model, ...) \arguments{ \item{x}{a \link{data.frame} containing at least a column with microorganisms and columns with antimicrobial results (class 'sir', see \code{\link[=as.sir]{as.sir()}})} -\item{antibiotics}{vector of any antimicrobial name or code (will be evaluated with \code{\link[=as.ab]{as.ab()}}, column name of \code{x}, or (any combinations of) \link[=antimicrobial_selectors]{antimicrobial selectors} such as \code{\link[=aminoglycosides]{aminoglycosides()}} or \code{\link[=carbapenems]{carbapenems()}}. For combination antibiograms, this can also be set to values separated with \code{"+"}, such as \code{"TZP+TOB"} or \code{"cipro + genta"}, given that columns resembling such antimicrobials exist in \code{x}. See \emph{Examples}.} +\item{antimicrobials}{vector of any antimicrobial name or code (will be evaluated with \code{\link[=as.ab]{as.ab()}}, column name of \code{x}, or (any combinations of) \link[=antimicrobial_selectors]{antimicrobial selectors} such as \code{\link[=aminoglycosides]{aminoglycosides()}} or \code{\link[=carbapenems]{carbapenems()}}. For combination antibiograms, this can also be set to values separated with \code{"+"}, such as \code{"TZP+TOB"} or \code{"cipro + genta"}, given that columns resembling such antimicrobials exist in \code{x}. See \emph{Examples}.} \item{mo_transform}{a character to transform microorganism input - must be \code{"name"}, \code{"shortname"} (default), \code{"gramstain"}, or one of the column names of the \link{microorganisms} data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". Can also be \code{NULL} to not transform the input or \code{NA} to consider all microorganisms 'unknown'.} @@ -84,10 +84,10 @@ retrieve_wisca_parameters(wisca_model, ...) \item{info}{a \link{logical} to indicate info should be printed - the default is \code{TRUE} only in interactive mode} -\item{wisca_model}{the outcome of \code{\link[=wisca]{wisca()}} or \code{\link[=antibiogram]{antibiogram(..., wisca = TRUE)}}} - \item{...}{when used in \link[knitr:kable]{R Markdown or Quarto}: arguments passed on to \code{\link[knitr:kable]{knitr::kable()}} (otherwise, has no use)} +\item{wisca_model}{the outcome of \code{\link[=wisca]{wisca()}} or \code{\link[=antibiogram]{antibiogram(..., wisca = TRUE)}}} + \item{object}{an \code{\link[=antibiogram]{antibiogram()}} object} \item{italicise}{a \link{logical} to indicate whether the microorganism names in the \link[knitr:kable]{knitr} table should be made italic, using \code{\link[=italicise_taxonomy]{italicise_taxonomy()}}.} @@ -153,7 +153,7 @@ Case example: Susceptibility of \emph{Pseudomonas aeruginosa} to piperacillin/ta Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = "TZP") + antimicrobials = "TZP") }\if{html}{\out{
}} \item \strong{Combination Antibiogram} @@ -162,7 +162,7 @@ Case example: Additional susceptibility of \emph{Pseudomonas aeruginosa} to TZP Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} \item \strong{Syndromic Antibiogram} @@ -171,7 +171,7 @@ Case example: Susceptibility of \emph{Pseudomonas aeruginosa} to TZP among respi Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = penicillins(), + antimicrobials = penicillins(), syndromic_group = "ward") }\if{html}{\out{
}} \item \strong{Weighted-Incidence Syndromic Combination Antibiogram (WISCA)} @@ -181,12 +181,12 @@ WISCA can be applied to any antibiogram, see the section \emph{Explaining WISCA} Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), wisca = TRUE) # this is equal to: wisca(your_data, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs). @@ -202,7 +202,7 @@ Code example: \if{html}{\out{
}}\preformatted{library(dplyr) your_data \%>\% group_by(has_sepsis, is_neonate, sex) \%>\% - wisca(antibiotics = c("TZP", "TZP+TOB", "TZP+GEN")) + wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) }\if{html}{\out{
}} } @@ -218,12 +218,12 @@ At admission, no pathogen information is available. \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = NA) # all pathogens set to `NA` # preferred: use WISCA wisca(your_data, - antibiotics = selected_regimens) + antimicrobials = selected_regimens) }\if{html}{\out{
}} } \item \strong{Refinement with Gram Stain Results} @@ -234,7 +234,7 @@ When a blood culture becomes positive, the Gram stain provides an initial and cr \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = "gramstain") # all pathogens set to Gram-pos/Gram-neg }\if{html}{\out{
}} } @@ -246,7 +246,7 @@ After cultivation of the pathogen, full pathogen identification allows precise t \item Code example: \if{html}{\out{
}}\preformatted{antibiogram(your_data, - antibiotics = selected_regimens, + antimicrobials = selected_regimens, mo_transform = "shortname") # all pathogens set to 'G. species', e.g., E. coli }\if{html}{\out{
}} } @@ -337,17 +337,17 @@ example_isolates # Traditional antibiogram ---------------------------------------------- antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()) + antimicrobials = c(aminoglycosides(), carbapenems()) ) antibiogram(example_isolates, - antibiotics = aminoglycosides(), + antimicrobials = aminoglycosides(), ab_transform = "atc", mo_transform = "gramstain" ) antibiogram(example_isolates, - antibiotics = carbapenems(), + antimicrobials = carbapenems(), ab_transform = "name", mo_transform = "name" ) @@ -355,15 +355,15 @@ antibiogram(example_isolates, # Combined antibiogram ------------------------------------------------- -# combined antibiotics yield higher empiric coverage +# combined antimicrobials yield higher empiric coverage antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain" ) -# names of antibiotics do not need to resemble columns exactly: +# names of antimicrobials do not need to resemble columns exactly: antibiogram(example_isolates, - antibiotics = c("Cipro", "cipro + genta"), + antimicrobials = c("Cipro", "cipro + genta"), mo_transform = "gramstain", ab_transform = "name", sep = " & " @@ -374,7 +374,7 @@ antibiogram(example_isolates, # the data set could contain a filter for e.g. respiratory specimens antibiogram(example_isolates, - antibiotics = c(aminoglycosides(), carbapenems()), + antimicrobials = c(aminoglycosides(), carbapenems()), syndromic_group = "ward" ) @@ -384,7 +384,7 @@ ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ] # with a custom language, though this will be determined automatically # (i.e., this table will be in Spanish on Spanish systems) antibiogram(ex1, - antibiotics = aminoglycosides(), + antimicrobials = aminoglycosides(), ab_transform = "name", syndromic_group = ifelse(ex1$ward == "ICU", "UCI", "No UCI" @@ -397,7 +397,7 @@ antibiogram(ex1, # WISCA are not stratified by species, but rather on syndromes antibiogram(example_isolates, - antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), + antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), syndromic_group = "ward", wisca = TRUE ) @@ -406,7 +406,7 @@ antibiogram(example_isolates, # Print the output for R Markdown / Quarto ----------------------------- ureido <- antibiogram(example_isolates, - antibiotics = ureidopenicillins(), + antimicrobials = ureidopenicillins(), syndromic_group = "ward", wisca = TRUE ) @@ -421,11 +421,11 @@ if (requireNamespace("knitr")) { # Generate plots with ggplot2 or base R -------------------------------- ab1 <- antibiogram(example_isolates, - antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), + antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), mo_transform = "gramstain" ) ab2 <- antibiogram(example_isolates, - antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"), + antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"), mo_transform = "gramstain", syndromic_group = "ward" ) diff --git a/man/count.Rd b/man/count.Rd index 4b7aed3f1..3603024d1 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -85,7 +85,7 @@ This AMR package honours this insight. Use \code{\link[=susceptibility]{suscepti \section{Combination Therapy}{ -When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: +When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: \if{html}{\out{
}}\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE diff --git a/man/proportion.Rd b/man/proportion.Rd index a63358a57..a26f5c728 100644 --- a/man/proportion.Rd +++ b/man/proportion.Rd @@ -99,7 +99,7 @@ The function \code{\link[=proportion_df]{proportion_df()}} takes any variable fr } \section{Combination Therapy}{ -When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: +When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI: \if{html}{\out{
}}\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE