1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-24 04:06:12 +01:00

(v1.7.1.9024) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-08-17 14:34:11 +02:00
parent a2d249962f
commit a44283f998
99 changed files with 550 additions and 501 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 1.7.1.9023
Date: 2021-08-16
Version: 1.7.1.9024
Date: 2021-08-17
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
@ -68,6 +68,21 @@ Authors@R: c(
role = "ctb",
comment = c(ORCID = "0000-0002-8547-427")))
Depends: R (>= 3.0.0)
Enhances:
cleaner,
skimr,
ggplot2
Suggests:
curl,
dplyr,
ggtext,
knitr,
readxl,
rmarkdown,
rvest,
tinytest,
xml2
VignetteBuilder: knitr,rmarkdown
URL: https://github.com/msberends/AMR, https://msberends.github.io/AMR
BugReports: https://github.com/msberends/AMR/issues
License: GPL-2 | file LICENSE

View File

@ -1,5 +1,5 @@
# `AMR` 1.7.1.9023
## <small>Last updated: 16 August 2021</small>
# `AMR` 1.7.1.9024
## <small>Last updated: 17 August 2021</small>
### Breaking changes
* Removed all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version

View File

@ -520,9 +520,9 @@ create_eucast_ab_documentation <- function() {
x <- trimws(unique(toupper(unlist(strsplit(EUCAST_RULES_DF$then_change_these_antibiotics, ",")))))
ab <- character()
for (val in x) {
if (val %in% ls(envir = asNamespace("AMR"))) {
if (paste0("AB_", val) %in% ls(envir = asNamespace("AMR"))) {
# antibiotic group names, as defined in data-raw/_internals.R, such as `CARBAPENEMS`
val <- eval(parse(text = val), envir = asNamespace("AMR"))
val <- eval(parse(text = paste0("AB_", val)), envir = asNamespace("AMR"))
} else if (val %in% AB_lookup$ab) {
# separate drugs, such as `AMX`
val <- as.ab(val)
@ -532,7 +532,7 @@ create_eucast_ab_documentation <- function() {
ab <- c(ab, val)
}
ab <- unique(ab)
atcs <- ab_atc(ab)
atcs <- ab_atc(ab, only_first = TRUE)
# only keep ABx with an ATC code:
ab <- ab[!is.na(atcs)]
ab_names <- ab_name(ab, language = NULL, tolower = TRUE)
@ -949,7 +949,7 @@ font_grey <- function(..., collapse = " ") {
try_colour(..., before = "\033[38;5;249m", after = "\033[39m", collapse = collapse)
}
font_grey_bg <- function(..., collapse = " ") {
if (tryCatch(rstudioapi::getThemeInfo()$dark == TRUE, error = function(e) FALSE)) {
if (tryCatch(import_fn("getThemeInfo", "rstudioapi", error_on_fail = FALSE)()$dark, error = function(e) FALSE)) {
# similar to HTML #444444
try_colour(..., before = "\033[48;5;238m", after = "\033[49m", collapse = collapse)
} else {

View File

@ -31,6 +31,7 @@
#' @param filter an [expression] to be evaluated in the [antibiotics] data set, such as `name %like% "trim"`
#' @param only_rsi_columns a [logical] to indicate whether only columns of class `<rsi>` must be selected (defaults to `FALSE`), see [as.rsi()]
#' @param only_treatable a [logical] to indicate whether agents that are only for laboratory tests should be excluded (defaults to `TRUE`), such as gentamicin-high (`GEH`) and imipenem/EDTA (`IPE`)
#' @param ... ignored, only in place to allow future extensions
#' @details
#' These functions can be used in data set calls for selecting columns and filtering rows. They are heavily inspired by the [Tidyverse selection helpers][tidyselect::language] such as [`everything()`][tidyselect::everything()], but also work in base \R and not only in `dplyr` verbs. Nonetheless, they are very convenient to use with `dplyr` functions such as [`select()`][dplyr::select()], [`filter()`][dplyr::filter()] and [`summarise()`][dplyr::summarise()], see *Examples*.
#'
@ -153,7 +154,8 @@
#' }
ab_class <- function(ab_class,
only_rsi_columns = FALSE,
only_treatable = TRUE) {
only_treatable = TRUE,
...) {
meet_criteria(ab_class, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
@ -164,7 +166,8 @@ ab_class <- function(ab_class,
#' @export
ab_selector <- function(filter,
only_rsi_columns = FALSE,
only_treatable = TRUE) {
only_treatable = TRUE,
...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
@ -188,7 +191,7 @@ ab_selector <- function(filter,
#' @rdname antibiotic_class_selectors
#' @export
administrable_per_os <- function(only_rsi_columns = FALSE) {
administrable_per_os <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
# get_current_data() has to run each time, for cases where e.g., filter() and select() are used in same call
# but it only takes a couple of milliseconds
@ -215,7 +218,7 @@ administrable_per_os <- function(only_rsi_columns = FALSE) {
#' @rdname antibiotic_class_selectors
#' @export
administrable_iv <- function(only_rsi_columns = FALSE) {
administrable_iv <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
# get_current_data() has to run each time, for cases where e.g., filter() and select() are used in same call
# but it only takes a couple of milliseconds
@ -236,7 +239,7 @@ administrable_iv <- function(only_rsi_columns = FALSE) {
# nolint start
# #' @rdname antibiotic_class_selectors
# #' @export
# not_intrinsic_resistant <- function(mo, ..., only_rsi_columns = FALSE) {
# not_intrinsic_resistant <- function(mo, ..., only_rsi_columns = FALSE, ...) {
# meet_criteria(mo, allow_class = c("mo", "data.frame", "list", "character", "numeric", "integer", "factor"), has_length = 1, allow_NA = FALSE)
# meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
#
@ -272,7 +275,7 @@ administrable_iv <- function(only_rsi_columns = FALSE) {
#' @rdname antibiotic_class_selectors
#' @export
aminoglycosides <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
aminoglycosides <- function(only_rsi_columns = FALSE, only_treatable = TRUE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
ab_select_exec("aminoglycosides", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
@ -280,28 +283,28 @@ aminoglycosides <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
#' @rdname antibiotic_class_selectors
#' @export
aminopenicillins <- function(only_rsi_columns = FALSE) {
aminopenicillins <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("aminopenicillins", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
antifungals <- function(only_rsi_columns = FALSE) {
antifungals <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("antifungals", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
ab_select_exec("antifungals", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
antimycobacterials <- function(only_rsi_columns = FALSE) {
antimycobacterials <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("antimycobacterials", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
ab_select_exec("antimycobacterials", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
betalactams <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
betalactams <- function(only_rsi_columns = FALSE, only_treatable = TRUE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
ab_select_exec("betalactams", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
@ -309,7 +312,7 @@ betalactams <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
#' @rdname antibiotic_class_selectors
#' @export
carbapenems <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
carbapenems <- function(only_rsi_columns = FALSE, only_treatable = TRUE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
ab_select_exec("carbapenems", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
@ -317,98 +320,98 @@ carbapenems <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins <- function(only_rsi_columns = FALSE) {
cephalosporins <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins_1st <- function(only_rsi_columns = FALSE) {
cephalosporins_1st <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins_1st", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins_2nd <- function(only_rsi_columns = FALSE) {
cephalosporins_2nd <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins_2nd", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins_3rd <- function(only_rsi_columns = FALSE) {
cephalosporins_3rd <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins_3rd", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins_4th <- function(only_rsi_columns = FALSE) {
cephalosporins_4th <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins_4th", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
cephalosporins_5th <- function(only_rsi_columns = FALSE) {
cephalosporins_5th <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("cephalosporins_5th", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
fluoroquinolones <- function(only_rsi_columns = FALSE) {
fluoroquinolones <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("fluoroquinolones", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
glycopeptides <- function(only_rsi_columns = FALSE) {
glycopeptides <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("glycopeptides", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
lincosamides <- function(only_rsi_columns = FALSE) {
lincosamides <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("lincosamides", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
lipoglycopeptides <- function(only_rsi_columns = FALSE) {
lipoglycopeptides <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("lipoglycopeptides", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
macrolides <- function(only_rsi_columns = FALSE) {
macrolides <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("macrolides", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
oxazolidinones <- function(only_rsi_columns = FALSE) {
oxazolidinones <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("oxazolidinones", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
penicillins <- function(only_rsi_columns = FALSE) {
penicillins <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("penicillins", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
polymyxins <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
polymyxins <- function(only_rsi_columns = FALSE, only_treatable = TRUE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
ab_select_exec("polymyxins", only_rsi_columns = only_rsi_columns, only_treatable = only_treatable)
@ -416,35 +419,35 @@ polymyxins <- function(only_rsi_columns = FALSE, only_treatable = TRUE) {
#' @rdname antibiotic_class_selectors
#' @export
streptogramins <- function(only_rsi_columns = FALSE) {
streptogramins <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("streptogramins", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
quinolones <- function(only_rsi_columns = FALSE) {
quinolones <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("quinolones", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
tetracyclines <- function(only_rsi_columns = FALSE) {
tetracyclines <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("tetracyclines", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
trimethoprims <- function(only_rsi_columns = FALSE) {
trimethoprims <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("trimethoprims", only_rsi_columns = only_rsi_columns)
}
#' @rdname antibiotic_class_selectors
#' @export
ureidopenicillins <- function(only_rsi_columns = FALSE) {
ureidopenicillins <- function(only_rsi_columns = FALSE, ...) {
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
ab_select_exec("ureidopenicillins", only_rsi_columns = only_rsi_columns)
}

View File

@ -36,6 +36,7 @@
#' @param ... other arguments passed on to [as.ab()]
#' @param data a [data.frame] of which the columns need to be renamed
#' @param snake_case a [logical] to indicate whether the names should be in so-called [snake case](https://en.wikipedia.org/wiki/Snake_case): in lower case and all spaces/slashes replaced with an underscore (`_`)
#' @param only_first a [logical] to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)
#' @details All output [will be translated][translate] where possible.
#'
#' The function [ab_url()] will return the direct URL to the official WHO website. A warning will be returned if the required ATC code is not available.
@ -57,7 +58,7 @@
#' @examples
#' # all properties:
#' ab_name("AMX") # "Amoxicillin"
#' ab_atc("AMX") # J01CA04 (ATC code from the WHO)
#' ab_atc("AMX") # "J01CA04" (ATC code from the WHO)
#' ab_cid("AMX") # 33613 (Compound ID from PubChem)
#' ab_synonyms("AMX") # a list with brand names of amoxicillin
#' ab_tradenames("AMX") # same
@ -181,20 +182,6 @@ set_ab_names <- function(data, property = "name", language = get_locale(), snake
data
}
#' @rdname ab_property
#' @aliases ATC
#' @export
ab_atc <- function(x, ...) {
meet_criteria(x, allow_NA = TRUE)
atcs <- ab_validate(x = x, property = "atc", ...)
names(atcs) <- x
if (length(atcs) == 1) {
unname(unlist(atcs))
} else {
atcs
}
}
#' @rdname ab_property
#' @export
ab_cid <- function(x, ...) {
@ -230,6 +217,36 @@ ab_group <- function(x, language = get_locale(), ...) {
translate_AMR(ab_validate(x = x, property = "group", ...), language = language, only_affect_ab_names = TRUE)
}
#' @rdname ab_property
#' @aliases ATC
#' @export
ab_atc <- function(x, only_first = FALSE, ...) {
meet_criteria(x, allow_NA = TRUE)
meet_criteria(only_first, allow_class = "logical", has_length = 1)
atcs <- ab_validate(x = x, property = "atc", ...)
if (only_first == TRUE) {
atcs <- vapply(FUN.VALUE = character(1),
# get only the first ATC code
atcs,
function(x) {
# try to get the J-group
if (any(x %like% "^J")) {
x[x %like% "^J"][1L]
} else {
as.character(x[1L])
}
})
} else if (length(atcs) == 1) {
atcs <- unname(unlist(atcs))
} else {
names(atcs) <- x
}
atcs
}
#' @rdname ab_property
#' @export
ab_atc_group1 <- function(x, language = get_locale(), ...) {
@ -332,12 +349,13 @@ ab_url <- function(x, open = FALSE, ...) {
meet_criteria(x, allow_NA = TRUE)
meet_criteria(open, allow_class = "logical", has_length = 1)
ab <- as.ab(x = x, ... = ...)
u <- paste0("https://www.whocc.no/atc_ddd_index/?code=", ab_atc(ab), "&showdescription=no")
u[is.na(ab_atc(ab))] <- NA_character_
ab <- as.ab(x = x, ...)
atcs <- ab_atc(ab, only_first = TRUE)
u <- paste0("https://www.whocc.no/atc_ddd_index/?code=", atcs, "&showdescription=no")
u[is.na(atcs)] <- NA_character_
names(u) <- ab_name(ab)
NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(ab_atc(ab))]
NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(atcs)]
if (length(NAs) > 0) {
warning_("No ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
}

View File

@ -97,8 +97,8 @@ atc_online_property <- function(atc_code,
check_dataset_integrity()
if (!all(atc_code %in% antibiotics)) {
atc_code <- as.character(ab_atc(atc_code))
if (!all(atc_code %in% unlist(antibiotics$atc))) {
atc_code <- as.character(ab_atc(atc_code, only_first = TRUE))
}
if (!has_internet()) {

View File

@ -218,7 +218,7 @@ format.bug_drug_combinations <- function(x,
ab_txt[i] <- gsub("group", ab_group(ab[i], language = language), ab_txt[i])
ab_txt[i] <- gsub("atc_group1", ab_atc_group1(ab[i], language = language), ab_txt[i])
ab_txt[i] <- gsub("atc_group2", ab_atc_group2(ab[i], language = language), ab_txt[i])
ab_txt[i] <- gsub("atc", ab_atc(ab[i]), ab_txt[i])
ab_txt[i] <- gsub("atc", ab_atc(ab[i], only_first = TRUE), ab_txt[i])
ab_txt[i] <- gsub("name", ab_name(ab[i], language = language), ab_txt[i])
ab_txt[i]
}

View File

@ -936,7 +936,7 @@ freq.rsi <- function(x, ...) {
if (!is.na(ab)) {
cleaner::freq.default(x = x, ...,
.add_header = list(
Drug = paste0(ab_name(ab, language = NULL), " (", ab, ", ", ab_atc(ab), ")"),
Drug = paste0(ab_name(ab, language = NULL), " (", ab, ", ", paste(ab_atc(ab), collapse = "/"), ")"),
`Drug group` = ab_group(ab, language = NULL),
`%SI` = percentage(susceptibility(x, minimum = 0, as_percent = FALSE),
digits = digits)))

Binary file not shown.

View File

@ -27,26 +27,13 @@
install.packages("data-raw/tinytest_1.2.4.10.tar.gz")
install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE)
pkg_to_install <- c("cleaner",
"curl",
"dplyr",
"ggplot2",
"ggtext",
"knitr",
"microbenchmark",
"pillar",
"readxl",
"rmarkdown",
"rstudioapi",
"rvest",
"skimr",
"tidyr",
"tinytest",
"vctrs",
"xml2" )
cat("Packages to install:", paste(pkg_to_install, collapse = ", "), "\n")
pkg_suggests <- gsub("[^a-zA-Z0-9]+", "",
unlist(strsplit(unlist(packageDescription("AMR",
fields = c("Suggests", "Enhances"))),
", ?")))
cat("Packages listed in Suggests/Enhances:", paste(pkg_suggests, collapse = ", "), "\n")
to_install <- pkg_to_install[!pkg_to_install %in% rownames(utils::installed.packages())]
to_install <- pkg_suggests[!pkg_suggests %in% rownames(utils::installed.packages())]
if (length(to_install) == 0) {
message("\nNothing to install\n")
}
@ -59,7 +46,7 @@ for (i in seq_len(length(to_install))) {
}
to_update <- as.data.frame(utils::old.packages(repos = "https://cran.rstudio.com/"), stringsAsFactors = FALSE)
to_update <- to_update[which(to_update$Package %in% pkg_to_install), "Package", drop = TRUE]
to_update <- to_update[which(to_update$Package %in% pkg_suggests), "Package", drop = TRUE]
if (length(to_update) == 0) {
message("\nNothing to update\n")
}

View File

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

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -198,7 +198,7 @@
<h1 data-toc-skip>How to conduct AMR data analysis</h1>
<h4 data-toc-skip class="author">Matthijs S. Berends</h4>
<h4 data-toc-skip class="date">16 August 2021</h4>
<h4 data-toc-skip class="date">17 August 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -207,7 +207,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 16 August 2021.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 17 August 2021.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor" aria-hidden="true"></a>Introduction</h1>
@ -238,21 +238,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2021-08-16</td>
<td align="center">2021-08-17</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2021-08-16</td>
<td align="center">2021-08-17</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2021-08-16</td>
<td align="center">2021-08-17</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -349,42 +349,42 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-06-21</td>
<td align="center">V8</td>
<td align="center">2012-12-11</td>
<td align="center">B5</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2017-09-19</td>
<td align="center">E6</td>
<td align="center">Hospital C</td>
<td align="center">2012-01-03</td>
<td align="center">D5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2013-10-17</td>
<td align="center">K4</td>
<td align="center">Hospital B</td>
<td align="center">2013-03-20</td>
<td align="center">E3</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2013-09-11</td>
<td align="center">G5</td>
<td align="center">Hospital A</td>
<td align="center">2017-02-14</td>
<td align="center">L5</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
@ -393,9 +393,9 @@
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2010-04-19</td>
<td align="center">Z2</td>
<td align="center">Hospital B</td>
<td align="center">2010-04-27</td>
<td align="center">Y6</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
@ -404,14 +404,14 @@
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-03-08</td>
<td align="center">R1</td>
<td align="center">2011-08-04</td>
<td align="center">O2</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
</tbody>
@ -446,18 +446,18 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,300</td>
<td align="right">51.5%</td>
<td align="right">10,300</td>
<td align="right">51.5%</td>
<td align="right">10,443</td>
<td align="right">52.22%</td>
<td align="right">10,443</td>
<td align="right">52.22%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,700</td>
<td align="right">48.5%</td>
<td align="right">9,557</td>
<td align="right">47.79%</td>
<td align="right">20,000</td>
<td align="right">100.0%</td>
<td align="right">100.00%</td>
</tr>
</tbody>
</table>
@ -510,9 +510,9 @@ Longest: 1</p>
<span class="co"># Using column 'patient_id' as input for `col_patient_id`.</span>
<span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span>
<span class="co"># 2</span>
<span class="co"># =&gt; Found 10,584 first weighted isolates (phenotype-based, 52.9% of total</span>
<span class="co"># =&gt; Found 10,606 first weighted isolates (phenotype-based, 53.0% of total</span>
<span class="co"># where a microbial ID was available)</span></code></pre></div>
<p>So only 52.9% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 53.0% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
@ -520,7 +520,7 @@ Longest: 1</p>
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>So we end up with 10,584 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,606 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></code></pre></div>
<table style="width:100%;" class="table">
@ -559,27 +559,27 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2016-06-21</td>
<td align="center">V8</td>
<td align="center">2012-12-11</td>
<td align="center">B5</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2017-09-19</td>
<td align="center">E6</td>
<td align="center">Hospital C</td>
<td align="center">2012-01-03</td>
<td align="center">D5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -591,9 +591,9 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="left">4</td>
<td align="center">2013-09-11</td>
<td align="center">G5</td>
<td align="center">Hospital A</td>
<td align="center">2017-02-14</td>
<td align="center">L5</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">S</td>
@ -606,51 +606,51 @@ Longest: 1</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">6</td>
<td align="center">2014-03-08</td>
<td align="center">R1</td>
<td align="left">7</td>
<td align="center">2012-03-07</td>
<td align="center">I8</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">7</td>
<td align="center">2015-07-22</td>
<td align="center">U6</td>
<td align="center">Hospital D</td>
<td align="left">9</td>
<td align="center">2010-12-20</td>
<td align="center">H10</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">8</td>
<td align="center">2015-07-26</td>
<td align="center">A1</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="left">11</td>
<td align="center">2014-01-24</td>
<td align="center">M2</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -674,8 +674,8 @@ Longest: 1</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,584<br>
Available: 10,584 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,606<br>
Available: 10,606 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -692,33 +692,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,573</td>
<td align="right">43.21%</td>
<td align="right">4,573</td>
<td align="right">43.21%</td>
<td align="right">4,494</td>
<td align="right">42.37%</td>
<td align="right">4,494</td>
<td align="right">42.37%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,737</td>
<td align="right">25.86%</td>
<td align="right">7,310</td>
<td align="right">69.07%</td>
<td align="right">2,785</td>
<td align="right">26.26%</td>
<td align="right">7,279</td>
<td align="right">68.63%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,126</td>
<td align="right">20.09%</td>
<td align="right">9,436</td>
<td align="right">89.15%</td>
<td align="right">2,106</td>
<td align="right">19.86%</td>
<td align="right">9,385</td>
<td align="right">88.49%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,148</td>
<td align="right">10.85%</td>
<td align="right">10,584</td>
<td align="right">1,221</td>
<td align="right">11.51%</td>
<td align="right">10,606</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -765,8 +765,8 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2015-07-26</td>
<td align="center">A1</td>
<td align="center">2012-12-11</td>
<td align="center">B5</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
@ -780,8 +780,8 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-04-15</td>
<td align="center">E1</td>
<td align="center">2011-06-11</td>
<td align="center">L7</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
@ -795,28 +795,13 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-12-17</td>
<td align="center">D8</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-04-23</td>
<td align="center">M6</td>
<td align="center">Hospital A</td>
<td align="center">2012-12-19</td>
<td align="center">A10</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
@ -824,34 +809,49 @@ Longest: 24</p>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2014-12-05</td>
<td align="center">M6</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2013-01-18</td>
<td align="center">O5</td>
<td align="center">Hospital D</td>
<td align="center">2017-05-14</td>
<td align="center">L8</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2012-12-05</td>
<td align="center">S7</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">2010-12-14</td>
<td align="center">Q1</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -875,50 +875,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2169</td>
<td align="center">137</td>
<td align="center">2267</td>
<td align="center">4573</td>
<td align="center">2137</td>
<td align="center">139</td>
<td align="center">2218</td>
<td align="center">4494</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3389</td>
<td align="center">161</td>
<td align="center">1023</td>
<td align="center">4573</td>
<td align="center">3298</td>
<td align="center">157</td>
<td align="center">1039</td>
<td align="center">4494</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3306</td>
<td align="center">3230</td>
<td align="center">0</td>
<td align="center">1267</td>
<td align="center">4573</td>
<td align="center">1264</td>
<td align="center">4494</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4004</td>
<td align="center">3946</td>
<td align="center">0</td>
<td align="center">569</td>
<td align="center">4573</td>
<td align="center">548</td>
<td align="center">4494</td>
</tr>
<tr class="odd">
<td align="center">K. pneumoniae</td>
<td align="center">AMX</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">1148</td>
<td align="center">1148</td>
<td align="center">1221</td>
<td align="center">1221</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">891</td>
<td align="center">967</td>
<td align="center">44</td>
<td align="center">213</td>
<td align="center">1148</td>
<td align="center">210</td>
<td align="center">1221</td>
</tr>
</tbody>
</table>
@ -941,34 +941,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4004</td>
<td align="center">3946</td>
<td align="center">0</td>
<td align="center">569</td>
<td align="center">4573</td>
<td align="center">548</td>
<td align="center">4494</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1048</td>
<td align="center">1088</td>
<td align="center">0</td>
<td align="center">100</td>
<td align="center">1148</td>
<td align="center">133</td>
<td align="center">1221</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2444</td>
<td align="center">2490</td>
<td align="center">0</td>
<td align="center">293</td>
<td align="center">2737</td>
<td align="center">295</td>
<td align="center">2785</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">2126</td>
<td align="center">2126</td>
<td align="center">2106</td>
<td align="center">2106</td>
</tr>
</tbody>
</table>
@ -982,7 +982,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>
<span class="co"># [1] 0.5377929</span></code></pre></div>
<span class="co"># [1] 0.5427117</span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -996,19 +996,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5389338</td>
<td align="center">0.5356582</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5440860</td>
<td align="center">0.5408108</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5516820</td>
<td align="center">0.5371153</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5145267</td>
<td align="center">0.5614714</td>
</tr>
</tbody>
</table>
@ -1027,23 +1027,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5389338</td>
<td align="center">3095</td>
<td align="center">0.5356582</td>
<td align="center">3183</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5440860</td>
<td align="center">3720</td>
<td align="center">0.5408108</td>
<td align="center">3700</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5516820</td>
<td align="center">1635</td>
<td align="center">0.5371153</td>
<td align="center">1657</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5145267</td>
<td align="center">2134</td>
<td align="center">0.5614714</td>
<td align="center">2066</td>
</tr>
</tbody>
</table>
@ -1064,27 +1064,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7762956</td>
<td align="center">0.8755740</td>
<td align="center">0.9781325</td>
<td align="center">0.7688028</td>
<td align="center">0.8780596</td>
<td align="center">0.9815309</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8144599</td>
<td align="center">0.9128920</td>
<td align="center">0.9782230</td>
<td align="center">0.8280098</td>
<td align="center">0.8910729</td>
<td align="center">0.9754300</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7939350</td>
<td align="center">0.8929485</td>
<td align="center">0.9839240</td>
<td align="center">0.7921005</td>
<td align="center">0.8940754</td>
<td align="center">0.9795332</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5352775</td>
<td align="center">0.5351377</td>
<td align="center">0.0000000</td>
<td align="center">0.5352775</td>
<td align="center">0.5351377</td>
</tr>
</tbody>
</table>
@ -1109,23 +1109,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">53.9%</td>
<td align="right">25.8%</td>
<td align="right">53.6%</td>
<td align="right">26.4%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">54.4%</td>
<td align="right">27.2%</td>
<td align="right">54.1%</td>
<td align="right">24.6%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">55.2%</td>
<td align="right">27.8%</td>
<td align="right">53.7%</td>
<td align="right">27.5%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">51.5%</td>
<td align="right">24.6%</td>
<td align="right">56.1%</td>
<td align="right">29.0%</td>
</tr>
</tbody>
</table>
@ -1209,18 +1209,16 @@ Longest: 24</p>
<code class="sourceCode R"><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>
<span class="va">mic_values</span>
<span class="co"># Class &lt;mic&gt;</span>
<span class="co"># [1] 0.0625 256 32 0.002 &lt;=0.001 256 0.5 0.025 0.5 </span>
<span class="co"># [10] 2 0.002 0.005 0.005 1 32 0.01 0.002 64 </span>
<span class="co"># [19] 0.25 4 0.025 0.125 0.005 1 2 0.002 0.25 </span>
<span class="co"># [28] 0.25 32 2 0.25 0.25 0.005 0.5 0.002 0.002 </span>
<span class="co"># [37] 8 0.25 2 2 0.005 0.5 64 128 2 </span>
<span class="co"># [46] 64 0.0625 0.002 1 0.01 16 0.125 64 4 </span>
<span class="co"># [55] 16 2 32 0.025 256 16 1 0.005 32 </span>
<span class="co"># [64] 16 0.01 0.025 4 0.0625 0.125 0.025 0.5 0.5 </span>
<span class="co"># [73] 0.025 128 0.01 0.025 256 0.25 1 64 0.125 </span>
<span class="co"># [82] 2 &lt;=0.001 0.25 8 0.0625 4 16 0.025 64 </span>
<span class="co"># [91] 8 0.01 0.0625 8 128 0.5 4 0.002 0.5 </span>
<span class="co"># [100] 64</span></code></pre></div>
<span class="co"># [1] 0.25 16 0.0625 32 0.025 1 256 64 0.002 0.005 </span>
<span class="co"># [11] 0.01 0.005 8 0.01 0.025 128 0.01 8 0.005 256 </span>
<span class="co"># [21] 0.005 8 0.0625 0.125 0.005 16 8 2 0.5 4 </span>
<span class="co"># [31] 2 32 0.25 0.25 8 0.025 0.25 8 64 1 </span>
<span class="co"># [41] 0.005 0.01 0.005 256 0.025 0.5 2 0.025 0.5 0.005 </span>
<span class="co"># [51] 0.0625 128 4 1 0.0625 0.002 16 0.002 8 0.005 </span>
<span class="co"># [61] 1 1 8 32 0.002 32 0.25 8 4 0.001 </span>
<span class="co"># [71] 2 16 16 0.025 0.005 0.0625 2 128 0.001 2 </span>
<span class="co"># [81] 64 0.025 16 64 2 128 8 0.5 4 256 </span>
<span class="co"># [91] 0.5 32 0.001 0.01 2 64 4 32 4 0.0625</span></code></pre></div>
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">mic_values</span><span class="op">)</span></code></pre></div>
@ -1249,10 +1247,10 @@ Longest: 24</p>
<span class="co"># to review it.</span>
<span class="va">disk_values</span>
<span class="co"># Class &lt;disk&gt;</span>
<span class="co"># [1] 18 22 30 28 29 31 18 21 17 31 28 25 21 22 29 26 21 30 17 20 18 21 26 19 24</span>
<span class="co"># [26] 17 30 17 26 19 29 23 23 22 26 25 20 25 29 20 28 29 31 24 23 26 29 20 17 17</span>
<span class="co"># [51] 27 18 18 29 17 20 21 24 30 17 25 27 21 30 28 26 27 20 22 19 19 24 21 28 22</span>
<span class="co"># [76] 24 21 28 24 17 29 23 31 28 25 20 18 18 30 31 17 18 17 28 24 22 24 31 25 31</span></code></pre></div>
<span class="co"># [1] 26 25 28 21 24 22 21 27 22 21 31 25 26 17 28 29 18 31 21 30 23 28 22 18 28</span>
<span class="co"># [26] 21 25 26 18 30 22 28 25 28 25 21 29 26 19 21 19 26 31 17 25 22 21 27 24 26</span>
<span class="co"># [51] 20 17 18 27 31 31 20 31 26 22 25 22 19 22 27 19 25 27 30 17 24 27 22 28 18</span>
<span class="co"># [76] 26 30 29 25 23 26 29 19 25 25 24 25 30 29 25 29 17 26 21 20 29 26 23 29 31</span></code></pre></div>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></code></pre></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -364,19 +364,19 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span>
<span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
<span class="co"># 1 R S I S R R</span>
<span class="co"># 2 I R S S S I</span>
<span class="co"># 3 S I I S S I</span>
<span class="co"># 4 S I I R S S</span>
<span class="co"># 5 S I S S R I</span>
<span class="co"># 6 S R S I S I</span>
<span class="co"># 1 I I I S R R</span>
<span class="co"># 2 I R R R I R</span>
<span class="co"># 3 S I R S I I</span>
<span class="co"># 4 S S S S I R</span>
<span class="co"># 5 R S R I I S</span>
<span class="co"># 6 I R S R R I</span>
<span class="co"># kanamycin</span>
<span class="co"># 1 I</span>
<span class="co"># 2 R</span>
<span class="co"># 3 I</span>
<span class="co"># 4 I</span>
<span class="co"># 5 I</span>
<span class="co"># 6 I</span></code></pre></div>
<span class="co"># 4 R</span>
<span class="co"># 5 R</span>
<span class="co"># 6 S</span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">my_TB_data</span>, guideline <span class="op">=</span> <span class="st">"TB"</span><span class="op">)</span></code></pre></div>
@ -419,40 +419,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3169</td>
<td align="right">63.38%</td>
<td align="right">3169</td>
<td align="right">63.38%</td>
<td align="right">3227</td>
<td align="right">64.54%</td>
<td align="right">3227</td>
<td align="right">64.54%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">1049</td>
<td align="right">20.98%</td>
<td align="right">4218</td>
<td align="right">84.36%</td>
<td align="right">990</td>
<td align="right">19.80%</td>
<td align="right">4217</td>
<td align="right">84.34%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">458</td>
<td align="right">9.16%</td>
<td align="right">4676</td>
<td align="right">93.52%</td>
<td align="right">464</td>
<td align="right">9.28%</td>
<td align="right">4681</td>
<td align="right">93.62%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">240</td>
<td align="right">4.80%</td>
<td align="right">4916</td>
<td align="right">98.32%</td>
<td align="right">223</td>
<td align="right">4.46%</td>
<td align="right">4904</td>
<td align="right">98.08%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">84</td>
<td align="right">1.68%</td>
<td align="right">96</td>
<td align="right">1.92%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -198,7 +198,7 @@
<h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1>
<h4 data-toc-skip class="author">Matthijs S. Berends</h4>
<h4 data-toc-skip class="date">16 August 2021</h4>
<h4 data-toc-skip class="date">17 August 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="hidden name"><code>SPSS.Rmd</code></div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -231,19 +231,32 @@
times <span class="op">=</span> <span class="fl">25</span><span class="op">)</span>
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># as.mo("sau") 12.0 13.0 20.0 14.0 16.0 51 25</span>
<span class="co"># as.mo("stau") 56.0 60.0 77.0 85.0 94.0 100 25</span>
<span class="co"># as.mo("STAU") 54.0 59.0 78.0 85.0 95.0 100 25</span>
<span class="co"># as.mo("staaur") 12.0 13.0 20.0 14.0 15.0 57 25</span>
<span class="co"># as.mo("STAAUR") 13.0 13.0 19.0 14.0 16.0 51 25</span>
<span class="co"># as.mo("S. aureus") 27.0 29.0 39.0 34.0 50.0 64 25</span>
<span class="co"># as.mo("S aureus") 27.0 30.0 43.0 33.0 60.0 70 25</span>
<span class="co"># as.mo("Staphylococcus aureus") 3.8 4.1 5.5 4.5 4.7 31 25</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 250.0 270.0 280.0 280.0 290.0 390 25</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 190.0 200.0 200.0 200.0 200.0 220 25</span>
<span class="co"># as.mo("MRSA") 12.0 13.0 15.0 14.0 16.0 30 25</span>
<span class="co"># as.mo("VISA") 21.0 22.0 31.0 25.0 29.0 59 25</span></code></pre></div>
<span class="co"># expr min lq mean median uq max</span>
<span class="co"># as.mo("sau") 12.0 13.0 14 13.0 13.0 45.0</span>
<span class="co"># as.mo("stau") 55.0 58.0 72 60.0 92.0 100.0</span>
<span class="co"># as.mo("STAU") 54.0 59.0 85 91.0 94.0 200.0</span>
<span class="co"># as.mo("staaur") 11.0 12.0 19 13.0 15.0 58.0</span>
<span class="co"># as.mo("STAAUR") 12.0 13.0 21 14.0 16.0 63.0</span>
<span class="co"># as.mo("S. aureus") 24.0 28.0 41 30.0 62.0 73.0</span>
<span class="co"># as.mo("S aureus") 26.0 28.0 37 30.0 33.0 75.0</span>
<span class="co"># as.mo("Staphylococcus aureus") 3.1 3.8 4 3.9 4.2 4.7</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 250.0 260.0 270 260.0 290.0 300.0</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 160.0 200.0 200 200.0 200.0 240.0</span>
<span class="co"># as.mo("MRSA") 11.0 13.0 20 13.0 15.0 55.0</span>
<span class="co"># as.mo("VISA") 21.0 22.0 31 23.0 27.0 69.0</span>
<span class="co"># neval</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span>
<span class="co"># 25</span></code></pre></div>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-4-1.png" width="750"></p>
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 200 times slower to determine.</p>
<p>To improve performance, we implemented two important algorithms to save unnecessary calculations: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
@ -265,8 +278,8 @@
<span class="co"># what do these values look like? They are of class &lt;mo&gt;:</span>
<span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
<span class="co"># Class &lt;mo&gt;</span>
<span class="co"># [1] B_STPHY_CONS B_ESCHR_COLI B_STPHY_CONS B_ESCHR_COLI B_ESCHR_COLI</span>
<span class="co"># [6] B_STPHY_HMNS</span>
<span class="co"># [1] B_STPHY_AURS B_STPHY_CONS B_ESCHR_COLI B_STRPT_PYGN B_STPHY_CONS</span>
<span class="co"># [6] B_ESCHR_COLI</span>
<span class="co"># as the example_isolates data set has 2,000 rows, we should have 2 million items</span>
<span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
@ -282,8 +295,8 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># mo_name(x) 188 197 265 241 348 419 10</span></code></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.241 seconds. That is 121 nanoseconds on average. You only lose time on your unique input values.</p>
<span class="co"># mo_name(x) 163 204 267 233 346 398 10</span></code></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.233 seconds. That is 116 nanoseconds on average. You only lose time on your unique input values.</p>
</div>
<div id="precalculated-results" class="section level3">
<h3 class="hasAnchor">
@ -297,10 +310,10 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 7.98 8.26 15.80 8.35 9.35 60.00 10</span>
<span class="co"># B 22.30 22.90 23.90 23.50 24.30 27.20 10</span>
<span class="co"># C 1.74 2.02 2.16 2.16 2.24 2.65 10</span></code></pre></div>
<p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0022 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<span class="co"># A 7.93 8.08 14.50 8.35 8.46 70.00 10</span>
<span class="co"># B 22.40 22.80 24.30 24.30 24.60 27.20 10</span>
<span class="co"># C 1.89 2.00 2.19 2.15 2.30 2.76 10</span></code></pre></div>
<p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0021 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">run_it</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html" class="external-link">microbenchmark</a></span><span class="op">(</span>A <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_species</a></span><span class="op">(</span><span class="st">"aureus"</span><span class="op">)</span>,
B <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"Staphylococcus"</span><span class="op">)</span>,
@ -314,14 +327,14 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 1.65 1.67 1.74 1.69 1.83 1.89 10</span>
<span class="co"># B 1.64 1.65 1.72 1.69 1.78 1.86 10</span>
<span class="co"># C 1.67 1.75 1.84 1.80 1.87 2.19 10</span>
<span class="co"># D 1.65 1.68 1.77 1.72 1.80 2.14 10</span>
<span class="co"># E 1.65 1.68 1.97 1.75 2.18 2.89 10</span>
<span class="co"># F 1.57 1.64 1.71 1.67 1.74 2.02 10</span>
<span class="co"># G 1.62 1.67 1.79 1.68 1.72 2.71 10</span>
<span class="co"># H 1.63 1.70 1.84 1.72 2.04 2.27 10</span></code></pre></div>
<span class="co"># A 1.73 1.78 1.83 1.81 1.90 1.90 10</span>
<span class="co"># B 1.73 1.83 1.90 1.89 1.98 2.04 10</span>
<span class="co"># C 1.72 1.79 1.88 1.85 1.95 2.08 10</span>
<span class="co"># D 1.75 1.75 1.85 1.88 1.91 1.93 10</span>
<span class="co"># E 1.70 1.78 1.82 1.80 1.83 2.02 10</span>
<span class="co"># F 1.68 1.78 1.79 1.79 1.81 1.91 10</span>
<span class="co"># G 1.69 1.75 1.79 1.79 1.81 1.89 10</span>
<span class="co"># H 1.68 1.71 1.85 1.76 1.85 2.65 10</span></code></pre></div>
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> anyway, there is no point in calculating the result. And because this package contains all phyla of all known bacteria, it can just return the initial value immediately.</p>
</div>
<div id="results-in-other-languages" class="section level3">
@ -349,13 +362,13 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">4</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># en 19.21 19.99 26.19 20.57 22.10 194.10 100</span>
<span class="co"># de 30.22 31.42 42.42 32.36 35.01 94.70 100</span>
<span class="co"># nl 34.40 35.36 43.21 36.35 38.65 119.80 100</span>
<span class="co"># es 33.99 35.21 44.98 36.40 38.36 101.00 100</span>
<span class="co"># it 23.55 24.66 27.67 25.19 26.54 76.79 100</span>
<span class="co"># fr 23.47 24.32 27.80 25.02 26.51 82.05 100</span>
<span class="co"># pt 23.43 24.36 30.42 24.94 26.09 80.48 100</span></code></pre></div>
<span class="co"># en 19.47 20.23 24.54 20.72 21.85 89.57 100</span>
<span class="co"># de 30.58 31.52 41.31 32.78 34.76 86.03 100</span>
<span class="co"># nl 34.81 35.58 45.89 36.76 39.41 94.01 100</span>
<span class="co"># es 34.41 35.12 40.08 36.22 37.33 94.71 100</span>
<span class="co"># it 23.93 24.65 27.31 25.15 25.84 81.01 100</span>
<span class="co"># fr 23.59 24.40 31.40 25.01 25.62 200.30 100</span>
<span class="co"># pt 23.69 24.73 30.23 25.57 26.32 82.19 100</span></code></pre></div>
<p>Currently supported non-English languages are German, Dutch, Spanish, Italian, French and Portuguese.</p>
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -197,7 +197,7 @@
<div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">16 August 2021</h4>
<h4 data-toc-skip class="date">17 August 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div>

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -44,7 +44,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -47,7 +47,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -247,12 +247,12 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="amr-1719023" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9023">
<a href="#amr-1719023" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9023</h1>
<div id="last-updated-16-august-2021" class="section level2">
<div id="amr-1719024" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9024">
<a href="#amr-1719024" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9024</h1>
<div id="last-updated-17-august-2021" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-16-august-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 16 August 2021</small>
<a href="#last-updated-17-august-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 17 August 2021</small>
</h2>
<div id="breaking-changes" class="section level3">
<h3 class="hasAnchor">

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2021-08-16T19:51Z
last_built: 2021-08-17T12:31Z
urls:
reference: https://msberends.github.io/AMR/reference
article: https://msberends.github.io/AMR/articles

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -262,8 +262,6 @@
snake_case <span class='op'>=</span> <span class='va'>property</span> <span class='op'>==</span> <span class='st'>"name"</span>
<span class='op'>)</span>
<span class='fu'>ab_atc</span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_cid</span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_synonyms</span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span>
@ -272,6 +270,8 @@
<span class='fu'>ab_group</span><span class='op'>(</span><span class='va'>x</span>, language <span class='op'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span><span class='op'>(</span><span class='op'>)</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_atc</span><span class='op'>(</span><span class='va'>x</span>, only_first <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_atc_group1</span><span class='op'>(</span><span class='va'>x</span>, language <span class='op'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span><span class='op'>(</span><span class='op'>)</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_atc_group2</span><span class='op'>(</span><span class='va'>x</span>, language <span class='op'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span><span class='op'>(</span><span class='op'>)</span>, <span class='va'>...</span><span class='op'>)</span>
@ -319,6 +319,10 @@
<th>snake_case</th>
<td><p>a <a href='https://rdrr.io/r/base/logical.html'>logical</a> to indicate whether the names should be in so-called <a href='https://en.wikipedia.org/wiki/Snake_case'>snake case</a>: in lower case and all spaces/slashes replaced with an underscore (<code>_</code>)</p></td>
</tr>
<tr>
<th>only_first</th>
<td><p>a <a href='https://rdrr.io/r/base/logical.html'>logical</a> to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)</p></td>
</tr>
<tr>
<th>administration</th>
<td><p>way of administration, either <code>"oral"</code> or <code>"iv"</code></p></td>
@ -376,7 +380,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<div class="ref-examples sourceCode"><pre class='sourceCode r'><code><span class='co'># all properties:</span>
<span class='fu'>ab_name</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># "Amoxicillin"</span>
<span class='fu'>ab_atc</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># J01CA04 (ATC code from the WHO)</span>
<span class='fu'>ab_atc</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># "J01CA04" (ATC code from the WHO)</span>
<span class='fu'>ab_cid</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># 33613 (Compound ID from PubChem)</span>
<span class='fu'>ab_synonyms</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># a list with brand names of amoxicillin</span>
<span class='fu'>ab_tradenames</span><span class='op'>(</span><span class='st'>"AMX"</span><span class='op'>)</span> <span class='co'># same</span>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -253,63 +253,63 @@
<p>These functions allow for filtering rows and selecting columns based on antibiotic test results that are of a specific antibiotic class or group, without the need to define the columns or antibiotic abbreviations. In short, if you have a column name that resembles an antimicrobial agent, it will be picked up by any of these functions that matches its pharmaceutical class: "cefazolin", "CZO" and "J01DB04" will all be picked up by <code>cephalosporins()</code>.</p>
</div>
<div class="ref-usage sourceCode"><pre class='sourceCode r'><code><span class='fu'>ab_class</span><span class='op'>(</span><span class='va'>ab_class</span>, only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<div class="ref-usage sourceCode"><pre class='sourceCode r'><code><span class='fu'>ab_class</span><span class='op'>(</span><span class='va'>ab_class</span>, only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ab_selector</span><span class='op'>(</span><span class='va'>filter</span>, only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'>ab_selector</span><span class='op'>(</span><span class='va'>filter</span>, only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>administrable_per_os</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>administrable_per_os</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>administrable_iv</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>administrable_iv</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>aminoglycosides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'>aminoglycosides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>aminopenicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>aminopenicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>antifungals</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>antifungals</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>antimycobacterials</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>antimycobacterials</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>betalactams</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'>betalactams</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>carbapenems</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'>carbapenems</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins_1st</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins_1st</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins_2nd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins_2nd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins_3rd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins_3rd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins_4th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins_4th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>cephalosporins_5th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>cephalosporins_5th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>fluoroquinolones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>fluoroquinolones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>glycopeptides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>glycopeptides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>lincosamides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>lincosamides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>lipoglycopeptides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>lipoglycopeptides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>macrolides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>macrolides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>oxazolidinones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>oxazolidinones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>penicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>penicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>polymyxins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'>polymyxins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, only_treatable <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>streptogramins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>streptogramins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>quinolones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>quinolones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>tetracyclines</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>tetracyclines</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>trimethoprims</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='fu'>trimethoprims</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='fu'>ureidopenicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span></code></pre></div>
<span class='fu'>ureidopenicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span></code></pre></div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@ -326,6 +326,10 @@
<th>only_treatable</th>
<td><p>a <a href='https://rdrr.io/r/base/logical.html'>logical</a> to indicate whether agents that are only for laboratory tests should be excluded (defaults to <code>TRUE</code>), such as gentamicin-high (<code>GEH</code>) and imipenem/EDTA (<code>IPE</code>)</p></td>
</tr>
<tr>
<th>...</th>
<td><p>ignored, only in place to allow future extensions</p></td>
</tr>
<tr>
<th>filter</th>
<td><p>an <a href='https://rdrr.io/r/base/expression.html'>expression</a> to be evaluated in the <a href='antibiotics.html'>antibiotics</a> data set, such as <code>name %like% "trim"</code></p></td>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -94,7 +94,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
</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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -94,7 +94,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>
@ -409,7 +409,7 @@
</tr><tr>
<td>
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">set_ab_names()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_loinc()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_ddd_units()</a></code> <code><a href="ab_property.html">ab_info()</a></code> <code><a href="ab_property.html">ab_url()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">set_ab_names()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_loinc()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_ddd_units()</a></code> <code><a href="ab_property.html">ab_info()</a></code> <code><a href="ab_property.html">ab_url()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
</td>
<td><p>Get Properties of an Antibiotic</p></td>
</tr><tr>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -95,7 +95,7 @@ This page contains a section for every lifecycle (with text borrowed from the af
</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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -94,7 +94,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
</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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -94,7 +94,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
</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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -94,7 +94,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
</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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -93,7 +93,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -213,4 +213,7 @@
<url>
<loc>https://msberends.github.io/AMR/reference/translate.html</loc>
</url>
<url>
<loc>https://msberends.github.io/AMR/survey.html</loc>
</url>
</urlset>

View File

@ -92,7 +92,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">1.7.1.9023</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9024</span>
</span>
</div>

View File

@ -5,11 +5,11 @@
\alias{ab_name}
\alias{set_ab_names}
\alias{ATC}
\alias{ab_atc}
\alias{ab_cid}
\alias{ab_synonyms}
\alias{ab_tradenames}
\alias{ab_group}
\alias{ab_atc}
\alias{ab_atc_group1}
\alias{ab_atc_group2}
\alias{ab_loinc}
@ -28,8 +28,6 @@ set_ab_names(
snake_case = property == "name"
)
ab_atc(x, ...)
ab_cid(x, ...)
ab_synonyms(x, ...)
@ -38,6 +36,8 @@ ab_tradenames(x, ...)
ab_group(x, language = get_locale(), ...)
ab_atc(x, only_first = FALSE, ...)
ab_atc_group1(x, language = get_locale(), ...)
ab_atc_group2(x, language = get_locale(), ...)
@ -69,6 +69,8 @@ ab_property(x, property = "name", language = get_locale(), ...)
\item{snake_case}{a \link{logical} to indicate whether the names should be in so-called \href{https://en.wikipedia.org/wiki/Snake_case}{snake case}: in lower case and all spaces/slashes replaced with an underscore (\verb{_})}
\item{only_first}{a \link{logical} to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)}
\item{administration}{way of administration, either \code{"oral"} or \code{"iv"}}
\item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}}
@ -122,7 +124,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
\examples{
# all properties:
ab_name("AMX") # "Amoxicillin"
ab_atc("AMX") # J01CA04 (ATC code from the WHO)
ab_atc("AMX") # "J01CA04" (ATC code from the WHO)
ab_cid("AMX") # 33613 (Compound ID from PubChem)
ab_synonyms("AMX") # a list with brand names of amoxicillin
ab_tradenames("AMX") # same

View File

@ -33,63 +33,63 @@
\alias{ureidopenicillins}
\title{Antibiotic Selectors}
\usage{
ab_class(ab_class, only_rsi_columns = FALSE, only_treatable = TRUE)
ab_class(ab_class, only_rsi_columns = FALSE, only_treatable = TRUE, ...)
ab_selector(filter, only_rsi_columns = FALSE, only_treatable = TRUE)
ab_selector(filter, only_rsi_columns = FALSE, only_treatable = TRUE, ...)
administrable_per_os(only_rsi_columns = FALSE)
administrable_per_os(only_rsi_columns = FALSE, ...)
administrable_iv(only_rsi_columns = FALSE)
administrable_iv(only_rsi_columns = FALSE, ...)
aminoglycosides(only_rsi_columns = FALSE, only_treatable = TRUE)
aminoglycosides(only_rsi_columns = FALSE, only_treatable = TRUE, ...)
aminopenicillins(only_rsi_columns = FALSE)
aminopenicillins(only_rsi_columns = FALSE, ...)
antifungals(only_rsi_columns = FALSE)
antifungals(only_rsi_columns = FALSE, ...)
antimycobacterials(only_rsi_columns = FALSE)
antimycobacterials(only_rsi_columns = FALSE, ...)
betalactams(only_rsi_columns = FALSE, only_treatable = TRUE)
betalactams(only_rsi_columns = FALSE, only_treatable = TRUE, ...)
carbapenems(only_rsi_columns = FALSE, only_treatable = TRUE)
carbapenems(only_rsi_columns = FALSE, only_treatable = TRUE, ...)
cephalosporins(only_rsi_columns = FALSE)
cephalosporins(only_rsi_columns = FALSE, ...)
cephalosporins_1st(only_rsi_columns = FALSE)
cephalosporins_1st(only_rsi_columns = FALSE, ...)
cephalosporins_2nd(only_rsi_columns = FALSE)
cephalosporins_2nd(only_rsi_columns = FALSE, ...)
cephalosporins_3rd(only_rsi_columns = FALSE)
cephalosporins_3rd(only_rsi_columns = FALSE, ...)
cephalosporins_4th(only_rsi_columns = FALSE)
cephalosporins_4th(only_rsi_columns = FALSE, ...)
cephalosporins_5th(only_rsi_columns = FALSE)
cephalosporins_5th(only_rsi_columns = FALSE, ...)
fluoroquinolones(only_rsi_columns = FALSE)
fluoroquinolones(only_rsi_columns = FALSE, ...)
glycopeptides(only_rsi_columns = FALSE)
glycopeptides(only_rsi_columns = FALSE, ...)
lincosamides(only_rsi_columns = FALSE)
lincosamides(only_rsi_columns = FALSE, ...)
lipoglycopeptides(only_rsi_columns = FALSE)
lipoglycopeptides(only_rsi_columns = FALSE, ...)
macrolides(only_rsi_columns = FALSE)
macrolides(only_rsi_columns = FALSE, ...)
oxazolidinones(only_rsi_columns = FALSE)
oxazolidinones(only_rsi_columns = FALSE, ...)
penicillins(only_rsi_columns = FALSE)
penicillins(only_rsi_columns = FALSE, ...)
polymyxins(only_rsi_columns = FALSE, only_treatable = TRUE)
polymyxins(only_rsi_columns = FALSE, only_treatable = TRUE, ...)
streptogramins(only_rsi_columns = FALSE)
streptogramins(only_rsi_columns = FALSE, ...)
quinolones(only_rsi_columns = FALSE)
quinolones(only_rsi_columns = FALSE, ...)
tetracyclines(only_rsi_columns = FALSE)
tetracyclines(only_rsi_columns = FALSE, ...)
trimethoprims(only_rsi_columns = FALSE)
trimethoprims(only_rsi_columns = FALSE, ...)
ureidopenicillins(only_rsi_columns = FALSE)
ureidopenicillins(only_rsi_columns = FALSE, ...)
}
\arguments{
\item{ab_class}{an antimicrobial class, such as \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.}
@ -98,6 +98,8 @@ ureidopenicillins(only_rsi_columns = FALSE)
\item{only_treatable}{a \link{logical} to indicate whether agents that are only for laboratory tests should be excluded (defaults to \code{TRUE}), such as gentamicin-high (\code{GEH}) and imipenem/EDTA (\code{IPE})}
\item{...}{ignored, only in place to allow future extensions}
\item{filter}{an \link{expression} to be evaluated in the \link{antibiotics} data set, such as \code{name \%like\% "trim"}}
}
\value{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long