From 30caa5e654980d272904fd389e54e18f34471914 Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Tue, 29 Apr 2025 16:31:38 +0200 Subject: [PATCH] (v2.1.1.9262) fix knit printing --- DESCRIPTION | 2 +- NEWS.md | 2 +- data-raw/_pre_commit_checks.R | 2 +- index.md | 37 +++++++++++++++++------------------ 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3522c7b49..7bced315a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9261 +Version: 2.1.1.9262 Date: 2025-04-29 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 1bdc13fb4..558f5b009 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9261 +# AMR 2.1.1.9262 *(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://amr-for-r.org/#get-this-package).)* diff --git a/data-raw/_pre_commit_checks.R b/data-raw/_pre_commit_checks.R index df4516d95..e124be975 100644 --- a/data-raw/_pre_commit_checks.R +++ b/data-raw/_pre_commit_checks.R @@ -657,7 +657,7 @@ if (files_changed()) { } # Update index.md and README.md ------------------------------------------- -if (files_changed("man/microorganisms.Rd") | files_changed("man/antimicrobials.Rd") | files_changed("man/clinical_breakpoints.Rd") | files_changed("man/antibiogram.Rd")) { +if (files_changed("man/microorganisms.Rd") | files_changed("man/antimicrobials.Rd") | files_changed("man/clinical_breakpoints.Rd") | files_changed("man/antibiogram.Rd") | files_changed("R/antibiogram.R")) { usethis::ui_info("Rendering {usethis::ui_field('index.md')} and {usethis::ui_field('README.md')}") suppressWarnings(rmarkdown::render("index.Rmd", quiet = TRUE)) suppressWarnings(rmarkdown::render("README.Rmd", quiet = TRUE)) diff --git a/index.md b/index.md index 2e9f40a5e..aec3d208f 100644 --- a/index.md +++ b/index.md @@ -155,10 +155,9 @@ example_isolates %>% #> ℹ Using column 'mo' as input for mo_fullname() #> ℹ Using column 'mo' as input for mo_is_gram_negative() #> ℹ Using column 'mo' as input for mo_is_intrinsic_resistant() -#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant -#> Phenotypes' v1.2 (2023). This note will be shown once per session. -#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant Phenotypes' v1.2 (2023). This note will be shown once per +#> session. +#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem) #> # A tibble: 35 × 7 #> bacteria GEN TOB AMK KAN IPM MEM @@ -196,23 +195,23 @@ output format automatically (such as markdown, LaTeX, HTML, etc.). ``` r antibiogram(example_isolates, antimicrobials = c(aminoglycosides(), carbapenems())) -#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem) +#> ℹ 502 combinations had less than minimum = 30 results and were ignored ``` | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin | |:---|:---|:---|:---|:---|:---|:---| | CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) | -| E. coli | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | | 100% (99-100%,N=418) | 97% (96-99%,N=462) | -| E. faecalis | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | | 0% (0-9%,N=39) | -| K. pneumoniae | | 90% (79-96%,N=58) | 100% (93-100%,N=51) | | 100% (93-100%,N=53) | 90% (79-96%,N=58) | -| P. aeruginosa | | 100% (88-100%,N=30) | | 0% (0-12%,N=30) | | 100% (88-100%,N=30) | -| P. mirabilis | | 94% (80-99%,N=34) | 94% (79-99%,N=32) | | | 94% (80-99%,N=34) | -| S. aureus | | 99% (97-100%,N=233) | | | | 98% (92-100%,N=86) | -| S. epidermidis | 0% (0-8%,N=44) | 79% (71-85%,N=163) | | 0% (0-8%,N=44) | | 51% (40-61%,N=89) | -| S. hominis | | 92% (84-97%,N=80) | | | | 85% (74-93%,N=62) | -| S. pneumoniae | 0% (0-3%,N=117) | 0% (0-3%,N=117) | | 0% (0-3%,N=117) | | 0% (0-3%,N=117) | +| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) | +| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) | +| *K. pneumoniae* | NA | 90% (79-96%,N=58) | 100% (93-100%,N=51) | NA | 100% (93-100%,N=53) | 90% (79-96%,N=58) | +| *P. aeruginosa* | NA | 100% (88-100%,N=30) | NA | 0% (0-12%,N=30) | NA | 100% (88-100%,N=30) | +| *P. mirabilis* | NA | 94% (80-99%,N=34) | 94% (79-99%,N=32) | NA | NA | 94% (80-99%,N=34) | +| *S. aureus* | NA | 99% (97-100%,N=233) | NA | NA | NA | 98% (92-100%,N=86) | +| *S. epidermidis* | 0% (0-8%,N=44) | 79% (71-85%,N=163) | NA | 0% (0-8%,N=44) | NA | 51% (40-61%,N=89) | +| *S. hominis* | NA | 92% (84-97%,N=80) | NA | NA | NA | 85% (74-93%,N=62) | +| *S. pneumoniae* | 0% (0-3%,N=117) | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) | In combination antibiograms, it is clear that combined antimicrobials yield higher empiric coverage: @@ -221,6 +220,7 @@ yield higher empiric coverage: antibiogram(example_isolates, antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain") +#> ℹ 3 combinations had less than minimum = 30 results and were ignored ``` | Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin | @@ -238,6 +238,7 @@ antibiogram(example_isolates, mo_transform = "gramstain", ab_transform = "name", language = "uk") # Ukrainian +#> ℹ 3 combinations had less than minimum = 30 results and were ignored ``` | Збудник | Гентаміцин | Тобраміцин | Ципрофлоксацин | @@ -321,15 +322,13 @@ out <- example_isolates %>% # calculate AMR using resistance(), over all aminoglycosides and polymyxins: summarise(across(c(aminoglycosides(), polymyxins()), resistance)) -#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For polymyxins() using column 'COL' (colistin) #> Warning: There was 1 warning in `summarise()`. #> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`. #> ℹ In group 3: `ward = "Outpatient"`. #> Caused by warning: -#> ! Introducing NA: only 23 results available for KAN in group: ward = -#> "Outpatient" (minimum = 30). +#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient" (minimum = 30). out #> # A tibble: 3 × 6 #> ward GEN TOB AMK KAN COL