diff --git a/DESCRIPTION b/DESCRIPTION index 6ae22229..ca6e078b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.8.2.9128 +Version: 1.8.2.9129 Date: 2023-02-15 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 456fd157..b6520b91 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.8.2.9128 +# AMR 1.8.2.9129 *(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)* diff --git a/R/antibiogram.R b/R/antibiogram.R index 2a021431..97893ce4 100755 --- a/R/antibiogram.R +++ b/R/antibiogram.R @@ -102,7 +102,7 @@ #' "Study Group", "Control Group")) #' ``` #' -#' All types of antibiograms can be generated with the functions as described on this page, and can be plotted (using [ggplot2::autoplot()] or base \R [plot()]/[barplot()]) or printed into R Markdown / Quarto formats for reports. Use functions from specific 'table reporting' packages to transform the output of [antibiogram()] to your needs, e.g. `flextable::as_flextable()` or `gt::gt()`. +#' All types of antibiograms can be generated with the functions as described on this page, and can be plotted (using [ggplot2::autoplot()] or base \R [plot()]/[barplot()]) or printed into R Markdown / Quarto formats for reports using `print()`. Use functions from specific 'table reporting' packages to transform the output of [antibiogram()] to your needs, e.g. `flextable::as_flextable()` or `gt::gt()`. #' #' Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the `only_all_tested` argument (defaults to `FALSE`). See this example for two antibiotics, Drug A and Drug B, about how [antibiogram()] works to calculate the %SI: #' diff --git a/index.md b/index.md index 1dffa9ce..312b0696 100644 --- a/index.md +++ b/index.md @@ -78,7 +78,7 @@ This base R snippet will work in any version of R since April 2013 (R-3.0). The `AMR` package supports generating traditional, combined, syndromic, and even weighted-incidence syndromic combination antibiograms (WISCA). -If used inside R Markdown or Quarto, the table will be printed in the right output format automatically (such as markdown, LaTeX, HTML, etc.). +If used inside R Markdown or Quarto, the table will be printed in the right output format automatically (such as markdown, LaTeX, HTML, etc.) when using `print()` on an antibiogram object. ```r antibiogram(example_isolates, @@ -111,6 +111,21 @@ antibiogram(example_isolates, |Gram-negative (641-693) | 88| 99| 98| |Gram-positive (345-1044) | 86| 98| 95| +Like many other functions in this package, `antibiograms()` comes with support for 20 languages that are often detected automatically based on system language: + +```r +antibiogram(example_isolates, + antibiotics = c("CIP", "TOB", "GEN"), + mo_transform = "gramstain", + ab_transform = "name", + language = "uk") # Ukrainian +``` + +|Збудник (N min-max) | Гентаміцин| Тобраміцин| Ципрофлоксацин| +|:------------------------|----------:|----------:|--------------:| +|Грамнегативні (684-686) | 96| 96| 91| +|Грампозитивні (665-1170) | 63| 34| 77| + #### Calculating resistance per group diff --git a/man/antibiogram.Rd b/man/antibiogram.Rd index d0eedd66..a02c14b6 100644 --- a/man/antibiogram.Rd +++ b/man/antibiogram.Rd @@ -124,7 +124,7 @@ your_data \%>\% }\if{html}{\out{}} } -All types of antibiograms can be generated with the functions as described on this page, and can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R \code{\link[=plot]{plot()}}/\code{\link[=barplot]{barplot()}}) or printed into R Markdown / Quarto formats for reports. Use functions from specific 'table reporting' packages to transform the output of \code{\link[=antibiogram]{antibiogram()}} to your needs, e.g. \code{flextable::as_flextable()} or \code{gt::gt()}. +All types of antibiograms can be generated with the functions as described on this page, and can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R \code{\link[=plot]{plot()}}/\code{\link[=barplot]{barplot()}}) or printed into R Markdown / Quarto formats for reports using \code{print()}. Use functions from specific 'table reporting' packages to transform the output of \code{\link[=antibiogram]{antibiogram()}} to your needs, e.g. \code{flextable::as_flextable()} or \code{gt::gt()}. Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the \code{only_all_tested} argument (defaults to \code{FALSE}). See this example for two antibiotics, Drug A and Drug B, about how \code{\link[=antibiogram]{antibiogram()}} works to calculate the \%SI: diff --git a/pkgdown/extra.js b/pkgdown/extra.js index fe1b1b77..e265d270 100644 --- a/pkgdown/extra.js +++ b/pkgdown/extra.js @@ -52,7 +52,7 @@ $(document).ready(function() { // add doctoral titles to authors function doct_tit(x) { if (typeof(x) != "undefined") { - x = x.replace(/Author, maintainer/g, "Principle developer"); + x = x.replace(/Author, maintainer/g, "Principle maintainer"); x = x.replace(/Author, contributor/g, "Contributing maintainer"); x = x.replace(/Thesis advisor/g, "(former) Doctoral advisor"); // contributors