Browse Source

(v0.8.0.9017) keywords update

new-mo-algorithm
parent
commit
e2d05cb1b0
  1. 2
      .Rbuildignore
  2. 4
      DESCRIPTION
  3. 4
      NEWS.md
  4. 1
      R/ab.R
  5. 1
      R/ab_property.R
  6. 1
      R/age.R
  7. 1
      R/count.R
  8. 2
      R/disk.R
  9. 2
      R/eucast_rules.R
  10. 1
      R/filter_ab_class.R
  11. 1
      R/first_isolate.R
  12. 1
      R/g.test.R
  13. 5
      R/like.R
  14. 42
      R/mdro.R
  15. 2
      R/mic.R
  16. 1
      R/portion.R
  17. 4
      R/rsi.R
  18. 2
      appveyor.yml
  19. 2
      docs/404.html
  20. 2
      docs/LICENSE-text.html
  21. 2
      docs/articles/index.html
  22. 2
      docs/authors.html
  23. 2
      docs/index.html
  24. 10
      docs/news/index.html
  25. 2
      docs/reference/ab_property.html
  26. 2
      docs/reference/age_groups.html
  27. 2
      docs/reference/as.ab.html
  28. 2
      docs/reference/as.disk.html
  29. 2
      docs/reference/as.mic.html
  30. 4
      docs/reference/as.rsi.html
  31. 4
      docs/reference/count.html
  32. 2
      docs/reference/eucast_rules.html
  33. 2
      docs/reference/filter_ab_class.html
  34. 2
      docs/reference/first_isolate.html
  35. 2
      docs/reference/g.test.html
  36. 2
      docs/reference/index.html
  37. 7
      docs/reference/like.html
  38. 31
      docs/reference/mdro.html
  39. 4
      docs/reference/portion.html
  40. 1
      man/ab_property.Rd
  41. 2
      man/age_groups.Rd
  42. 1
      man/as.ab.Rd
  43. 2
      man/as.disk.Rd
  44. 2
      man/as.mic.Rd
  45. 4
      man/as.rsi.Rd
  46. 8
      man/count.Rd
  47. 5
      man/eucast_rules.Rd
  48. 2
      man/filter_ab_class.Rd
  49. 3
      man/first_isolate.Rd
  50. 1
      man/g.test.Rd
  51. 5
      man/like.Rd
  52. 30
      man/mdro.Rd
  53. 9
      man/portion.Rd
  54. 193
      tests/appveyor/appveyor_tool.ps1
  55. 428
      tests/appveyor/travis_tool.sh

2
.Rbuildignore

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
^pkgdown$
^public$
^data-raw$
R/aa_test.R$
^\.lintr$
^vignettes/benchmark.*
^vignettes/SPSS.*
^tests/appveyor$

4
DESCRIPTION

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Package: AMR
Version: 0.8.0.9016
Date: 2019-11-05
Version: 0.8.0.9017
Date: 2019-11-06
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(role = c("aut", "cre"),

4
NEWS.md

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
# AMR 0.8.0.9016
<small>Last updated: 05-Nov-2019</small>
# AMR 0.8.0.9017
<small>Last updated: 06-Nov-2019</small>
### New
* Support for a new MDRO guideline: Magiorakos AP, Srinivasan A *et al.* "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." Clinical Microbiology and Infection (2012).

1
R/ab.R

@ -25,7 +25,6 @@ @@ -25,7 +25,6 @@
#' @param x character vector to determine to antibiotic ID
#' @param ... arguments passed on to internal functions
#' @rdname as.ab
#' @keywords atc
#' @inheritSection WHOCC WHOCC
#' @export
#' @importFrom dplyr %>% filter slice pull

1
R/ab_property.R

@ -83,6 +83,7 @@ ab_name <- function(x, language = get_locale(), tolower = FALSE, ...) { @@ -83,6 +83,7 @@ ab_name <- function(x, language = get_locale(), tolower = FALSE, ...) {
}
#' @rdname ab_property
#' @aliases ATC
#' @export
ab_atc <- function(x, ...) {
ab_validate(x = x, property = "atc", ...)

1
R/age.R

@ -106,7 +106,6 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE) { @@ -106,7 +106,6 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE) {
#' \item{\code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29, ... 80-89, 90-99, 100+.}
#' }
#' }
#' @keywords age_group age
#' @return Ordered \code{\link{factor}}
#' @seealso To determine ages, based on one or more reference dates, use the \code{\link{age}} function.
#' @export

1
R/count.R

@ -37,7 +37,6 @@ @@ -37,7 +37,6 @@
#' @inheritSection portion Combination therapy
#' @source Wickham H. \strong{Tidy Data.} The Journal of Statistical Software, vol. 59, 2014. \url{http://vita.had.co.nz/papers/tidy-data.html}
#' @seealso \code{\link{portion}_*} to calculate microbial resistance and susceptibility.
#' @keywords resistance susceptibility rsi antibiotics isolate isolates
#' @return Integer
#' @rdname count
#' @name count

2
R/disk.R

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#' @param na.rm a logical indicating whether missing values should be removed
#' @details Interpret disk values as RSI values with \code{\link{as.rsi}}. It supports guidelines from EUCAST and CLSI.
#' @return Ordered integer factor with new class \code{disk}
#' @keywords disk
#' @aliases disk
#' @export
#' @seealso \code{\link{as.rsi}}
#' @inheritSection AMR Read more on our website!

2
R/eucast_rules.R

@ -122,7 +122,7 @@ EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016" @@ -122,7 +122,7 @@ EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016"
#' \strong{TMP}: trimethoprim (\href{https://www.whocc.no/atc_ddd_index/?code=J01EA01}{J01EA01}),
#' \strong{SXT}: trimethoprim/sulfamethoxazole (\href{https://www.whocc.no/atc_ddd_index/?code=J01EE01}{J01EE01}),
#' \strong{VAN}: vancomycin (\href{https://www.whocc.no/atc_ddd_index/?code=J01XA01}{J01XA01}).
#' @keywords interpretive eucast reading resistance
#' @aliases EUCAST
#' @rdname eucast_rules
#' @export
#' @importFrom dplyr %>% select pull mutate_at vars group_by summarise n

1
R/filter_ab_class.R

@ -29,7 +29,6 @@ @@ -29,7 +29,6 @@
#' @param ... parameters passed on to \code{filter_at} from the \code{dplyr} package
#' @details The \code{group} column in \code{\link{antibiotics}} data set will be searched for \code{ab_class} (case-insensitive). If no results are found, the \code{atc_group1} and \code{atc_group2} columns will be searched. Next, \code{x} will be checked for column names with a value in any abbreviations, codes or official names found in the \code{antibiotics} data set.
#' @rdname filter_ab_class
#' @keywords filter fillter_class
#' @importFrom dplyr filter_at %>% select vars any_vars all_vars
#' @importFrom crayon bold blue
#' @export

1
R/first_isolate.R

@ -70,7 +70,6 @@ @@ -70,7 +70,6 @@
#' \strong{2. Using} \code{type = "points"} \strong{and parameter} \code{points_threshold} \cr
#' A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which default to \code{2}, an isolate will be (re)selected as a first weighted isolate.
#' @rdname first_isolate
#' @keywords isolate isolates first
#' @seealso \code{\link{key_antibiotics}}
#' @export
#' @importFrom dplyr arrange_at lag between row_number filter mutate arrange pull ungroup

1
R/g.test.R

@ -61,7 +61,6 @@ @@ -61,7 +61,6 @@
#' where \code{df} are the degrees of freedom.
#'
#' If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use \emph{G}-tests for each category, of course.
#' @keywords chi
#' @seealso \code{\link{chisq.test}}
#' @references [1] McDonald, J.H. 2014. \strong{Handbook of Biological Statistics (3rd ed.)}. Sparky House Publishing, Baltimore, Maryland. \url{http://www.biostathandbook.com/gtestgof.html}.
#' @source This code is almost identical to \code{\link{chisq.test}}, except that:

5
R/like.R

@ -49,9 +49,8 @@ @@ -49,9 +49,8 @@
#' # get frequencies of bacteria whose name start with 'Ent' or 'ent'
#' library(dplyr)
#' example_isolates %>%
#' left_join_microorganisms() %>%
#' filter(genus %like% '^ent') %>%
#' freq(genus, species)
#' filter(mo_genus(mo) %like% '^ent') %>%
#' freq(mo_fullname(mo))
like <- function(x, pattern, ignore.case = TRUE) {
if (length(pattern) > 1) {
if (length(x) != length(pattern)) {

42
R/mdro.R

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
#' @param info print progress
#' @inheritParams eucast_rules
#' @param pct_required_classes minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.
#' @param combine_SI a logical to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the \code{mdro()} function, it follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using \code{combine_SI = FALSE}, resistance is considered when isolates are R or I.
#' @param verbose a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
#' @inheritSection eucast_rules Antibiotics
#' @details
@ -43,7 +44,7 @@ @@ -43,7 +44,7 @@
#' Please suggest your own (country-specific) guidelines by letting us know: \url{https://gitlab.com/msberends/AMR/issues/new}.
#'
#' \strong{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 \emph{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 \code{mdro()} function makes sure that results from before 2016 and after 2016 are identical.
#'
#' @inheritSection as.rsi Interpretation of S, I and R
#' @return \itemize{
#' \item{CMI 2012 paper - function \code{mdr_cmi2012()} or \code{mdro()}:\cr Ordered factor with levels \code{Negative < Multi-drug-resistant (MDR) < Extensively drug-resistant (XDR) < Pandrug-resistant (PDR)}}
#' \item{TB guideline - function \code{mdr_tb()} or \code{mdro(..., guideline = "TB")}:\cr Ordered factor with levels \code{Negative < Mono-resistant < Poly-resistant < Multi-drug-resistant < Extensively drug-resistant}}
@ -51,6 +52,7 @@ @@ -51,6 +52,7 @@
#' \item{Everything else:\cr Ordered factor with levels \code{Negative < Positive, unconfirmed < Positive}. The value \code{"Positive, unconfirmed"} means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. molecular) tests}
#' }
#' @rdname mdro
#' @aliases MDR XDR PDR BRMO 3MRGN 4MRGN
#' @importFrom dplyr %>% filter_at vars all_vars pull mutate_at
#' @importFrom crayon blue bold italic
#' @importFrom cleaner percentage
@ -80,8 +82,9 @@ mdro <- function(x, @@ -80,8 +82,9 @@ mdro <- function(x,
guideline = NULL,
col_mo = NULL,
info = TRUE,
verbose = FALSE,
pct_required_classes = 0.5,
combine_SI = TRUE,
verbose = FALSE,
...) {
if (verbose == TRUE & interactive()) {
@ -109,7 +112,7 @@ mdro <- function(x, @@ -109,7 +112,7 @@ mdro <- function(x,
# allow pct_required_classes = 75 -> pct_required_classes = 0.75
pct_required_classes <- pct_required_classes / 100
}
if (!is.null(list(...)$country)) {
warning("Using `country` is deprecated, use `guideline` instead. Please see ?mdro.", call. = FALSE)
guideline <- list(...)$country
@ -410,8 +413,19 @@ mdro <- function(x, @@ -410,8 +413,19 @@ mdro <- function(x,
if (guideline$code == "tb" & length(abx_tb) == 0) {
stop("No antimycobacterials found in data set.", call. = FALSE)
}
if (combine_SI == TRUE) {
search_result <- "R"
} else {
search_result <- c("R", "I")
}
if (info == TRUE) {
if (combine_SI == TRUE) {
cat("\nOnly results with 'R' are considered as resistance. Use `combine_SI = FALSE` to also consider 'I' as resistance.\n")
} else {
cat("\nResults with 'R' or 'I' are considered as resistance. Use `combine_SI = TRUE` to only consider 'R' as resistance.\n")
}
cat("\nDetermining multidrug-resistant organisms (MDRO), according to:\n",
bold("Guideline: "), italic(guideline$name), "\n",
bold("Version: "), guideline$version, "\n",
@ -444,19 +458,21 @@ mdro <- function(x, @@ -444,19 +458,21 @@ mdro <- function(x,
x <<- x %>% mutate_at(vars(cols), as.rsi)
x[rows, "columns_nonsusceptible"] <<- sapply(rows,
function(row, group_vct = cols) {
cols_nonsus <- sapply(x[row, group_vct, drop = FALSE], function(y) y == "R")
cols_nonsus <- sapply(x[row, group_vct, drop = FALSE],
function(y) y %in% search_result)
paste(sort(c(unlist(strsplit(x[row, "columns_nonsusceptible", drop = TRUE], ", ")),
names(cols_nonsus)[cols_nonsus])),
collapse = ", ")
})
if (any_all == "any") {
row_filter <- which(x[, cols] == "R")
search_function <- dplyr::any_vars
} else if (any_all == "all") {
row_filter <- x %>%
mutate(index = seq_len(nrow(.))) %>%
filter_at(vars(cols), all_vars(. == "R")) %>%
pull((index))
search_function <- dplyr::all_vars
}
row_filter <- x %>%
filter_at(vars(cols), search_function(. %in% search_result)) %>%
pull("row_number")
rows <- rows[rows %in% row_filter]
x[rows, "MDRO"] <<- to
x[rows, "reason"] <<- paste0(any_all, " of the required antibiotics ", ifelse(any_all == "any", "is", "are"), " R")
@ -479,7 +495,7 @@ mdro <- function(x, @@ -479,7 +495,7 @@ mdro <- function(x,
if (verbose == TRUE) {
x[rows, "columns_nonsusceptible"] <<- sapply(rows,
function(row, group_vct = lst_vector) {
cols_nonsus <- sapply(x[row, group_vct, drop = FALSE], function(y) y %in% c("I", "R"))
cols_nonsus <- sapply(x[row, group_vct, drop = FALSE], function(y) y %in% search_result)
paste(sort(names(cols_nonsus)[cols_nonsus]), collapse = ", ")
})
}
@ -487,14 +503,14 @@ mdro <- function(x, @@ -487,14 +503,14 @@ mdro <- function(x,
function(row, group_tbl = lst) {
sum(sapply(group_tbl,
function(group) {
any(x[row, group[!is.na(group)]] == "R", na.rm = TRUE) |
any(x[row, group[!is.na(group)]] == "I", na.rm = TRUE)
any(unlist(x[row, group[!is.na(group)], drop = TRUE]) %in% search_result, na.rm = TRUE)
}),
na.rm = TRUE)
})
# for PDR; all agents are R (or I if combine_SI = FALSE)
x[filter_at(x[rows, ],
vars(lst_vector),
all_vars(. %in% c("R", "I")))$row_number, "classes_affected"] <<- 999
all_vars(. %in% search_result))$row_number, "classes_affected"] <<- 999
}
if (info == TRUE) {

2
R/mic.R

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#' @param na.rm a logical indicating whether missing values should be removed
#' @details Interpret MIC values as RSI values with \code{\link{as.rsi}}. It supports guidelines from EUCAST and CLSI.
#' @return Ordered factor with new class \code{mic}
#' @keywords mic
#' @aliases MIC
#' @export
#' @importFrom dplyr %>%
#' @seealso \code{\link{as.rsi}}

1
R/portion.R

@ -79,7 +79,6 @@ @@ -79,7 +79,6 @@
#'
#' Wickham H. \strong{Tidy Data.} The Journal of Statistical Software, vol. 59, 2014. \url{http://vita.had.co.nz/papers/tidy-data.html}
#' @seealso \code{\link[AMR]{count}_*} to count resistant and susceptible isolates.
#' @keywords resistance susceptibility rsi_df rsi antibiotics isolate isolates
#' @return Double or, when \code{as_percent = TRUE}, a character.
#' @rdname portion
#' @name portion

4
R/rsi.R

@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
#'
#' The function \code{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:
#' In 2019, 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 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".
#'
#' \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.}
@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
#'
#' This AMR package honours this new insight. Use \code{\link{portion_SI}} to determine antimicrobial susceptibility and \code{\link{count_SI}} to count susceptible isolates.
#' @return Ordered factor with new class \code{rsi}
#' @keywords rsi
#' @aliases RSI
#' @export
#' @importFrom dplyr %>% desc arrange filter
#' @seealso \code{\link{as.mic}}

2
appveyor.yml

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest https://raw.githubusercontent.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Invoke-WebRequest https://gitlab.com/msberends/AMR/raw/master/tests/appveyor/appveyor_tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:

2
docs/404.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/LICENSE-text.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/articles/index.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/authors.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/index.html

@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

10
docs/news/index.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -231,11 +231,11 @@ @@ -231,11 +231,11 @@
</div>
<div id="amr-0-8-0-9016" class="section level1">
<div id="amr-0-8-0-9017" class="section level1">
<h1 class="page-header">
<a href="#amr-0-8-0-9016" class="anchor"></a>AMR 0.8.0.9016<small> Unreleased </small>
<a href="#amr-0-8-0-9017" class="anchor"></a>AMR 0.8.0.9017<small> Unreleased </small>
</h1>
<p><small>Last updated: 05-Nov-2019</small></p>
<p><small>Last updated: 06-Nov-2019</small></p>
<div id="new" class="section level3">
<h3 class="hasAnchor">
<a href="#new" class="anchor"></a>New</h3>
@ -1333,7 +1333,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a @@ -1333,7 +1333,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0-8-0-9016">0.8.0.9016</a></li>
<li><a href="#amr-0-8-0-9017">0.8.0.9017</a></li>
<li><a href="#amr-0-8-0">0.8.0</a></li>
<li><a href="#amr-0-7-1">0.7.1</a></li>
<li><a href="#amr-0-7-0">0.7.0</a></li>

2
docs/reference/ab_property.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/age_groups.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/as.ab.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/as.disk.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/as.mic.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

4
docs/reference/as.rsi.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -298,7 +298,7 @@ @@ -298,7 +298,7 @@
<p>In 2019, EUCAST has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<p>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 (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<li><p><strong>S</strong> - 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.</p></li>
<li><p><strong>I</strong> - 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.</p></li>

4
docs/reference/count.html

@ -86,7 +86,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_ @@ -86,7 +86,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -305,7 +305,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_ @@ -305,7 +305,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
<p>In 2019, EUCAST has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<p>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 (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<li><p><strong>S</strong> - 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.</p></li>
<li><p><strong>I</strong> - 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.</p></li>

2
docs/reference/eucast_rules.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/filter_ab_class.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/first_isolate.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/g.test.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

2
docs/reference/index.html

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9016</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>

7
docs/reference/like.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -305,9 +305,8 @@ @@ -305,9 +305,8 @@
<span class='co'># get frequencies of bacteria whose name start with 'Ent' or 'ent'</span>
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>example_isolates</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='join.html'>left_join_microorganisms</a></span>() <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://rdrr.io/pkg/cleaner/man/freq.html'>freq</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)</pre>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>mo</span>) <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://rdrr.io/pkg/cleaner/man/freq.html'>freq</a></span>(<span class='fu'><a href='mo_property.html'>mo_fullname</a></span>(<span class='no'>mo</span>))</pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>

31
docs/reference/mdro.html

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -238,7 +238,8 @@ @@ -238,7 +238,8 @@
</div>
<pre class="usage"><span class='fu'>mdro</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>pct_required_classes</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='no'>...</span>)
<span class='kw'>pct_required_classes</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>)
<span class='fu'>brmo</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"BRMO"</span>, <span class='no'>...</span>)
@ -269,14 +270,18 @@ @@ -269,14 +270,18 @@
<th>info</th>
<td><p>print progress</p></td>
</tr>
<tr>
<th>verbose</th>
<td><p>a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.</p></td>
</tr>
<tr>
<th>pct_required_classes</th>
<td><p>minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for <em>S. aureus</em>. Setting this <code>pct_required_classes</code> argument to <code>0.5</code> (default) means that for every <em>S. aureus</em> isolate at least 8 different classes must be available. Any lower number of available classes will return <code>NA</code> for that isolate.</p></td>
</tr>
<tr>
<th>combine_SI</th>
<td><p>a logical to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the <code>mdro()</code> function, it follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using <code>combine_SI = FALSE</code>, resistance is considered when isolates are R or I.</p></td>
</tr>
<tr>
<th>verbose</th>
<td><p>a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>column name of an antibiotic, see section Antibiotics</p></td>
@ -394,6 +399,19 @@ @@ -394,6 +399,19 @@
<strong>TMP</strong>: trimethoprim (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EA01'>J01EA01</a>),
<strong>SXT</strong>: trimethoprim/sulfamethoxazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EE01'>J01EE01</a>),
<strong>VAN</strong>: vancomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA01'>J01XA01</a>).</p>
<h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
<p>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 (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<li><p><strong>S</strong> - 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.</p></li>
<li><p><strong>I</strong> - 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.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>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.</p>
<p>This AMR package honours this new insight. Use <code><a href='portion.html'>portion_SI</a></code> to determine antimicrobial susceptibility and <code><a href='count.html'>count_SI</a></code> to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -427,6 +445,7 @@ @@ -427,6 +445,7 @@
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#antibiotics">Antibiotics</a></li>
<li><a href="#interpretation-of-s-i-and-r">Interpretation of S, I and R</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>

4
docs/reference/portion.html

@ -86,7 +86,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port @@ -86,7 +86,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9017</span>
</span>
</div>
@ -353,7 +353,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port @@ -353,7 +353,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
<p>In 2019, EUCAST has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<p>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 (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<li><p><strong>S</strong> - 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.</p></li>
<li><p><strong>I</strong> - 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.</p></li>

1
man/ab_property.Rd

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
\alias{ab_property}
\alias{ab_name}
\alias{ab_atc}
\alias{ATC}
\alias{ab_cid}
\alias{ab_synonyms}
\alias{ab_tradenames}

2
man/age_groups.Rd

@ -74,5 +74,3 @@ example_isolates \%>\% @@ -74,5 +74,3 @@ example_isolates \%>\%
\seealso{
To determine ages, based on one or more reference dates, use the \code{\link{age}} function.
}
\keyword{age}
\keyword{age_group}

1
man/as.ab.Rd

@ -72,4 +72,3 @@ ab_name("eryt") # "Erythromycin" @@ -72,4 +72,3 @@ ab_name("eryt") # "Erythromycin"
\seealso{
\code{\link{antibiotics}} for the dataframe that is being used to determine ATCs.
}
\keyword{atc}

2
man/as.disk.Rd

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
% Please edit documentation in R/disk.R
\name{as.disk}
\alias{as.disk}
\alias{disk}
\alias{is.disk}
\title{Class 'disk'}
\usage{
@ -42,4 +43,3 @@ as.rsi(x = 12, @@ -42,4 +43,3 @@ as.rsi(x = 12,
\seealso{
\code{\link{as.rsi}}
}
\keyword{disk}

2
man/as.mic.Rd

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
% Please edit documentation in R/mic.R
\name{as.mic}
\alias{as.mic}
\alias{MIC}
\alias{is.mic}
\title{Class 'mic'}
\usage{
@ -52,4 +53,3 @@ freq(mic_data) @@ -52,4 +53,3 @@ freq(mic_data)
\seealso{
\code{\link{as.rsi}}
}
\keyword{mic}

4
man/as.rsi.Rd

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
% Please edit documentation in R/rsi.R
\name{as.rsi}
\alias{as.rsi}
\alias{RSI}
\alias{as.rsi.mic}
\alias{as.rsi.disk}
\alias{as.rsi.data.frame}
@ -52,7 +53,7 @@ The function \code{is.rsi.eligible} returns \code{TRUE} when a columns contains @@ -52,7 +53,7 @@ The function \code{is.rsi.eligible} returns \code{TRUE} when a columns contains
}
\section{Interpretation of S, I and R}{
In 2019, 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 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".
\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.}
@ -110,4 +111,3 @@ is.rsi.eligible(WHONET$`First name`, threshold = 0.99) # succeeds @@ -110,4 +111,3 @@ is.rsi.eligible(WHONET$`First name`, threshold = 0.99) # succeeds
\seealso{
\code{\link{as.mic}}
}
\keyword{rsi}

8
man/count.Rd

@ -66,7 +66,7 @@ The function \code{rsi_df} works exactly like \code{count_df}, but adds the perc @@ -66,7 +66,7 @@ The function \code{rsi_df} works exactly like \code{count_df}, but adds the perc
}
\section{Interpretation of S, I and R}{
In 2019, 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 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".
\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.}
@ -182,9 +182,3 @@ example_isolates \%>\% @@ -182,9 +182,3 @@ example_isolates \%>\%
\seealso{
\code{\link{portion}_*} to calculate microbial resistance and susceptibility.
}
\keyword{antibiotics}
\keyword{isolate}
\keyword{isolates}
\keyword{resistance}
\keyword{rsi}
\keyword{susceptibility}

5
man/eucast_rules.Rd

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
% Please edit documentation in R/eucast_rules.R
\name{eucast_rules}
\alias{eucast_rules}
\alias{EUCAST}
\title{EUCAST rules}
\source{
\itemize{
@ -183,7 +184,3 @@ b @@ -183,7 +184,3 @@ b
c <- eucast_rules(a, verbose = TRUE)
}
}
\keyword{eucast}
\keyword{interpretive}
\keyword{reading}
\keyword{resistance}

2
man/filter_ab_class.Rd

@ -89,5 +89,3 @@ example_isolates \%>\% @@ -89,5 +89,3 @@ example_isolates \%>\%
filter_aminoglycosides("R", "all") \%>\%
filter_fluoroquinolones("R", "all")
}
\keyword{fillter_class}
\keyword{filter}

3
man/first_isolate.Rd

@ -160,6 +160,3 @@ x$first_blood_isolate <- first_isolate(x, specimen_group = "Blood") @@ -160,6 +160,3 @@ x$first_blood_isolate <- first_isolate(x, specimen_group = "Blood")
\seealso{
\code{\link{key_antibiotics}}
}
\keyword{first}
\keyword{isolate}
\keyword{isolates}

1
man/g.test.Rd

@ -145,4 +145,3 @@ g.test(x) @@ -145,4 +145,3 @@ g.test(x)
\seealso{
\code{\link{chisq.test}}
}
\keyword{chi}

5
man/like.Rd

@ -63,9 +63,8 @@ a \%like\% b @@ -63,9 +63,8 @@ a \%like\% b
# get frequencies of bacteria whose name start with 'Ent' or 'ent'
library(dplyr)
example_isolates \%>\%
left_join_microorganisms() \%>\%
filter(genus \%like\% '^ent') \%>\%
freq(genus, species)
filter(mo_genus(mo) \%like\% '^ent') \%>\%
freq(mo_fullname(mo))
}
\seealso{
\code{\link[base]{grep}}

30
man/mdro.Rd

@ -2,6 +2,12 @@ @@ -2,6 +2,12 @@
% Please edit documentation in R/mdro.R
\name{mdro}
\alias{mdro}
\alias{MDR}
\alias{XDR}
\alias{PDR}
\alias{BRMO}
\alias{3MRGN}
\alias{4MRGN}
\alias{brmo}
\alias{mrgn}
\alias{mdr_tb}
@ -13,7 +19,8 @@ Please see Details for the list of publications used for this function. @@ -13,7 +19,8 @@ Please see Details for the list of publications used for this function.
}
\usage{
mdro(x, guideline = NULL, col_mo = NULL, info = TRUE,
verbose = FALSE, pct_required_classes = 0.5, ...)
pct_required_classes = 0.5, combine_SI = TRUE, verbose = FALSE,
...)
brmo(x, guideline = "BRMO", ...)
@ -34,10 +41,12 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...) @@ -34,10 +41,12 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
\item{info}{print progress}
\item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
\item{pct_required_classes}{minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.}
\item{combine_SI}{a logical to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the \code{mdro()} function, it follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using \code{combine_SI = FALSE}, resistance is considered when isolates are R or I.}
\item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
\item{...}{column name of an antibiotic, see section Antibiotics}
}
\value{
@ -154,6 +163,21 @@ The following antibiotics are used for the functions \code{\link{eucast_rules}} @@ -154,6 +163,21 @@ 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}{
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".
\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.}
}
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{portion_SI}} to determine antimicrobial susceptibility and \code{\link{count_SI}} to count susceptible isolates.
}
\section{Read more on our website!}{
On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.

9
man/portion.Rd

@ -114,7 +114,7 @@ Using \code{only_all_tested} has no impact when only using one antibiotic as inp @@ -114,7 +114,7 @@ Using \code{only_all_tested} has no impact when only using one antibiotic as inp
\section{Interpretation of S, I and R}{
In 2019, 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 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".
\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.}
@ -226,10 +226,3 @@ my_table \%>\% @@ -226,10 +226,3 @@ my_table \%>\%
\seealso{
\code{\link[AMR]{count}_*} to count resistant and susceptible isolates.
}
\keyword{antibiotics}
\keyword{isolate}
\keyword{isolates}
\keyword{resistance}
\keyword{rsi}
\keyword{rsi_df}
\keyword{susceptibility}

193
tests/appveyor/appveyor_tool.ps1

@ -0,0 +1,193 @@ @@ -0,0 +1,193 @@
if ( -not(Test-Path Env:\CRAN) ) {
$CRAN = "https://cran.rstudio.com"
}
Else {
$CRAN = $env:CRAN
}
# Found at http://zduck.com/2012/powershell-batch-files-exit-codes/
Function Exec
{
[CmdletBinding()]
param (
[Parameter(Position=0, Mandatory=1)]
[scriptblock]$Command,
[Parameter(Position=1, Mandatory=0)]
[string]$ErrorMessage = "Execution of command failed.`n$Command"
)
$ErrorActionPreference = "Continue"
& $Command 2>&1 | %{ "$_" }
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage`nExit code: $LastExitCode"
}
}
Function Progress
{
[CmdletBinding()]
param (
[Parameter(Position=0, Mandatory=0)]
[string]$Message = ""
)
$ProgressMessage = '== ' + (Get-Date) + ': ' + $Message
Write-Host $ProgressMessage -ForegroundColor Magenta
}
Function TravisTool
{
[CmdletBinding()]
param (
[Parameter(Position=0, Mandatory=1)]
[string[]]$Params
)
Exec { bash.exe ../travis_tool.sh $Params }
}
Function InstallR {
[CmdletBinding()]
Param()
if ( -not(Test-Path Env:\R_VERSION) ) {
$version = "patched"
}
Else {
$version = $env:R_VERSION
}
if ( -not(Test-Path Env:\R_ARCH) ) {
$arch = "x64"
}
Else {
$arch = $env:R_ARCH
}
If ($arch -eq "i386") {
$mingw_path = "mingw_32"
}
Else {
$mingw_path = "mingw_64"
}
Progress ("Version: " + $version)
If ($version -eq "devel") {
$url_path = ""
$version = "devel"
}
ElseIf (($version -eq "stable") -or ($version -eq "release")) {
$url_path = ""
$version = $(ConvertFrom-JSON $(Invoke-WebRequest http://rversions.r-pkg.org/r-release-win).Content).version
If ($version -eq "3.2.4") {
$version = "3.2.4revised"
}
}
ElseIf ($version -eq "patched") {
$url_path = ""
$version = $(ConvertFrom-JSON $(Invoke-WebRequest http://rversions.r-pkg.org/r-release-win).Content).version + "patched"
}
ElseIf ($version -eq "oldrel") {
$version = $(ConvertFrom-JSON $(Invoke-WebRequest http://rversions.r-pkg.org/r-oldrel).Content).version
$url_path = ("old/" + $version + "/")
}
Else {
$url_path = ("old/" + $version + "/")
}
Progress ("URL path: " + $url_path)
$rurl = $CRAN + "/bin/windows/base/" + $url_path + "R-" + $version + "-win.exe"
Progress ("Downloading R from: " + $rurl)
& "C:\Program Files\Git\mingw64\bin\curl.exe" -s -o ../R-win.exe -L $rurl
Progress "Running R installer"
Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
$RDrive = "C:"
echo "R is now available on drive $RDrive"
Progress "Setting PATH"
$env:PATH = $RDrive + '\R\bin\' + $arch + ';' + 'C:\Rtools\' + $mingw_path + '\bin;' + 'C:\MinGW\msys\1.0\bin;' + $env:PATH
Progress "Testing R installation"
Rscript -e "sessionInfo()"
}
Function InstallRtools {
if ( -not(Test-Path Env:\RTOOLS_VERSION) ) {
Progress "Determining Rtools version"
$rtoolsver = $(Invoke-WebRequest ($CRAN + "/bin/windows/Rtools/VERSION.txt")).Content.Split(' ')[2].Split('.')[0..1] -Join ''
}
Else {
$rtoolsver = $env:RTOOLS_VERSION
}
$rtoolsurl = $CRAN + "/bin/windows/Rtools/Rtools$rtoolsver.exe"
Progress ("Downloading Rtools from: " + $rtoolsurl)
& "C:\Program Files\Git\mingw64\bin\curl.exe" -s -o ../Rtools-current.exe -L $rtoolsurl
Progress "Running Rtools installer"
Start-Process -FilePath ..\Rtools-current.exe -ArgumentList /VERYSILENT -NoNewWindow -Wait
$RtoolsDrive = "C:"
echo "Rtools is now available on drive $RtoolsDrive"
Progress "Setting PATH"
if ( -not(Test-Path Env:\GCC_PATH) ) {
$gcc_path = "gcc-4.6.3"
}
Else {
$gcc_path = $env:GCC_PATH
}
$env:PATH = $RtoolsDrive + '\Rtools\bin;' + $RtoolsDrive + '\Rtools\MinGW\bin;' + $RtoolsDrive + '\Rtools\' + $gcc_path + '\bin;' + $env:PATH
$env:BINPREF=$RtoolsDrive + '/Rtools/mingw_$(WIN)/bin/'
}
Function Bootstrap {
[CmdletBinding()]
Param()
Progress "Bootstrap: Start"
Progress "Adding GnuWin32 tools to PATH"
$env:PATH = "C:\Program Files (x86)\Git\bin;" + $env:PATH