mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 07:41:57 +02:00
(v2.1.1.9289) unit test fix
This commit is contained in:
6
R/data.R
6
R/data.R
@ -29,7 +29,10 @@
|
||||
|
||||
#' Data Sets with `r format(nrow(antimicrobials) + nrow(antivirals), big.mark = " ")` Antimicrobial Drugs
|
||||
#'
|
||||
#' @description
|
||||
#' Two data sets containing all antimicrobials and antivirals. Use [as.ab()] or one of the [`ab_*`][ab_property()] functions to retrieve values from the [antimicrobials] data set. Three identifiers are included in this data set: an antimicrobial ID (`ab`, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (`atc`) as defined by the WHO, and a Compound ID (`cid`) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
#'
|
||||
#' **The `antibiotics` data set has been renamed to `antimicrobials`. The old name will be removed in a future version.**
|
||||
#' @format
|
||||
#' ### For the [antimicrobials] data set: a [tibble][tibble::tibble] with `r nrow(antimicrobials)` observations and `r ncol(antimicrobials)` variables:
|
||||
#' - `ab`\cr antimicrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. ***This is a unique identifier.***
|
||||
@ -88,6 +91,9 @@
|
||||
#' antivirals
|
||||
"antimicrobials"
|
||||
|
||||
#' @rdname antimicrobials
|
||||
"antibiotics"
|
||||
|
||||
#' @rdname antimicrobials
|
||||
"antivirals"
|
||||
|
||||
|
2
R/mdro.R
2
R/mdro.R
@ -1490,7 +1490,7 @@ mdro <- function(x = NULL,
|
||||
if (length(ESBLs) > 0) {
|
||||
trans_tbl(
|
||||
2, # positive, unconfirmed
|
||||
rows = which(x$order == "Enterobacterales" & x[[ESBLs[1]]] == "R" & x[[ESBLs[2]]] == "R" & is.na(esbl)),
|
||||
rows = which(x$order == "Enterobacterales" & col_values(x, ESBLs[1]) == "R" & col_values(x, ESBLs[2]) == "R" & is.na(esbl)),
|
||||
cols = c(AMX %or% AMP, cephalosporins_3rd),
|
||||
any_all = "all",
|
||||
reason = "Enterobacterales: potential ESBL"
|
||||
|
Reference in New Issue
Block a user