Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
7e70403efb | |||
279376fccb | |||
bef0f42f66 | |||
f406319503 |
3
.github/workflows/check.yaml
vendored
@ -79,7 +79,8 @@ jobs:
|
||||
env:
|
||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||
RSPM: ${{ matrix.config.rspm }}
|
||||
|
||||
R_REPOSITORIES: "https://cran.rstudio.com"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
2
.github/workflows/codecovr.yaml
vendored
@ -53,7 +53,7 @@ jobs:
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ env.R_LIBS_USER }}
|
||||
key: macOS-latest-r-release-v4
|
||||
key: macOS-latest-r-release-v5-codecovr
|
||||
|
||||
- name: Unpack AMR and install R dependencies
|
||||
run: |
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 1.7.0
|
||||
Date: 2021-05-26
|
||||
Version: 1.7.1
|
||||
Date: 2021-06-03
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Authors@R: c(
|
||||
person(role = c("aut", "cre"),
|
||||
@ -43,7 +43,6 @@ Depends:
|
||||
R (>= 3.0.0)
|
||||
Suggests:
|
||||
cleaner,
|
||||
covr,
|
||||
curl,
|
||||
dplyr,
|
||||
ggplot2,
|
||||
|
8
NEWS.md
@ -1,8 +1,8 @@
|
||||
# `AMR` 1.7.0
|
||||
|
||||
# `AMR` 1.7.1
|
||||
|
||||
### Breaking change
|
||||
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release.
|
||||
* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
|
||||
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:
|
||||
```r
|
||||
# select columns with results for carbapenems
|
||||
example_isolates[, carbapenems()] # base R
|
||||
@ -35,6 +35,7 @@
|
||||
|
||||
|
||||
### Changed
|
||||
* `bug_drug_combinations()` now supports grouping using the `dplyr` package
|
||||
* Custom MDRO guidelines (`mdro()`, `custom_mdro_guideline()`):
|
||||
* Custom MDRO guidelines can now be combined with other custom MDRO guidelines using `c()`
|
||||
* Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule
|
||||
@ -67,6 +68,7 @@
|
||||
* `age()` now vectorises over both `x` and `reference`
|
||||
|
||||
### Other
|
||||
* As requested by CRAN administrators: decreased package size by 3 MB in costs of a slower loading time of the package
|
||||
* All unit tests are now processed by the `tinytest` package, instead of the `testthat` package. The `testthat` package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the `tinytest` package is very lightweight and dependency-free.
|
||||
|
||||
|
||||
|
@ -178,9 +178,7 @@ search_type_in_df <- function(x, type, info = TRUE) {
|
||||
found <- sort(colnames(x)[vapply(FUN.VALUE = logical(1), x, is.mo)])[1]
|
||||
} else if ("mo" %in% colnames(x) &
|
||||
suppressWarnings(
|
||||
all(x$mo %in% c(NA,
|
||||
microorganisms$mo,
|
||||
microorganisms.translation$mo_old)))) {
|
||||
all(x$mo %in% c(NA, microorganisms$mo)))) {
|
||||
found <- "mo"
|
||||
} else if (any(colnames(x) %like% "^(mo|microorganism|organism|bacteria|ba[ck]terie)s?$")) {
|
||||
found <- sort(colnames(x)[colnames(x) %like% "^(mo|microorganism|organism|bacteria|ba[ck]terie)s?$"])[1]
|
||||
|
@ -73,6 +73,11 @@
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # get AMR for all aminoglycosides e.g., per hospital:
|
||||
#' example_isolates %>%
|
||||
#' group_by(hospital_id) %>%
|
||||
#' summarise(across(aminoglycosides(), resistance))
|
||||
#'
|
||||
#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
|
||||
#' example_isolates %>%
|
||||
#' select(carbapenems())
|
||||
|
4
R/amr.R
@ -54,14 +54,14 @@
|
||||
#' @section Reference Data Publicly Available:
|
||||
#' All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this `AMR` package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find [all download links on our website](https://msberends.github.io/AMR/articles/datasets.html), which is automatically updated with every code change.
|
||||
#' @section Read more on Our Website!:
|
||||
#' On our website <https://msberends.github.io/AMR/> you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR data analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html). As we would like to better understand the backgrounds and needs of our users, please [participate in our survey](https://msberends.github.io/AMR/survey.html)!
|
||||
#' On our website <https://msberends.github.io/AMR/> you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR data analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html).
|
||||
#' @section Contact Us:
|
||||
#' For suggestions, comments or questions, please contact us at:
|
||||
#'
|
||||
#' Matthijs S. Berends \cr
|
||||
#' m.s.berends \[at\] umcg \[dot\] nl \cr
|
||||
#' University of Groningen
|
||||
#' Department of Medical Microbiology
|
||||
#' Department of Medical Microbiology and Infection Prevention
|
||||
#' University Medical Center Groningen \cr
|
||||
#' Post Office Box 30001 \cr
|
||||
#' 9700 RB Groningen \cr
|
||||
|
@ -31,7 +31,7 @@
|
||||
#' @param combine_IR a [logical] to indicate whether values R and I should be summed
|
||||
#' @param add_ab_group a [logical] to indicate where the group of the antimicrobials must be included as a first column
|
||||
#' @param remove_intrinsic_resistant [logical] to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table
|
||||
#' @param FUN the function to call on the `mo` column to transform the microorganism IDs, defaults to [mo_shortname()]
|
||||
#' @param FUN the function to call on the `mo` column to transform the microorganism codes, defaults to [mo_shortname()]
|
||||
#' @param translate_ab a [character] of length 1 containing column names of the [antibiotics] data set
|
||||
#' @param ... arguments passed on to `FUN`
|
||||
#' @inheritParams rsi_df
|
||||
@ -74,42 +74,87 @@ bug_drug_combinations <- function(x,
|
||||
stop_ifnot(col_mo %in% colnames(x), "column '", col_mo, "' (`col_mo`) not found")
|
||||
}
|
||||
|
||||
x_class <- class(x)
|
||||
x.bak <- x
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
x[, col_mo] <- FUN(x[, col_mo, drop = TRUE], ...)
|
||||
x <- x[, c(col_mo, names(which(vapply(FUN.VALUE = logical(1), x, is.rsi)))), drop = FALSE]
|
||||
|
||||
unique_mo <- sort(unique(x[, col_mo, drop = TRUE]))
|
||||
|
||||
out <- data.frame(mo = character(0),
|
||||
ab = character(0),
|
||||
S = integer(0),
|
||||
I = integer(0),
|
||||
R = integer(0),
|
||||
total = integer(0),
|
||||
stringsAsFactors = FALSE)
|
||||
|
||||
for (i in seq_len(length(unique_mo))) {
|
||||
# filter on MO group and only select R/SI columns
|
||||
x_mo_filter <- x[which(x[, col_mo, drop = TRUE] == unique_mo[i]), names(which(vapply(FUN.VALUE = logical(1), x, is.rsi))), drop = FALSE]
|
||||
# turn and merge everything
|
||||
pivot <- lapply(x_mo_filter, function(x) {
|
||||
m <- as.matrix(table(x))
|
||||
data.frame(S = m["S", ], I = m["I", ], R = m["R", ], stringsAsFactors = FALSE)
|
||||
})
|
||||
merged <- do.call(rbind, pivot)
|
||||
out_group <- data.frame(mo = unique_mo[i],
|
||||
ab = rownames(merged),
|
||||
S = merged$S,
|
||||
I = merged$I,
|
||||
R = merged$R,
|
||||
total = merged$S + merged$I + merged$R,
|
||||
stringsAsFactors = FALSE)
|
||||
out <- rbind(out, out_group, stringsAsFactors = FALSE)
|
||||
# select only groups and antibiotics
|
||||
if (inherits(x.bak, "grouped_df")) {
|
||||
data_has_groups <- TRUE
|
||||
groups <- setdiff(names(attributes(x.bak)$groups), ".rows")
|
||||
x <- x[, c(groups, col_mo, colnames(x)[vapply(FUN.VALUE = logical(1), x, is.rsi)]), drop = FALSE]
|
||||
} else {
|
||||
data_has_groups <- FALSE
|
||||
x <- x[, c(col_mo, names(which(vapply(FUN.VALUE = logical(1), x, is.rsi)))), drop = FALSE]
|
||||
}
|
||||
|
||||
set_clean_class(out,
|
||||
new_class = c("bug_drug_combinations", x_class))
|
||||
run_it <- function(x) {
|
||||
out <- data.frame(mo = character(0),
|
||||
ab = character(0),
|
||||
S = integer(0),
|
||||
I = integer(0),
|
||||
R = integer(0),
|
||||
total = integer(0),
|
||||
stringsAsFactors = FALSE)
|
||||
if (data_has_groups) {
|
||||
group_values <- unique(x[, which(colnames(x) %in% groups), drop = FALSE])
|
||||
rownames(group_values) <- NULL
|
||||
x <- x[, which(!colnames(x) %in% groups), drop = FALSE]
|
||||
}
|
||||
|
||||
for (i in seq_len(length(unique_mo))) {
|
||||
# filter on MO group and only select R/SI columns
|
||||
x_mo_filter <- x[which(x[, col_mo, drop = TRUE] == unique_mo[i]), names(which(vapply(FUN.VALUE = logical(1), x, is.rsi))), drop = FALSE]
|
||||
# turn and merge everything
|
||||
pivot <- lapply(x_mo_filter, function(x) {
|
||||
m <- as.matrix(table(x))
|
||||
data.frame(S = m["S", ], I = m["I", ], R = m["R", ], stringsAsFactors = FALSE)
|
||||
})
|
||||
merged <- do.call(rbind, pivot)
|
||||
out_group <- data.frame(mo = unique_mo[i],
|
||||
ab = rownames(merged),
|
||||
S = merged$S,
|
||||
I = merged$I,
|
||||
R = merged$R,
|
||||
total = merged$S + merged$I + merged$R,
|
||||
stringsAsFactors = FALSE)
|
||||
if (data_has_groups) {
|
||||
if (nrow(group_values) < nrow(out_group)) {
|
||||
# repeat group_values for the number of rows in out_group
|
||||
repeated <- rep(seq_len(nrow(group_values)),
|
||||
each = nrow(out_group) / nrow(group_values))
|
||||
group_values <- group_values[repeated, , drop = FALSE]
|
||||
}
|
||||
out_group <- cbind(group_values, out_group)
|
||||
}
|
||||
out <- rbind(out, out_group, stringsAsFactors = FALSE)
|
||||
}
|
||||
out
|
||||
}
|
||||
# based on pm_apply_grouped_function
|
||||
apply_group <- function(.data, fn, groups, drop = FALSE, ...) {
|
||||
grouped <- pm_split_into_groups(.data, groups, drop)
|
||||
res <- do.call(rbind, unname(lapply(grouped, fn, ...)))
|
||||
if (any(groups %in% colnames(res))) {
|
||||
class(res) <- c("grouped_data", class(res))
|
||||
res <- pm_set_groups(res, groups[groups %in% colnames(res)])
|
||||
}
|
||||
res
|
||||
}
|
||||
|
||||
if (data_has_groups) {
|
||||
out <- apply_group(x, "run_it", groups)
|
||||
rownames(out) <- NULL
|
||||
set_clean_class(out,
|
||||
new_class = c("grouped", "bug_drug_combinations", "data.frame"))
|
||||
} else {
|
||||
out <- run_it(x)
|
||||
rownames(out) <- NULL
|
||||
set_clean_class(out,
|
||||
new_class = c("bug_drug_combinations", "data.frame"))
|
||||
}
|
||||
}
|
||||
|
||||
#' @method format bug_drug_combinations
|
||||
@ -137,6 +182,21 @@ format.bug_drug_combinations <- function(x,
|
||||
meet_criteria(decimal.mark, allow_class = "character", has_length = 1)
|
||||
meet_criteria(big.mark, allow_class = "character", has_length = 1)
|
||||
|
||||
if (inherits(x, "grouped")) {
|
||||
# bug_drug_combinations() has been run on groups, so de-group here
|
||||
warning_("formatting the output of `bug_drug_combinations()` does not support grouped variables, they are ignored", call = FALSE)
|
||||
idx <- split(seq_len(nrow(x)), paste0(x$mo, "%%", x$ab))
|
||||
x <- data.frame(mo = gsub("(.*)%%(.*)", "\\1", names(idx)),
|
||||
ab = gsub("(.*)%%(.*)", "\\2", names(idx)),
|
||||
S = sapply(idx, function(i) sum(y$S[i], na.rm = TRUE)),
|
||||
I = sapply(idx, function(i) sum(y$I[i], na.rm = TRUE)),
|
||||
R = sapply(idx, function(i) sum(y$R[i], na.rm = TRUE)),
|
||||
total = sapply(idx, function(i) sum(y$S[i], na.rm = TRUE) +
|
||||
sum(y$I[i], na.rm = TRUE) +
|
||||
sum(y$R[i], na.rm = TRUE)),
|
||||
stringsAsFactors = FALSE)
|
||||
}
|
||||
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
x <- subset(x, total >= minimum)
|
||||
|
||||
@ -249,7 +309,9 @@ format.bug_drug_combinations <- function(x,
|
||||
print.bug_drug_combinations <- function(x, ...) {
|
||||
x_class <- class(x)
|
||||
print(set_clean_class(x,
|
||||
new_class = x_class[x_class != "bug_drug_combinations"]),
|
||||
new_class = x_class[!x_class %in% c("bug_drug_combinations", "grouped")]),
|
||||
...)
|
||||
message_("Use 'format()' on this result to get a publishable/printable format.", as_note = FALSE)
|
||||
message_("Use 'format()' on this result to get a publishable/printable format.",
|
||||
ifelse(inherits(x, "grouped"), " Note: The grouping variable(s) will be ignored.", ""),
|
||||
as_note = FALSE)
|
||||
}
|
||||
|
2
R/data.R
@ -239,7 +239,7 @@
|
||||
|
||||
#' Data Set for R/SI Interpretation
|
||||
#'
|
||||
#' Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`) and EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`). Use [as.rsi()] to transform MICs or disks measurements to R/SI values.
|
||||
#' Data set containing reference data to interpret MIC and disk diffusion to R/SI values, according to international guidelines. Currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`). Use [as.rsi()] to transform MICs or disks measurements to R/SI values.
|
||||
#' @format A [data.frame] with `r format(nrow(rsi_translation), big.mark = ",")` observations and `r ncol(rsi_translation)` variables:
|
||||
#' - `guideline`\cr Name of the guideline
|
||||
#' - `method`\cr Either `r vector_or(rsi_translation$method)`
|
||||
|
@ -472,8 +472,8 @@ first_isolate <- function(x = NULL,
|
||||
as_note = FALSE)
|
||||
}
|
||||
if (type == "points") {
|
||||
message_("Basing inclusion on all antimicrobial results, using a points threshold of "
|
||||
, points_threshold,
|
||||
message_("Basing inclusion on all antimicrobial results, using a points threshold of ",
|
||||
points_threshold,
|
||||
add_fn = font_black,
|
||||
as_note = FALSE)
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ key_antimicrobials <- function(x = NULL,
|
||||
meet_criteria(antifungal, allow_class = "character", allow_NULL = TRUE)
|
||||
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
|
||||
|
||||
# force regular [data.frame], not a tibble or data.table
|
||||
# force regular data.frame, not a tibble or data.table
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
cols <- get_column_abx(x, info = FALSE, only_rsi_columns = only_rsi_columns)
|
||||
|
||||
@ -237,7 +237,7 @@ all_antimicrobials <- function(x = NULL,
|
||||
meet_criteria(x, allow_class = "data.frame") # also checks dimensions to be >0
|
||||
meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1)
|
||||
|
||||
# force regular [data.frame], not a tibble or data.table
|
||||
# force regular data.frame, not a tibble or data.table
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
cols <- get_column_abx(x, only_rsi_columns = only_rsi_columns, info = FALSE, sort = FALSE)
|
||||
|
||||
|
73
R/mo.R
@ -23,9 +23,9 @@
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Transform Input to a Microorganism ID
|
||||
#' Transform Input to a Microorganism Code
|
||||
#'
|
||||
#' Use this function to determine a valid microorganism ID ([`mo`]). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
|
||||
#' Use this function to determine a valid microorganism code ([`mo`]). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
|
||||
#' @inheritSection lifecycle Stable Lifecycle
|
||||
#' @param x a [character] vector or a [data.frame] with one or two columns
|
||||
#' @param Becker a [logical] to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker *et al.* (1,2,3).
|
||||
@ -46,7 +46,7 @@
|
||||
#' @details
|
||||
#' ## General Info
|
||||
#'
|
||||
#' A microorganism ID from this package (class: [`mo`]) is human readable and typically looks like these examples:
|
||||
#' A microorganism (MO) code from this package (class: [`mo`]) is human readable and typically looks like these examples:
|
||||
#' ```
|
||||
#' Code Full name
|
||||
#' --------------- --------------------------------------
|
||||
@ -1817,8 +1817,7 @@ as.data.frame.mo <- function(x, ...) {
|
||||
y <- NextMethod()
|
||||
attributes(y) <- attributes(i)
|
||||
# must only contain valid MOs
|
||||
return_after_integrity_check(y, "microorganism code", c(as.character(microorganisms$mo),
|
||||
as.character(microorganisms.translation$mo_old)))
|
||||
return_after_integrity_check(y, "microorganism code", as.character(microorganisms$mo))
|
||||
}
|
||||
#' @method [[<- mo
|
||||
#' @export
|
||||
@ -1827,8 +1826,7 @@ as.data.frame.mo <- function(x, ...) {
|
||||
y <- NextMethod()
|
||||
attributes(y) <- attributes(i)
|
||||
# must only contain valid MOs
|
||||
return_after_integrity_check(y, "microorganism code", c(as.character(microorganisms$mo),
|
||||
as.character(microorganisms.translation$mo_old)))
|
||||
return_after_integrity_check(y, "microorganism code", as.character(microorganisms$mo))
|
||||
}
|
||||
#' @method c mo
|
||||
#' @export
|
||||
@ -1837,8 +1835,7 @@ c.mo <- function(...) {
|
||||
x <- list(...)[[1L]]
|
||||
y <- NextMethod()
|
||||
attributes(y) <- attributes(x)
|
||||
return_after_integrity_check(y, "microorganism code", c(as.character(microorganisms$mo),
|
||||
as.character(microorganisms.translation$mo_old)))
|
||||
return_after_integrity_check(y, "microorganism code", as.character(microorganisms$mo))
|
||||
}
|
||||
|
||||
#' @method unique mo
|
||||
@ -2053,24 +2050,52 @@ parse_and_convert <- function(x) {
|
||||
}
|
||||
|
||||
replace_old_mo_codes <- function(x, property) {
|
||||
if (any(toupper(x) %in% microorganisms.translation$mo_old, na.rm = TRUE)) {
|
||||
ind <- x %like_case% "^[A-Z]_[A-Z_]+$" & !x %in% MO_lookup$mo
|
||||
if (any(ind)) {
|
||||
# get the ones that match
|
||||
matched <- match(toupper(x), microorganisms.translation$mo_old)
|
||||
# and their new codes
|
||||
mo_new <- microorganisms.translation$mo_new[matched]
|
||||
affected <- x[ind]
|
||||
affected_unique <- unique(affected)
|
||||
all_direct_matches <- TRUE
|
||||
# find their new codes, once per code
|
||||
solved_unique <- unlist(lapply(strsplit(affected_unique, ""),
|
||||
function(m) {
|
||||
kingdom <- paste0("^", m[1])
|
||||
name <- m[3:length(m)]
|
||||
name[name == "_"] <- " "
|
||||
name <- tolower(paste0(name, ".*", collapse = ""))
|
||||
name <- gsub(" .*", " ", name, fixed = TRUE)
|
||||
name <- paste0("^", name)
|
||||
results <- MO_lookup$mo[MO_lookup$kingdom %like_case% kingdom &
|
||||
MO_lookup$fullname_lower %like_case% name]
|
||||
if (length(results) > 1) {
|
||||
all_direct_matches <<- FALSE
|
||||
}
|
||||
results[1L]
|
||||
}), use.names = FALSE)
|
||||
solved <- solved_unique[match(affected, affected_unique)]
|
||||
# assign on places where a match was found
|
||||
x[which(!is.na(matched))] <- mo_new[which(!is.na(matched))]
|
||||
n_matched <- length(matched[!is.na(matched)])
|
||||
if (property != "mo") {
|
||||
message_(font_blue(paste0("The input contained ", n_matched,
|
||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (from a previous AMR package version). Please update your MO codes with `as.mo()`.")))
|
||||
x[ind] <- solved
|
||||
n_matched <- length(affected[!is.na(affected)])
|
||||
n_unique <- length(affected_unique[!is.na(affected_unique)])
|
||||
if (n_unique < n_matched) {
|
||||
n_unique <- paste0(n_unique, " unique, ")
|
||||
} else {
|
||||
message_(font_blue(paste0(n_matched, " old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (from a previous AMR package version) ",
|
||||
ifelse(n_matched == 1, "was", "were"),
|
||||
" updated to ", ifelse(n_matched == 1, "a ", ""),
|
||||
"currently used MO code", ifelse(n_matched == 1, "", "s"), ".")))
|
||||
n_unique <- ""
|
||||
}
|
||||
if (property != "mo") {
|
||||
warning_(paste0("The input contained ", n_matched,
|
||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (", n_unique, "from a previous AMR package version). ",
|
||||
"Please update your MO codes with `as.mo()` to increase speed."),
|
||||
call = FALSE)
|
||||
} else {
|
||||
warning_(paste0(n_matched, " old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (", n_unique, "from a previous AMR package version) ",
|
||||
ifelse(n_matched == 1, "was", "were"),
|
||||
ifelse(all_direct_matches, " updated ", font_bold(" guessed ")),
|
||||
"to ", ifelse(n_matched == 1, "a ", ""),
|
||||
"currently used MO code", ifelse(n_matched == 1, "", "s"), "."),
|
||||
call = FALSE)
|
||||
}
|
||||
}
|
||||
x
|
||||
|
@ -275,9 +275,9 @@ check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_o
|
||||
return(FALSE)
|
||||
}
|
||||
}
|
||||
if (!all(x$mo %in% c("", microorganisms$mo, microorganisms.translation$mo_old), na.rm = TRUE)) {
|
||||
if (!all(x$mo %in% c("", microorganisms$mo), na.rm = TRUE)) {
|
||||
if (stop_on_error == TRUE) {
|
||||
invalid <- x[which(!x$mo %in% c("", microorganisms$mo, microorganisms.translation$mo_old)), , drop = FALSE]
|
||||
invalid <- x[which(!x$mo %in% c("", microorganisms$mo)), , drop = FALSE]
|
||||
if (nrow(invalid) > 1) {
|
||||
plural <- "s"
|
||||
} else {
|
||||
|
6
R/rsi.R
@ -65,9 +65,9 @@
|
||||
#'
|
||||
#' ## Supported Guidelines
|
||||
#'
|
||||
#' For interpreting MIC values as well as disk diffusion diameters, currently supported guidelines to be used as input for the `guideline` argument are: `r vector_and(AMR::rsi_translation$guideline, quotes = TRUE, reverse = TRUE)`.
|
||||
#' For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`).
|
||||
#'
|
||||
#' Simply using `"CLSI"` or `"EUCAST"` as input will automatically select the latest version of that guideline. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
|
||||
#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(rsi_translation, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(rsi_translation, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
|
||||
#'
|
||||
#' ## After Interpretation
|
||||
#'
|
||||
@ -92,7 +92,7 @@
|
||||
#' - **I = Increased exposure, but still susceptible**\cr
|
||||
#' A microorganism is categorised as *Susceptible, Increased exposure* when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.
|
||||
#'
|
||||
#' This AMR package honours this new insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
|
||||
#' This AMR package honours this (new) insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
|
||||
#' @return Ordered [factor] with new class `<rsi>`
|
||||
#' @aliases rsi
|
||||
#' @export
|
||||
|
BIN
R/sysdata.rda
72
R/zzz.R
@ -72,4 +72,76 @@ if (utf8_supported && !is_latex) {
|
||||
invisible(get_mo_source())
|
||||
}
|
||||
}, silent = TRUE)
|
||||
|
||||
|
||||
# reference data - they have additional columns compared to `antibiotics` and `microorganisms` to improve speed
|
||||
assign(x = "AB_lookup", value = create_AB_lookup(), envir = asNamespace("AMR"))
|
||||
assign(x = "MO_lookup", value = create_MO_lookup(), envir = asNamespace("AMR"))
|
||||
assign(x = "MO.old_lookup", value = create_MO.old_lookup(), envir = asNamespace("AMR"))
|
||||
# for mo_is_intrinsic_resistant() - saves a lot of time when executed on this vector
|
||||
assign(x = "INTRINSIC_R", value = create_intr_resistance(), envir = asNamespace("AMR"))
|
||||
}
|
||||
|
||||
|
||||
# Helper functions --------------------------------------------------------
|
||||
|
||||
create_AB_lookup <- function() {
|
||||
AB_lookup <- AMR::antibiotics
|
||||
AB_lookup$generalised_name <- generalise_antibiotic_name(AB_lookup$name)
|
||||
AB_lookup$generalised_synonyms <- lapply(AB_lookup$synonyms, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_abbreviations <- lapply(AB_lookup$abbreviations, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_loinc <- lapply(AB_lookup$loinc, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_all <- unname(lapply(as.list(as.data.frame(t(AB_lookup[,
|
||||
c("ab", "atc", "cid", "name",
|
||||
colnames(AB_lookup)[colnames(AB_lookup) %like% "generalised"]),
|
||||
drop = FALSE]),
|
||||
stringsAsFactors = FALSE)),
|
||||
function(x) {
|
||||
x <- generalise_antibiotic_name(unname(unlist(x)))
|
||||
x[x != ""]
|
||||
}))
|
||||
AB_lookup
|
||||
}
|
||||
|
||||
create_MO_lookup <- function() {
|
||||
MO_lookup <- AMR::microorganisms
|
||||
|
||||
MO_lookup$kingdom_index <- NA_real_
|
||||
MO_lookup[which(MO_lookup$kingdom == "Bacteria" | MO_lookup$mo == "UNKNOWN"), "kingdom_index"] <- 1
|
||||
MO_lookup[which(MO_lookup$kingdom == "Fungi"), "kingdom_index"] <- 2
|
||||
MO_lookup[which(MO_lookup$kingdom == "Protozoa"), "kingdom_index"] <- 3
|
||||
MO_lookup[which(MO_lookup$kingdom == "Archaea"), "kingdom_index"] <- 4
|
||||
# all the rest
|
||||
MO_lookup[which(is.na(MO_lookup$kingdom_index)), "kingdom_index"] <- 5
|
||||
|
||||
# use this paste instead of `fullname` to work with Viridans Group Streptococci, etc.
|
||||
MO_lookup$fullname_lower <- tolower(trimws(paste(MO_lookup$genus,
|
||||
MO_lookup$species,
|
||||
MO_lookup$subspecies)))
|
||||
ind <- MO_lookup$genus == "" | grepl("^[(]unknown ", MO_lookup$fullname, perl = TRUE)
|
||||
MO_lookup[ind, "fullname_lower"] <- tolower(MO_lookup[ind, "fullname"])
|
||||
MO_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", MO_lookup$fullname_lower, perl = TRUE))
|
||||
|
||||
# add a column with only "e coli" like combinations
|
||||
MO_lookup$g_species <- gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO_lookup$fullname_lower, perl = TRUE)
|
||||
|
||||
# so arrange data on prevalence first, then kingdom, then full name
|
||||
MO_lookup[order(MO_lookup$prevalence, MO_lookup$kingdom_index, MO_lookup$fullname_lower), ]
|
||||
}
|
||||
|
||||
create_MO.old_lookup <- function() {
|
||||
MO.old_lookup <- AMR::microorganisms.old
|
||||
MO.old_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", tolower(trimws(MO.old_lookup$fullname))))
|
||||
|
||||
# add a column with only "e coli"-like combinations
|
||||
MO.old_lookup$g_species <- trimws(gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO.old_lookup$fullname_lower))
|
||||
|
||||
# so arrange data on prevalence first, then full name
|
||||
MO.old_lookup[order(MO.old_lookup$prevalence, MO.old_lookup$fullname_lower), ]
|
||||
}
|
||||
|
||||
create_intr_resistance <- function() {
|
||||
# for mo_is_intrinsic_resistant() - saves a lot of time when executed on this vector
|
||||
paste(AMR::microorganisms[match(AMR::intrinsic_resistant$microorganism, AMR::microorganisms$fullname), "mo", drop = TRUE],
|
||||
AMR::antibiotics[match(AMR::intrinsic_resistant$antibiotic, AMR::antibiotics$name), "ab", drop = TRUE])
|
||||
}
|
||||
|
@ -23,7 +23,13 @@ This is the development source of the `AMR` package for R. Not a developer? Then
|
||||
### How to get this package
|
||||
Please see [our website](https://msberends.github.io/AMR/#get-this-package).
|
||||
|
||||
Bottom line: `install.packages("AMR", repos = "https://msberends.r-universe.dev")`
|
||||
You can install or update the `AMR` package from CRAN using:
|
||||
|
||||
```r
|
||||
install.packages("AMR")
|
||||
```
|
||||
|
||||
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
|
||||
|
||||
### Copyright
|
||||
|
||||
|
@ -1,3 +1 @@
|
||||
* This package has been archived on 22 May 2021 because of errors in the dplyr package, causing the skimr package to fail: <https://github.com/tidyverse/dplyr/issues/5881>. This AMR package contains a fix around this error. Perhaps an idea for future development of CRAN to send an automated email to a maintainer with a warning that a package will be archived in due time?
|
||||
|
||||
* This package continuously has a tarball size of over 7 MB and an installation size of over 5 MB, which will return a NOTE on R CMD CHECK. This has been the case in the last releases as well. The package size is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software earlier this year. We will add the paper as a vignette after publication in a next version. All data sets were compressed using `compression = "xz"` to make them as small as possible.
|
||||
* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. This package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package, following 15 previous releases of this package. All data sets were compressed using `compression = "xz"` to make them as small as possible.
|
||||
|
1094
data-raw/DRGLST.txt
Normal file → Executable file
20996
data-raw/DRGLST1.txt
Executable file
@ -26,7 +26,7 @@
|
||||
# some old R instances have trouble installing tinytest, so we ship it too
|
||||
install.packages("data-raw/tinytest_1.2.4.10.tar.gz")
|
||||
install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE)
|
||||
install.packages("covr")
|
||||
install.packages("covr", repos = "https://cran.rstudio.com/")
|
||||
|
||||
pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?")))
|
||||
cat("Packages listed in Suggests:", paste(pkg_suggests, collapse = ", "), "\n")
|
||||
|
@ -31,109 +31,6 @@ devtools::load_all(quiet = TRUE)
|
||||
|
||||
old_globalenv <- ls(envir = globalenv())
|
||||
|
||||
# Helper functions --------------------------------------------------------
|
||||
|
||||
create_species_cons_cops <- function(type = c("CoNS", "CoPS")) {
|
||||
# Determination of which staphylococcal species are CoNS/CoPS according to:
|
||||
# - Becker et al. 2014, PMID 25278577
|
||||
# - Becker et al. 2019, PMID 30872103
|
||||
# - Becker et al. 2020, PMID 32056452
|
||||
# this function returns class <mo>
|
||||
MO_staph <- AMR::microorganisms
|
||||
MO_staph <- MO_staph[which(MO_staph$genus == "Staphylococcus"), , drop = FALSE]
|
||||
if (type == "CoNS") {
|
||||
MO_staph[which(MO_staph$species %in% c("coagulase-negative", "argensis", "arlettae",
|
||||
"auricularis", "borealis", "caeli", "capitis", "caprae",
|
||||
"carnosus", "casei", "chromogenes", "cohnii", "condimenti",
|
||||
"croceilyticus",
|
||||
"debuckii", "devriesei", "edaphicus", "epidermidis",
|
||||
"equorum", "felis", "fleurettii", "gallinarum",
|
||||
"haemolyticus", "hominis", "jettensis", "kloosii",
|
||||
"lentus", "lugdunensis", "massiliensis", "microti",
|
||||
"muscae", "nepalensis", "pasteuri", "petrasii",
|
||||
"pettenkoferi", "piscifermentans", "pragensis", "pseudoxylosus",
|
||||
"pulvereri", "rostri", "saccharolyticus", "saprophyticus",
|
||||
"sciuri", "simulans", "stepanovicii", "succinus",
|
||||
"ureilyticus",
|
||||
"vitulinus", "vitulus", "warneri", "xylosus")
|
||||
| (MO_staph$species == "schleiferi" & MO_staph$subspecies %in% c("schleiferi", ""))),
|
||||
"mo", drop = TRUE]
|
||||
} else if (type == "CoPS") {
|
||||
MO_staph[which(MO_staph$species %in% c("coagulase-positive", "coagulans",
|
||||
"agnetis", "argenteus",
|
||||
"cornubiensis",
|
||||
"delphini", "lutrae",
|
||||
"hyicus", "intermedius",
|
||||
"pseudintermedius", "pseudointermedius",
|
||||
"schweitzeri", "simiae")
|
||||
| (MO_staph$species == "schleiferi" & MO_staph$subspecies == "coagulans")),
|
||||
"mo", drop = TRUE]
|
||||
}
|
||||
}
|
||||
|
||||
create_AB_lookup <- function() {
|
||||
AB_lookup <- AMR::antibiotics
|
||||
AB_lookup$generalised_name <- generalise_antibiotic_name(AB_lookup$name)
|
||||
AB_lookup$generalised_synonyms <- lapply(AB_lookup$synonyms, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_abbreviations <- lapply(AB_lookup$abbreviations, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_loinc <- lapply(AB_lookup$loinc, generalise_antibiotic_name)
|
||||
AB_lookup$generalised_all <- unname(lapply(as.list(as.data.frame(t(AB_lookup[,
|
||||
c("ab", "atc", "cid", "name",
|
||||
colnames(AB_lookup)[colnames(AB_lookup) %like% "generalised"]),
|
||||
drop = FALSE]),
|
||||
stringsAsFactors = FALSE)),
|
||||
function(x) {
|
||||
x <- generalise_antibiotic_name(unname(unlist(x)))
|
||||
x[x != ""]
|
||||
}))
|
||||
AB_lookup
|
||||
}
|
||||
|
||||
create_MO_lookup <- function() {
|
||||
MO_lookup <- AMR::microorganisms
|
||||
|
||||
MO_lookup$kingdom_index <- NA_real_
|
||||
MO_lookup[which(MO_lookup$kingdom == "Bacteria" | MO_lookup$mo == "UNKNOWN"), "kingdom_index"] <- 1
|
||||
MO_lookup[which(MO_lookup$kingdom == "Fungi"), "kingdom_index"] <- 2
|
||||
MO_lookup[which(MO_lookup$kingdom == "Protozoa"), "kingdom_index"] <- 3
|
||||
MO_lookup[which(MO_lookup$kingdom == "Archaea"), "kingdom_index"] <- 4
|
||||
# all the rest
|
||||
MO_lookup[which(is.na(MO_lookup$kingdom_index)), "kingdom_index"] <- 5
|
||||
|
||||
# use this paste instead of `fullname` to work with Viridans Group Streptococci, etc.
|
||||
MO_lookup$fullname_lower <- tolower(trimws(paste(MO_lookup$genus,
|
||||
MO_lookup$species,
|
||||
MO_lookup$subspecies)))
|
||||
ind <- MO_lookup$genus == "" | grepl("^[(]unknown ", MO_lookup$fullname)
|
||||
MO_lookup[ind, "fullname_lower"] <- tolower(MO_lookup[ind, "fullname"])
|
||||
MO_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", MO_lookup$fullname_lower, perl = TRUE))
|
||||
|
||||
# add a column with only "e coli" like combinations
|
||||
MO_lookup$g_species <- gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO_lookup$fullname_lower, perl = TRUE)
|
||||
|
||||
# so arrange data on prevalence first, then kingdom, then full name
|
||||
MO_lookup[order(MO_lookup$prevalence, MO_lookup$kingdom_index, MO_lookup$fullname_lower), ]
|
||||
}
|
||||
|
||||
create_MO.old_lookup <- function() {
|
||||
MO.old_lookup <- AMR::microorganisms.old
|
||||
MO.old_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", tolower(trimws(MO.old_lookup$fullname))))
|
||||
|
||||
# add a column with only "e coli"-like combinations
|
||||
MO.old_lookup$g_species <- trimws(gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO.old_lookup$fullname_lower))
|
||||
|
||||
# so arrange data on prevalence first, then full name
|
||||
MO.old_lookup[order(MO.old_lookup$prevalence, MO.old_lookup$fullname_lower), ]
|
||||
}
|
||||
|
||||
create_intr_resistance <- function() {
|
||||
# for mo_is_intrinsic_resistant() - saves a lot of time when executed on this vector
|
||||
paste(AMR::microorganisms[match(AMR::intrinsic_resistant$microorganism, AMR::microorganisms$fullname), "mo", drop = TRUE],
|
||||
AMR::antibiotics[match(AMR::intrinsic_resistant$antibiotic, AMR::antibiotics$name), "ab", drop = TRUE])
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Save internal data to R/sysdata.rda -------------------------------------
|
||||
|
||||
# See 'data-raw/eucast_rules.tsv' for the EUCAST reference file
|
||||
@ -170,24 +67,50 @@ translations_file <- utils::read.delim(file = "data-raw/translations.tsv",
|
||||
allowEscapes = TRUE, # else "\\1" will be imported as "\\\\1"
|
||||
quote = "")
|
||||
|
||||
# Old microorganism codes
|
||||
microorganisms.translation <- readRDS("data-raw/microorganisms.translation.rds")
|
||||
|
||||
# for mo_is_intrinsic_resistant() - saves a lot of time when executed on this vector
|
||||
INTRINSIC_R <- create_intr_resistance()
|
||||
|
||||
# for checking input in `language` argument in e.g. mo_*() and ab_*() functions
|
||||
LANGUAGES_SUPPORTED <- sort(c("en", colnames(translations_file)[nchar(colnames(translations_file)) == 2]))
|
||||
|
||||
# vectors of CoNS and CoPS, improves speed in as.mo()
|
||||
create_species_cons_cops <- function(type = c("CoNS", "CoPS")) {
|
||||
# Determination of which staphylococcal species are CoNS/CoPS according to:
|
||||
# - Becker et al. 2014, PMID 25278577
|
||||
# - Becker et al. 2019, PMID 30872103
|
||||
# - Becker et al. 2020, PMID 32056452
|
||||
# this function returns class <mo>
|
||||
MO_staph <- AMR::microorganisms
|
||||
MO_staph <- MO_staph[which(MO_staph$genus == "Staphylococcus"), , drop = FALSE]
|
||||
if (type == "CoNS") {
|
||||
MO_staph[which(MO_staph$species %in% c("coagulase-negative", "argensis", "arlettae",
|
||||
"auricularis", "borealis", "caeli", "capitis", "caprae",
|
||||
"carnosus", "casei", "chromogenes", "cohnii", "condimenti",
|
||||
"croceilyticus",
|
||||
"debuckii", "devriesei", "edaphicus", "epidermidis",
|
||||
"equorum", "felis", "fleurettii", "gallinarum",
|
||||
"haemolyticus", "hominis", "jettensis", "kloosii",
|
||||
"lentus", "lugdunensis", "massiliensis", "microti",
|
||||
"muscae", "nepalensis", "pasteuri", "petrasii",
|
||||
"pettenkoferi", "piscifermentans", "pragensis", "pseudoxylosus",
|
||||
"pulvereri", "rostri", "saccharolyticus", "saprophyticus",
|
||||
"sciuri", "simulans", "stepanovicii", "succinus",
|
||||
"ureilyticus",
|
||||
"vitulinus", "vitulus", "warneri", "xylosus")
|
||||
| (MO_staph$species == "schleiferi" & MO_staph$subspecies %in% c("schleiferi", ""))),
|
||||
"mo", drop = TRUE]
|
||||
} else if (type == "CoPS") {
|
||||
MO_staph[which(MO_staph$species %in% c("coagulase-positive", "coagulans",
|
||||
"agnetis", "argenteus",
|
||||
"cornubiensis",
|
||||
"delphini", "lutrae",
|
||||
"hyicus", "intermedius",
|
||||
"pseudintermedius", "pseudointermedius",
|
||||
"schweitzeri", "simiae")
|
||||
| (MO_staph$species == "schleiferi" & MO_staph$subspecies == "coagulans")),
|
||||
"mo", drop = TRUE]
|
||||
}
|
||||
}
|
||||
MO_CONS <- create_species_cons_cops("CoNS")
|
||||
MO_COPS <- create_species_cons_cops("CoPS")
|
||||
|
||||
# reference data - they have additional columns compared to `antibiotics` and `microorganisms` to improve speed
|
||||
AB_lookup <- create_AB_lookup()
|
||||
MO_lookup <- create_MO_lookup()
|
||||
MO.old_lookup <- create_MO.old_lookup()
|
||||
|
||||
# antibiotic groups
|
||||
# (these will also be used for eucast_rules() and understanding data-raw/eucast_rules.tsv)
|
||||
globalenv_before_ab <- c(ls(envir = globalenv()), "globalenv_before_ab")
|
||||
@ -220,14 +143,9 @@ DEFINED_AB_GROUPS <- DEFINED_AB_GROUPS[!DEFINED_AB_GROUPS %in% globalenv_before_
|
||||
# Export to package as internal data ----
|
||||
usethis::use_data(eucast_rules_file,
|
||||
translations_file,
|
||||
microorganisms.translation,
|
||||
INTRINSIC_R,
|
||||
LANGUAGES_SUPPORTED,
|
||||
MO_CONS,
|
||||
MO_COPS,
|
||||
AB_lookup,
|
||||
MO_lookup,
|
||||
MO.old_lookup,
|
||||
AMINOGLYCOSIDES,
|
||||
AMINOPENICILLINS,
|
||||
CARBAPENEMS,
|
||||
|
@ -872,12 +872,12 @@ View(old_new)
|
||||
# set new MO codes as names to existing data sets
|
||||
rsi_translation$mo <- mo_name(rsi_translation$mo, language = NULL)
|
||||
microorganisms.codes$mo <- mo_name(microorganisms.codes$mo, language = NULL)
|
||||
microorganisms.translation <- AMR:::microorganisms.translation %>%
|
||||
bind_rows(tibble(mo_old = AMR:::microorganisms.translation$mo_new, mo_new = mo_old)) %>%
|
||||
filter(!mo_old %in% MOs$mo) %>%
|
||||
mutate(mo_new = mo_name(mo_new, language = NULL)) %>%
|
||||
bind_rows(old_new %>% select(mo_old, mo_new)) %>%
|
||||
distinct(mo_old, .keep_all = TRUE)
|
||||
# microorganisms.translation <- AMR:::microorganisms.translation %>%
|
||||
# bind_rows(tibble(mo_old = AMR:::microorganisms.translation$mo_new, mo_new = mo_old)) %>%
|
||||
# filter(!mo_old %in% MOs$mo) %>%
|
||||
# mutate(mo_new = mo_name(mo_new, language = NULL)) %>%
|
||||
# bind_rows(old_new %>% select(mo_old, mo_new)) %>%
|
||||
# distinct(mo_old, .keep_all = TRUE)
|
||||
|
||||
# arrange the data sets to save
|
||||
MOs <- MOs %>% arrange(fullname)
|
||||
@ -911,23 +911,23 @@ devtools::load_all(".")
|
||||
rsi_translation$mo <- as.mo(rsi_translation$mo)
|
||||
microorganisms.codes$mo <- as.mo(microorganisms.codes$mo)
|
||||
class(microorganisms.codes$mo) <- c("mo", "character")
|
||||
microorganisms.translation <- microorganisms.translation %>%
|
||||
# (to do: add last package version to column pkg_version)
|
||||
left_join(microorganisms.old[, c("fullname", "fullname_new")], # microorganisms.old is now new and loaded
|
||||
by = c("mo_new" = "fullname")) %>%
|
||||
mutate(name = ifelse(!is.na(fullname_new), fullname_new, mo_new)) %>%
|
||||
left_join(microorganisms[, c("fullname", "mo")], # as is microorganisms
|
||||
by = c("name" = "fullname")) %>%
|
||||
select(mo_old, mo_new = mo) %>%
|
||||
filter(!is.na(mo_old), !is.na(mo_new))
|
||||
class(microorganisms.translation$mo_old) <- "character" # no class <mo> since those aren't valid MO codes
|
||||
class(microorganisms.translation$mo_new) <- c("mo", "character")
|
||||
# microorganisms.translation <- microorganisms.translation %>%
|
||||
# # (to do: add last package version to column pkg_version)
|
||||
# left_join(microorganisms.old[, c("fullname", "fullname_new")], # microorganisms.old is now new and loaded
|
||||
# by = c("mo_new" = "fullname")) %>%
|
||||
# mutate(name = ifelse(!is.na(fullname_new), fullname_new, mo_new)) %>%
|
||||
# left_join(microorganisms[, c("fullname", "mo")], # as is microorganisms
|
||||
# by = c("name" = "fullname")) %>%
|
||||
# select(mo_old, mo_new = mo) %>%
|
||||
# filter(!is.na(mo_old), !is.na(mo_new))
|
||||
# class(microorganisms.translation$mo_old) <- "character" # no class <mo> since those aren't valid MO codes
|
||||
# class(microorganisms.translation$mo_new) <- c("mo", "character")
|
||||
# save those to the package
|
||||
usethis::use_data(rsi_translation, overwrite = TRUE, version = 2)
|
||||
usethis::use_data(microorganisms.codes, overwrite = TRUE, version = 2)
|
||||
saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2)
|
||||
# saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2)
|
||||
# to save microorganisms.translation internally to the package
|
||||
source("data-raw/_internals.R")
|
||||
# source("data-raw/_internals.R")
|
||||
|
||||
# load new data sets again
|
||||
devtools::load_all(".")
|
||||
@ -935,7 +935,7 @@ devtools::load_all(".")
|
||||
# and check: these codes should not be missing (will otherwise throw a unit test error):
|
||||
AMR::microorganisms.codes %>% filter(!mo %in% MOs$mo)
|
||||
AMR::rsi_translation %>% filter(!mo %in% MOs$mo)
|
||||
AMR:::microorganisms.translation %>% filter(!mo_new %in% MOs$mo)
|
||||
# AMR:::microorganisms.translation %>% filter(!mo_new %in% MOs$mo)
|
||||
|
||||
# update the example_isolates data set
|
||||
example_isolates$mo <- as.mo(example_isolates$mo)
|
||||
|
@ -380,37 +380,37 @@ MOs.old <- microorganisms.old %>%
|
||||
# Keep old codes for translation ------------------------------------------
|
||||
|
||||
# add removed microbial IDs to the internal translation table so old package versions keep working
|
||||
MOs.translation <- microorganisms %>%
|
||||
filter(!mo %in% MOs$mo) %>%
|
||||
select(mo, fullname) %>%
|
||||
left_join(new_synonyms) %>%
|
||||
left_join(MOs %>% transmute(fullname_new = fullname, mo2 = as.character(mo))) %>%
|
||||
select(mo_old = mo, mo_new = mo2) %>%
|
||||
distinct()
|
||||
MOs.translation <- AMR:::microorganisms.translation %>%
|
||||
left_join(MOs.translation %>% select(mo_new_update = mo_new, mo_new = mo_old)) %>%
|
||||
mutate(mo_new = as.character(ifelse(!is.na(mo_new_update), mo_new_update, mo_new))) %>%
|
||||
select(-mo_new_update) %>%
|
||||
bind_rows(
|
||||
# old IDs used in microorganisms.codes must put in here as well
|
||||
microorganisms.codes %>%
|
||||
filter(!mo %in% MOs$mo) %>%
|
||||
transmute(mo_old = mo, fullname = mo_name(mo)) %>%
|
||||
left_join(MOs.old %>%
|
||||
select(fullname, fullname_new)) %>%
|
||||
left_join(MOs %>%
|
||||
select(mo_new = mo, fullname_new = fullname)) %>%
|
||||
transmute(mo_old = as.character(mo_old), mo_new)) %>%
|
||||
arrange(mo_old) %>%
|
||||
filter(mo_old != mo_new,
|
||||
!mo_old %in% MOs$mo) %>%
|
||||
left_join(., .,
|
||||
by = c("mo_new" = "mo_old"),
|
||||
suffix = c("", ".2")) %>%
|
||||
mutate(mo_new = ifelse(!is.na(mo_new.2), mo_new.2, mo_new)) %>%
|
||||
distinct(mo_old, mo_new) %>%
|
||||
# clean up
|
||||
df_remove_nonASCII()
|
||||
# MOs.translation <- microorganisms %>%
|
||||
# filter(!mo %in% MOs$mo) %>%
|
||||
# select(mo, fullname) %>%
|
||||
# left_join(new_synonyms) %>%
|
||||
# left_join(MOs %>% transmute(fullname_new = fullname, mo2 = as.character(mo))) %>%
|
||||
# select(mo_old = mo, mo_new = mo2) %>%
|
||||
# distinct()
|
||||
# MOs.translation <- AMR:::microorganisms.translation %>%
|
||||
# left_join(MOs.translation %>% select(mo_new_update = mo_new, mo_new = mo_old)) %>%
|
||||
# mutate(mo_new = as.character(ifelse(!is.na(mo_new_update), mo_new_update, mo_new))) %>%
|
||||
# select(-mo_new_update) %>%
|
||||
# bind_rows(
|
||||
# # old IDs used in microorganisms.codes must put in here as well
|
||||
# microorganisms.codes %>%
|
||||
# filter(!mo %in% MOs$mo) %>%
|
||||
# transmute(mo_old = mo, fullname = mo_name(mo)) %>%
|
||||
# left_join(MOs.old %>%
|
||||
# select(fullname, fullname_new)) %>%
|
||||
# left_join(MOs %>%
|
||||
# select(mo_new = mo, fullname_new = fullname)) %>%
|
||||
# transmute(mo_old = as.character(mo_old), mo_new)) %>%
|
||||
# arrange(mo_old) %>%
|
||||
# filter(mo_old != mo_new,
|
||||
# !mo_old %in% MOs$mo) %>%
|
||||
# left_join(., .,
|
||||
# by = c("mo_new" = "mo_old"),
|
||||
# suffix = c("", ".2")) %>%
|
||||
# mutate(mo_new = ifelse(!is.na(mo_new.2), mo_new.2, mo_new)) %>%
|
||||
# distinct(mo_old, mo_new) %>%
|
||||
# # clean up
|
||||
# df_remove_nonASCII()
|
||||
|
||||
message("microorganisms new: ", sum(!MOs$fullname %in% c(microorganisms$fullname, MOs.old$fullname)))
|
||||
message("microorganisms renamed: ", sum(!MOs.old$fullname %in% microorganisms.old$fullname))
|
||||
@ -424,12 +424,12 @@ class(MOs.translation$mo_new) <- c("mo", "character")
|
||||
|
||||
microorganisms <- MOs
|
||||
microorganisms.old <- MOs.old
|
||||
microorganisms.translation <- MOs.translation
|
||||
# microorganisms.translation <- MOs.translation
|
||||
|
||||
# on the server, do:
|
||||
usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")
|
||||
usethis::use_data(microorganisms.old, overwrite = TRUE, version = 2)
|
||||
saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2)
|
||||
# saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2)
|
||||
rm(microorganisms)
|
||||
rm(microorganisms.old)
|
||||
rm(microorganisms.translation)
|
||||
|
@ -2,10 +2,9 @@ library(dplyr)
|
||||
library(readr)
|
||||
library(tidyr)
|
||||
|
||||
# Installed WHONET 2019 software on Windows (http://www.whonet.org/software.html),
|
||||
# opened C:\WHONET\Codes\WHONETCodes.mdb in MS Access
|
||||
# and exported table 'DRGLST1' to MS Excel
|
||||
DRGLST1 <- readxl::read_excel("data-raw/DRGLST1.xlsx", na = c("", "NA", "-"))
|
||||
# Installed WHONET software on Windows (http://www.whonet.org/software.html),
|
||||
# imported C:\WHONET\Codes\DRGLST1.txt
|
||||
DRGLST1 <- readr::read_tsv("data-raw/DRGLST1.txt", na = c("", "NA", "-"))
|
||||
rsi_trans <- DRGLST1 %>%
|
||||
# only keep CLSI and EUCAST guidelines:
|
||||
filter(GUIDELINES %like% "^(CLSI|EUCST)")
|
||||
@ -13,6 +12,9 @@ if (any(is.na(rsi_trans$BREAKPOINT_TYPE)) | !"Human" %in% rsi_trans$BREAKPOINT_T
|
||||
stop("Check column BREAKPOINT_TYPE - something is WRONG!")
|
||||
}
|
||||
rsi_trans <- rsi_trans %>%
|
||||
##### If looking for adding a specific guideline, do it here!
|
||||
# filter(GUIDELINES == "CLSI20") %>%
|
||||
#####
|
||||
filter(BREAKPOINT_TYPE == "Human") %>%
|
||||
mutate(DISK_S = ifelse(as.double(DISK_S) > 50, 50, DISK_S),
|
||||
MIC_R = ifelse(as.double(MIC_R) %in% c(1025, 129, 513), as.double(MIC_R) - 1, MIC_R)) %>%
|
||||
@ -50,7 +52,7 @@ rsi_trans <- bind_rows(tbl_mic, tbl_disk) %>%
|
||||
select(-ends_with("_mic"), -ends_with("_disk"))
|
||||
|
||||
# add extra CLSI general guidelines
|
||||
clsi_general <- read_tsv("data-raw/DRGLST.txt") %>%
|
||||
clsi_general <- readr::read_tsv("data-raw/DRGLST.txt") %>%
|
||||
filter(CLSI == "X") %>%
|
||||
select(WHON5_CODE,
|
||||
disk_dose = POTENCY,
|
||||
@ -76,13 +78,13 @@ clsi_general <- read_tsv("data-raw/DRGLST.txt") %>%
|
||||
|
||||
|
||||
# add new EUCAST with read_EUCAST.R
|
||||
# 2020-04-14 did that now for 2019 and 2020
|
||||
|
||||
# 2020-04-14 did that now for 2019 and 2020
|
||||
rsi_trans <- rsi_trans %>%
|
||||
filter(guideline != "EUCAST 2019") %>%
|
||||
bind_rows(new_EUCAST) %>%
|
||||
bind_rows(clsi_general) %>%
|
||||
mutate(uti = site %like% "(UTI|urinary)") %>%
|
||||
mutate(uti = site %like% "(UTI|urinary|urine)") %>%
|
||||
as.data.frame(stringsAsFactors = FALSE) %>%
|
||||
# force classes again
|
||||
mutate(mo = as.mo(mo),
|
||||
|
@ -1 +1 @@
|
||||
aa80f169fc2cba97f5eedc1d24ca8c03
|
||||
1a7fe52f8185c9bb2c470712863d1887
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -193,7 +193,7 @@
|
||||
<h1 data-toc-skip>How to conduct AMR data analysis</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
<h4 class="date">26 May 2021</h4>
|
||||
<h4 class="date">03 June 2021</h4>
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
|
||||
<div class="hidden name"><code>AMR.Rmd</code></div>
|
||||
@ -202,7 +202,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/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 26 May 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/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 03 June 2021.</p>
|
||||
<div id="introduction" class="section level1">
|
||||
<h1 class="hasAnchor">
|
||||
<a href="#introduction" class="anchor"></a>Introduction</h1>
|
||||
@ -233,21 +233,21 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2021-05-26</td>
|
||||
<td align="center">2021-06-03</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-05-26</td>
|
||||
<td align="center">2021-06-03</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-05-26</td>
|
||||
<td align="center">2021-06-03</td>
|
||||
<td align="center">efgh</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">R</td>
|
||||
@ -344,52 +344,52 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2013-04-02</td>
|
||||
<td align="center">X1</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">2014-11-23</td>
|
||||
<td align="center">A2</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2015-07-17</td>
|
||||
<td align="center">X6</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">2013-08-17</td>
|
||||
<td align="center">V3</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">Staphylococcus aureus</td>
|
||||
<td align="center">R</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>
|
||||
<tr class="odd">
|
||||
<td align="center">2012-09-03</td>
|
||||
<td align="center">C4</td>
|
||||
<td align="center">2011-02-20</td>
|
||||
<td align="center">B1</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">Staphylococcus aureus</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">Streptococcus pneumoniae</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="even">
|
||||
<td align="center">2010-02-11</td>
|
||||
<td align="center">D2</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">2016-10-04</td>
|
||||
<td align="center">U3</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">Escherichia coli</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>
|
||||
<td align="center">F</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2012-12-14</td>
|
||||
<td align="center">L5</td>
|
||||
<td align="center">2010-04-22</td>
|
||||
<td align="center">F1</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
@ -399,12 +399,12 @@
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2016-01-30</td>
|
||||
<td align="center">S3</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">Klebsiella pneumoniae</td>
|
||||
<td align="center">2013-01-15</td>
|
||||
<td align="center">W4</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">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
@ -441,16 +441,16 @@ Longest: 1</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">M</td>
|
||||
<td align="right">10,375</td>
|
||||
<td align="right">51.88%</td>
|
||||
<td align="right">10,375</td>
|
||||
<td align="right">51.88%</td>
|
||||
<td align="right">10,416</td>
|
||||
<td align="right">52.08%</td>
|
||||
<td align="right">10,416</td>
|
||||
<td align="right">52.08%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">F</td>
|
||||
<td align="right">9,625</td>
|
||||
<td align="right">48.13%</td>
|
||||
<td align="right">9,584</td>
|
||||
<td align="right">47.92%</td>
|
||||
<td align="right">20,000</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
@ -505,9 +505,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"># => Found 10,550 first weighted isolates (phenotype-based, 52.8% of total</span>
|
||||
<span class="co"># => Found 10,645 first weighted isolates (phenotype-based, 53.2% of total</span>
|
||||
<span class="co"># where a microbial ID was available)</span></code></pre></div>
|
||||
<p>So only 52.8% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
|
||||
<p>So only 53.2% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">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"><-</span> <span class="va">data</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">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>
|
||||
@ -515,7 +515,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"><-</span> <span class="va">data</span> <span class="op">%>%</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,550 isolates for analysis. Now our data looks like:</p>
|
||||
<p>So we end up with 10,645 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">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></code></pre></div>
|
||||
<table class="table">
|
||||
@ -553,89 +553,25 @@ Longest: 1</p>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="center">2013-04-02</td>
|
||||
<td align="center">X1</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">B_ESCHR_COLI</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</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">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="center">2015-07-17</td>
|
||||
<td align="center">X6</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_STPHY_AURS</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</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="odd">
|
||||
<td align="left">4</td>
|
||||
<td align="center">2010-02-11</td>
|
||||
<td align="center">D2</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">S</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="even">
|
||||
<td align="left">6</td>
|
||||
<td align="center">2016-01-30</td>
|
||||
<td align="center">S3</td>
|
||||
<td align="center">2013-08-17</td>
|
||||
<td align="center">V3</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">B_KLBSL_PNMN</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">B_STPHY_AURS</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">Gram-negative</td>
|
||||
<td align="center">Klebsiella</td>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">7</td>
|
||||
<td align="center">2012-10-20</td>
|
||||
<td align="center">D10</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_STPHY_AURS</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</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">2016-03-28</td>
|
||||
<td align="center">K7</td>
|
||||
<td align="left">3</td>
|
||||
<td align="center">2011-02-20</td>
|
||||
<td align="center">B1</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">B_STRPT_PNMN</td>
|
||||
<td align="center">S</td>
|
||||
@ -648,6 +584,70 @@ Longest: 1</p>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="center">2010-04-22</td>
|
||||
<td align="center">F1</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">S</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="even">
|
||||
<td align="left">7</td>
|
||||
<td align="center">2014-07-28</td>
|
||||
<td align="center">W5</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">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</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="odd">
|
||||
<td align="left">8</td>
|
||||
<td align="center">2015-01-06</td>
|
||||
<td align="center">V3</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_ESCHR_COLI</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">I</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">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">9</td>
|
||||
<td align="center">2014-03-16</td>
|
||||
<td align="center">H4</td>
|
||||
<td align="center">Hospital A</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">M</td>
|
||||
<td align="center">Gram-positive</td>
|
||||
<td align="center">Staphylococcus</td>
|
||||
<td align="center">aureus</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Time for the analysis!</p>
|
||||
@ -669,8 +669,8 @@ Longest: 1</p>
|
||||
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%>%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">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,550<br>
|
||||
Available: 10,550 (100.0%, NA: 0 = 0.0%)<br>
|
||||
Length: 10,645<br>
|
||||
Available: 10,645 (100.0%, NA: 0 = 0.0%)<br>
|
||||
Unique: 4</p>
|
||||
<p>Shortest: 16<br>
|
||||
Longest: 24</p>
|
||||
@ -687,33 +687,33 @@ Longest: 24</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Escherichia coli</td>
|
||||
<td align="right">4,566</td>
|
||||
<td align="right">43.28%</td>
|
||||
<td align="right">4,566</td>
|
||||
<td align="right">43.28%</td>
|
||||
<td align="right">4,652</td>
|
||||
<td align="right">43.70%</td>
|
||||
<td align="right">4,652</td>
|
||||
<td align="right">43.70%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Staphylococcus aureus</td>
|
||||
<td align="right">2,786</td>
|
||||
<td align="right">26.41%</td>
|
||||
<td align="right">7,352</td>
|
||||
<td align="right">69.69%</td>
|
||||
<td align="right">2,744</td>
|
||||
<td align="right">25.78%</td>
|
||||
<td align="right">7,396</td>
|
||||
<td align="right">69.48%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Streptococcus pneumoniae</td>
|
||||
<td align="right">2,025</td>
|
||||
<td align="right">19.19%</td>
|
||||
<td align="right">9,377</td>
|
||||
<td align="right">88.88%</td>
|
||||
<td align="right">2,052</td>
|
||||
<td align="right">19.28%</td>
|
||||
<td align="right">9,448</td>
|
||||
<td align="right">88.76%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Klebsiella pneumoniae</td>
|
||||
<td align="right">1,173</td>
|
||||
<td align="right">11.12%</td>
|
||||
<td align="right">10,550</td>
|
||||
<td align="right">1,197</td>
|
||||
<td align="right">11.24%</td>
|
||||
<td align="right">10,645</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -760,8 +760,8 @@ Longest: 24</p>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2016-03-28</td>
|
||||
<td align="center">K7</td>
|
||||
<td align="center">2011-02-20</td>
|
||||
<td align="center">B1</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">B_STRPT_PNMN</td>
|
||||
<td align="center">S</td>
|
||||
@ -775,44 +775,14 @@ Longest: 24</p>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2010-01-30</td>
|
||||
<td align="center">A1</td>
|
||||
<td align="center">Hospital A</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">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">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2012-12-10</td>
|
||||
<td align="center">M7</td>
|
||||
<td align="center">2015-01-06</td>
|
||||
<td align="center">V3</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_ESCHR_COLI</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-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-08-04</td>
|
||||
<td align="center">Y7</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">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram-negative</td>
|
||||
<td align="center">Escherichia</td>
|
||||
@ -820,13 +790,28 @@ Longest: 24</p>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2016-08-05</td>
|
||||
<td align="center">I4</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">2012-05-03</td>
|
||||
<td align="center">B2</td>
|
||||
<td align="center">Hospital B</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">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">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2017-03-18</td>
|
||||
<td align="center">K10</td>
|
||||
<td align="center">Hospital D</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">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram-negative</td>
|
||||
@ -834,14 +819,14 @@ Longest: 24</p>
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2011-05-15</td>
|
||||
<td align="center">H2</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<tr class="odd">
|
||||
<td align="center">2010-12-15</td>
|
||||
<td align="center">H3</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_STRPT_PNMN</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</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-positive</td>
|
||||
@ -849,6 +834,21 @@ Longest: 24</p>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2017-08-10</td>
|
||||
<td align="center">N2</td>
|
||||
<td align="center">Hospital C</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>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> function:</p>
|
||||
@ -870,50 +870,50 @@ Longest: 24</p>
|
||||
<tr class="odd">
|
||||
<td align="center">E. coli</td>
|
||||
<td align="center">AMX</td>
|
||||
<td align="center">2148</td>
|
||||
<td align="center">153</td>
|
||||
<td align="center">2265</td>
|
||||
<td align="center">4566</td>
|
||||
<td align="center">2232</td>
|
||||
<td align="center">119</td>
|
||||
<td align="center">2301</td>
|
||||
<td align="center">4652</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">E. coli</td>
|
||||
<td align="center">AMC</td>
|
||||
<td align="center">3344</td>
|
||||
<td align="center">157</td>
|
||||
<td align="center">1065</td>
|
||||
<td align="center">4566</td>
|
||||
<td align="center">3424</td>
|
||||
<td align="center">165</td>
|
||||
<td align="center">1063</td>
|
||||
<td align="center">4652</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">E. coli</td>
|
||||
<td align="center">CIP</td>
|
||||
<td align="center">3356</td>
|
||||
<td align="center">3386</td>
|
||||
<td align="center">0</td>
|
||||
<td align="center">1210</td>
|
||||
<td align="center">4566</td>
|
||||
<td align="center">1266</td>
|
||||
<td align="center">4652</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">E. coli</td>
|
||||
<td align="center">GEN</td>
|
||||
<td align="center">3983</td>
|
||||
<td align="center">4062</td>
|
||||
<td align="center">0</td>
|
||||
<td align="center">583</td>
|
||||
<td align="center">4566</td>
|
||||
<td align="center">590</td>
|
||||
<td align="center">4652</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">1173</td>
|
||||
<td align="center">1173</td>
|
||||
<td align="center">1197</td>
|
||||
<td align="center">1197</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">K. pneumoniae</td>
|
||||
<td align="center">AMC</td>
|
||||
<td align="center">930</td>
|
||||
<td align="center">43</td>
|
||||
<td align="center">200</td>
|
||||
<td align="center">1173</td>
|
||||
<td align="center">932</td>
|
||||
<td align="center">60</td>
|
||||
<td align="center">205</td>
|
||||
<td align="center">1197</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -936,34 +936,34 @@ Longest: 24</p>
|
||||
<tr class="odd">
|
||||
<td align="center">E. coli</td>
|
||||
<td align="center">GEN</td>
|
||||
<td align="center">3983</td>
|
||||
<td align="center">4062</td>
|
||||
<td align="center">0</td>
|
||||
<td align="center">583</td>
|
||||
<td align="center">4566</td>
|
||||
<td align="center">590</td>
|
||||
<td align="center">4652</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">K. pneumoniae</td>
|
||||
<td align="center">GEN</td>
|
||||
<td align="center">1063</td>
|
||||
<td align="center">1069</td>
|
||||
<td align="center">0</td>
|
||||
<td align="center">110</td>
|
||||
<td align="center">1173</td>
|
||||
<td align="center">128</td>
|
||||
<td align="center">1197</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">S. aureus</td>
|
||||
<td align="center">GEN</td>
|
||||
<td align="center">2490</td>
|
||||
<td align="center">2444</td>
|
||||
<td align="center">0</td>
|
||||
<td align="center">296</td>
|
||||
<td align="center">2786</td>
|
||||
<td align="center">300</td>
|
||||
<td align="center">2744</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">2025</td>
|
||||
<td align="center">2025</td>
|
||||
<td align="center">2052</td>
|
||||
<td align="center">2052</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -977,7 +977,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">%>%</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.5443602</span></code></pre></div>
|
||||
<span class="co"># [1] 0.5431658</span></code></pre></div>
|
||||
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">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">%>%</span>
|
||||
@ -991,19 +991,19 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">0.5542598</td>
|
||||
<td align="center">0.5461634</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">0.5400160</td>
|
||||
<td align="center">0.5394702</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">0.5508217</td>
|
||||
<td align="center">0.5609756</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">0.5322972</td>
|
||||
<td align="center">0.5316215</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1022,23 +1022,23 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">0.5542598</td>
|
||||
<td align="center">3087</td>
|
||||
<td align="center">0.5461634</td>
|
||||
<td align="center">3206</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">0.5400160</td>
|
||||
<td align="center">3761</td>
|
||||
<td align="center">0.5394702</td>
|
||||
<td align="center">3737</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">0.5508217</td>
|
||||
<td align="center">1643</td>
|
||||
<td align="center">0.5609756</td>
|
||||
<td align="center">1599</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">0.5322972</td>
|
||||
<td align="center">2059</td>
|
||||
<td align="center">0.5316215</td>
|
||||
<td align="center">2103</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1059,27 +1059,27 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Escherichia</td>
|
||||
<td align="center">0.7667543</td>
|
||||
<td align="center">0.8723171</td>
|
||||
<td align="center">0.9770039</td>
|
||||
<td align="center">0.7714961</td>
|
||||
<td align="center">0.8731728</td>
|
||||
<td align="center">0.9776440</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Klebsiella</td>
|
||||
<td align="center">0.8294970</td>
|
||||
<td align="center">0.9062234</td>
|
||||
<td align="center">0.9795396</td>
|
||||
<td align="center">0.8287385</td>
|
||||
<td align="center">0.8930660</td>
|
||||
<td align="center">0.9824561</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Staphylococcus</td>
|
||||
<td align="center">0.7910983</td>
|
||||
<td align="center">0.8937545</td>
|
||||
<td align="center">0.9852836</td>
|
||||
<td align="center">0.7882653</td>
|
||||
<td align="center">0.8906706</td>
|
||||
<td align="center">0.9839650</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Streptococcus</td>
|
||||
<td align="center">0.5387654</td>
|
||||
<td align="center">0.5414230</td>
|
||||
<td align="center">0.0000000</td>
|
||||
<td align="center">0.5387654</td>
|
||||
<td align="center">0.5414230</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1163,16 +1163,16 @@ Longest: 24</p>
|
||||
<code class="sourceCode R"><span class="va">mic_values</span> <span class="op"><-</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 <mic></span>
|
||||
<span class="co"># [1] 2 2 16 4 0.125 0.5 64 16 128 32 </span>
|
||||
<span class="co"># [11] 4 32 1 0.125 128 2 8 64 64 2 </span>
|
||||
<span class="co"># [21] 8 0.125 0.25 1 16 64 0.25 0.5 0.25 4 </span>
|
||||
<span class="co"># [31] 16 32 0.25 1 0.5 8 64 2 0.25 0.0625</span>
|
||||
<span class="co"># [41] 128 1 2 2 0.0625 0.125 64 8 8 8 </span>
|
||||
<span class="co"># [51] 4 8 0.125 1 128 1 128 2 2 0.5 </span>
|
||||
<span class="co"># [61] 32 64 16 32 32 16 4 1 16 2 </span>
|
||||
<span class="co"># [71] 1 0.125 2 4 0.125 32 2 0.125 8 0.25 </span>
|
||||
<span class="co"># [81] 0.0625 4 0.5 16 128 8 128 0.125 0.0625 1 </span>
|
||||
<span class="co"># [91] 1 0.25 0.0625 128 128 8 0.0625 32 128 0.25</span></code></pre></div>
|
||||
<span class="co"># [1] 4 4 0.25 >=512 0.0625 2 128 2 64 1 </span>
|
||||
<span class="co"># [11] 64 256 32 2 2 256 0.125 128 16 32 </span>
|
||||
<span class="co"># [21] 1 2 0.0625 32 16 16 0.0625 0.125 0.0625 2 </span>
|
||||
<span class="co"># [31] 128 8 0.0625 0.25 4 16 1 0.0625 1 16 </span>
|
||||
<span class="co"># [41] 4 0.0625 2 4 0.0625 256 16 0.5 1 1 </span>
|
||||
<span class="co"># [51] 16 64 >=512 64 64 1 4 0.5 16 1 </span>
|
||||
<span class="co"># [61] 16 256 8 256 256 >=512 8 0.5 2 2 </span>
|
||||
<span class="co"># [71] >=512 8 64 4 8 0.25 2 4 16 0.125 </span>
|
||||
<span class="co"># [81] 0.25 4 0.125 8 0.125 0.0625 >=512 0.125 64 1 </span>
|
||||
<span class="co"># [91] 16 2 0.5 16 0.0625 128 2 0.0625 128 2</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb36"><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>
|
||||
@ -1201,10 +1201,10 @@ Longest: 24</p>
|
||||
<span class="co"># to review it.</span>
|
||||
<span class="va">disk_values</span>
|
||||
<span class="co"># Class <disk></span>
|
||||
<span class="co"># [1] 31 27 25 19 19 17 23 24 30 28 22 26 18 29 25 24 22 30 17 20 23 24 26 24 27</span>
|
||||
<span class="co"># [26] 22 27 22 17 26 22 31 27 31 31 25 21 18 26 22 21 25 21 26 22 21 20 20 24 19</span>
|
||||
<span class="co"># [51] 25 17 29 26 28 30 30 29 30 28 19 28 22 21 26 25 24 23 21 18 27 20 17 29 30</span>
|
||||
<span class="co"># [76] 17 25 19 30 22 26 22 31 18 19 26 20 18 23 17 30 30 22 21 25 21 17 30 30 24</span></code></pre></div>
|
||||
<span class="co"># [1] 27 28 23 21 23 21 28 31 26 17 23 23 24 29 20 18 27 24 26 24 27 23 30 18 26</span>
|
||||
<span class="co"># [26] 31 19 26 21 27 29 29 19 19 31 25 23 19 26 21 21 20 23 29 22 18 27 28 21 27</span>
|
||||
<span class="co"># [51] 21 18 19 28 26 26 29 20 31 28 30 30 21 21 25 29 28 29 30 25 27 19 23 26 24</span>
|
||||
<span class="co"># [76] 20 21 25 19 26 22 19 30 28 27 18 19 18 25 31 20 19 29 31 31 29 22 20 17 31</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb42"><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>
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -339,19 +339,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">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 I I I I S S</span>
|
||||
<span class="co"># 2 R I S I I I</span>
|
||||
<span class="co"># 3 S R R R R I</span>
|
||||
<span class="co"># 4 S R S S R S</span>
|
||||
<span class="co"># 5 R S I R S R</span>
|
||||
<span class="co"># 6 R R R R I I</span>
|
||||
<span class="co"># 1 S I R R R S</span>
|
||||
<span class="co"># 2 I R R R R R</span>
|
||||
<span class="co"># 3 S S S R I R</span>
|
||||
<span class="co"># 4 R I R R S S</span>
|
||||
<span class="co"># 5 I R S S R I</span>
|
||||
<span class="co"># 6 I S S R R R</span>
|
||||
<span class="co"># kanamycin</span>
|
||||
<span class="co"># 1 I</span>
|
||||
<span class="co"># 2 I</span>
|
||||
<span class="co"># 3 S</span>
|
||||
<span class="co"># 2 R</span>
|
||||
<span class="co"># 3 R</span>
|
||||
<span class="co"># 4 R</span>
|
||||
<span class="co"># 5 I</span>
|
||||
<span class="co"># 6 I</span></code></pre></div>
|
||||
<span class="co"># 5 S</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>
|
||||
@ -382,40 +382,40 @@ Unique: 5</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Mono-resistant</td>
|
||||
<td align="right">3271</td>
|
||||
<td align="right">65.42%</td>
|
||||
<td align="right">3271</td>
|
||||
<td align="right">65.42%</td>
|
||||
<td align="right">3187</td>
|
||||
<td align="right">63.74%</td>
|
||||
<td align="right">3187</td>
|
||||
<td align="right">63.74%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Negative</td>
|
||||
<td align="right">949</td>
|
||||
<td align="right">18.98%</td>
|
||||
<td align="right">4220</td>
|
||||
<td align="right">84.40%</td>
|
||||
<td align="right">1027</td>
|
||||
<td align="right">20.54%</td>
|
||||
<td align="right">4214</td>
|
||||
<td align="right">84.28%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Multi-drug-resistant</td>
|
||||
<td align="right">449</td>
|
||||
<td align="right">8.98%</td>
|
||||
<td align="right">4669</td>
|
||||
<td align="right">93.38%</td>
|
||||
<td align="right">430</td>
|
||||
<td align="right">8.60%</td>
|
||||
<td align="right">4644</td>
|
||||
<td align="right">92.88%</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">4909</td>
|
||||
<td align="right">98.18%</td>
|
||||
<td align="right">245</td>
|
||||
<td align="right">4.90%</td>
|
||||
<td align="right">4889</td>
|
||||
<td align="right">97.78%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Extensively drug-resistant</td>
|
||||
<td align="right">91</td>
|
||||
<td align="right">1.82%</td>
|
||||
<td align="right">111</td>
|
||||
<td align="right">2.22%</td>
|
||||
<td align="right">5000</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -193,7 +193,7 @@
|
||||
<h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
<h4 class="date">26 May 2021</h4>
|
||||
<h4 class="date">03 June 2021</h4>
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small>
|
||||
<div class="hidden name"><code>SPSS.Rmd</code></div>
|
||||
@ -228,7 +228,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>R has a huge community.</strong></p>
|
||||
<p>Many R users just ask questions on websites like <a href="https://stackoverflow.com">StackOverflow.com</a>, the largest online community for programmers. At the time of writing, <a href="https://stackoverflow.com/questions/tagged/r?sort=votes">403,383 R-related questions</a> have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.</p>
|
||||
<p>Many R users just ask questions on websites like <a href="https://stackoverflow.com">StackOverflow.com</a>, the largest online community for programmers. At the time of writing, <a href="https://stackoverflow.com/questions/tagged/r?sort=votes">404,559 R-related questions</a> have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>R understands any data type, including SPSS/SAS/Stata.</strong></p>
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -221,7 +221,7 @@
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/msberends/cleaner">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></code></pre></div>
|
||||
<p>We will have to transform some variables to simplify and automate the analysis:</p>
|
||||
<ul>
|
||||
<li>Microorganisms should be transformed to our own microorganism IDs (called an <code>mo</code>) using <a href="https://msberends.github.io/AMR/reference/catalogue_of_life">our Catalogue of Life reference data set</a>, which contains all ~70,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with <code><a href="../reference/as.mo.html">as.mo()</a></code>. This function also recognises almost all WHONET abbreviations of microorganisms.</li>
|
||||
<li>Microorganisms should be transformed to our own microorganism codes (called an <code>mo</code>) using <a href="https://msberends.github.io/AMR/reference/catalogue_of_life">our Catalogue of Life reference data set</a>, which contains all ~70,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with <code><a href="../reference/as.mo.html">as.mo()</a></code>. This function also recognises almost all WHONET abbreviations of microorganisms.</li>
|
||||
<li>Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values <code>"S"</code>, <code>"I"</code> or <code>"R"</code>. That is exactly where the <code><a href="../reference/as.rsi.html">as.rsi()</a></code> function is for.</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -227,18 +227,18 @@
|
||||
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">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") 10.0 11.0 16.0 11.0 13.0 50 25</span>
|
||||
<span class="co"># as.mo("stau") 54.0 58.0 72.0 61.0 89.0 99 25</span>
|
||||
<span class="co"># as.mo("STAU") 53.0 55.0 67.0 56.0 91.0 95 25</span>
|
||||
<span class="co"># as.mo("staaur") 10.0 11.0 16.0 11.0 13.0 47 25</span>
|
||||
<span class="co"># as.mo("STAAUR") 10.0 11.0 17.0 12.0 13.0 58 25</span>
|
||||
<span class="co"># as.mo("S. aureus") 26.0 27.0 36.0 31.0 33.0 70 25</span>
|
||||
<span class="co"># as.mo("S aureus") 26.0 27.0 40.0 29.0 61.0 68 25</span>
|
||||
<span class="co"># as.mo("Staphylococcus aureus") 2.6 3.2 6.5 3.5 3.8 42 25</span>
|
||||
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 240.0 250.0 260.0 260.0 270.0 290 25</span>
|
||||
<span class="co"># as.mo("Sthafilokkockus aaureuz") 190.0 190.0 200.0 200.0 210.0 300 25</span>
|
||||
<span class="co"># as.mo("MRSA") 10.0 11.0 13.0 12.0 13.0 40 25</span>
|
||||
<span class="co"># as.mo("VISA") 18.0 19.0 32.0 20.0 24.0 130 25</span></code></pre></div>
|
||||
<span class="co"># as.mo("sau") 13.0 13.0 16.0 15.0 16.0 44 25</span>
|
||||
<span class="co"># as.mo("stau") 55.0 58.0 75.0 62.0 94.0 110 25</span>
|
||||
<span class="co"># as.mo("STAU") 55.0 59.0 77.0 89.0 94.0 100 25</span>
|
||||
<span class="co"># as.mo("staaur") 11.0 13.0 20.0 14.0 16.0 48 25</span>
|
||||
<span class="co"># as.mo("STAAUR") 11.0 13.0 17.0 15.0 16.0 49 25</span>
|
||||
<span class="co"># as.mo("S. aureus") 26.0 30.0 41.0 32.0 60.0 68 25</span>
|
||||
<span class="co"># as.mo("S aureus") 27.0 29.0 44.0 32.0 58.0 160 25</span>
|
||||
<span class="co"># as.mo("Staphylococcus aureus") 3.3 3.9 5.5 4.2 4.7 37 25</span>
|
||||
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 250.0 260.0 280.0 280.0 290.0 320 25</span>
|
||||
<span class="co"># as.mo("Sthafilokkockus aaureuz") 170.0 200.0 210.0 200.0 220.0 250 25</span>
|
||||
<span class="co"># as.mo("MRSA") 12.0 14.0 21.0 15.0 17.0 56 25</span>
|
||||
<span class="co"># as.mo("VISA") 20.0 23.0 33.0 25.0 51.0 59 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>
|
||||
@ -260,8 +260,8 @@
|
||||
<span class="co"># what do these values look like? They are of class <mo>:</span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
|
||||
<span class="co"># Class <mo></span>
|
||||
<span class="co"># [1] B_STPHY_EPDR B_STRPT_GRPA B_STPHY_AURS B_BCTRD_FRGL B_STPHY_HMNS</span>
|
||||
<span class="co"># [6] B_STPHY_CONS</span>
|
||||
<span class="co"># [1] B_STPHY_CONS B_ESCHR_COLI B_STPHY_AURS B_STRPT_PYGN B_ESCHR_COLI</span>
|
||||
<span class="co"># [6] B_HMPHL_INFL</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">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
|
||||
@ -277,8 +277,8 @@
|
||||
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">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) 187 223 233 226 229 318 10</span></code></pre></div>
|
||||
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.226 seconds. That is 113 nanoseconds on average. You only lose time on your unique input values.</p>
|
||||
<span class="co"># mo_name(x) 165 238 258 246 253 369 10</span></code></pre></div>
|
||||
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.246 seconds. That is 123 nanoseconds on average. You only lose time on your unique input values.</p>
|
||||
</div>
|
||||
<div id="precalculated-results" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@ -291,11 +291,11 @@
|
||||
times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span>
|
||||
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">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.28 7.59 8.01 8.03 8.45 8.66 10</span>
|
||||
<span class="co"># B 23.00 24.10 30.30 25.50 27.30 75.30 10</span>
|
||||
<span class="co"># C 1.55 1.74 7.31 1.95 2.01 56.10 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.0019 seconds - it doesn’t 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"># expr min lq mean median uq max neval</span>
|
||||
<span class="co"># A 8.20 8.33 13.30 8.53 9.71 53.2 10</span>
|
||||
<span class="co"># B 22.80 23.50 29.20 24.60 26.80 69.3 10</span>
|
||||
<span class="co"># C 1.82 2.04 2.25 2.16 2.38 2.9 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 doesn’t 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"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">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>,
|
||||
@ -308,15 +308,15 @@
|
||||
times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span>
|
||||
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">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.42 1.45 1.56 1.50 1.57 2.00 10</span>
|
||||
<span class="co"># B 1.43 1.46 1.49 1.47 1.55 1.59 10</span>
|
||||
<span class="co"># C 1.41 1.43 1.58 1.49 1.57 2.19 10</span>
|
||||
<span class="co"># D 1.41 1.48 1.61 1.54 1.63 2.33 10</span>
|
||||
<span class="co"># E 1.41 1.45 1.64 1.51 1.56 2.68 10</span>
|
||||
<span class="co"># F 1.42 1.52 1.63 1.57 1.71 1.99 10</span>
|
||||
<span class="co"># G 1.41 1.46 1.65 1.56 1.90 1.98 10</span>
|
||||
<span class="co"># H 1.42 1.46 1.59 1.55 1.70 1.88 10</span></code></pre></div>
|
||||
<span class="co"># expr min lq mean median uq max neval</span>
|
||||
<span class="co"># A 1.66 1.70 1.86 1.77 1.90 2.41 10</span>
|
||||
<span class="co"># B 1.61 1.71 1.99 1.84 2.37 2.56 10</span>
|
||||
<span class="co"># C 1.64 1.72 1.79 1.74 1.77 2.14 10</span>
|
||||
<span class="co"># D 1.68 1.71 2.06 2.06 2.23 2.77 10</span>
|
||||
<span class="co"># E 1.63 1.71 1.85 1.75 1.92 2.43 10</span>
|
||||
<span class="co"># F 1.61 1.67 1.80 1.75 1.86 2.22 10</span>
|
||||
<span class="co"># G 1.63 1.67 4.37 1.96 2.58 25.70 10</span>
|
||||
<span class="co"># H 1.67 1.73 1.88 1.83 2.01 2.28 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">
|
||||
@ -343,14 +343,14 @@
|
||||
times <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>
|
||||
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">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 17.81 18.24 21.93 18.78 19.44 60.56 100</span>
|
||||
<span class="co"># de 28.82 29.53 37.92 30.33 32.62 81.75 100</span>
|
||||
<span class="co"># nl 32.65 33.61 44.22 34.43 37.44 193.90 100</span>
|
||||
<span class="co"># es 32.51 32.95 41.88 33.70 36.39 80.63 100</span>
|
||||
<span class="co"># it 22.00 22.57 27.98 23.15 25.14 67.04 100</span>
|
||||
<span class="co"># fr 21.71 22.22 27.20 22.83 24.41 66.08 100</span>
|
||||
<span class="co"># pt 21.71 22.54 26.97 23.06 23.94 67.41 100</span></code></pre></div>
|
||||
<span class="co"># expr min lq mean median uq max neval</span>
|
||||
<span class="co"># en 19.99 20.43 25.64 21.15 22.38 82.52 100</span>
|
||||
<span class="co"># de 31.03 31.96 38.34 32.88 35.27 82.31 100</span>
|
||||
<span class="co"># nl 35.25 36.19 43.25 37.63 39.66 85.19 100</span>
|
||||
<span class="co"># es 35.01 35.85 40.89 36.91 38.58 83.68 100</span>
|
||||
<span class="co"># it 24.35 24.90 30.43 25.81 28.03 78.90 100</span>
|
||||
<span class="co"># fr 23.87 25.02 31.72 26.03 27.46 83.88 100</span>
|
||||
<span class="co"># pt 24.00 24.99 31.16 26.05 28.06 80.74 100</span></code></pre></div>
|
||||
<p>Currently supported non-English languages are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>Data sets for download / own use</h1>
|
||||
|
||||
<h4 class="date">26 May 2021</h4>
|
||||
<h4 class="date">03 June 2021</h4>
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd"><code>vignettes/datasets.Rmd</code></a></small>
|
||||
<div class="hidden name"><code>datasets.Rmd</code></div>
|
||||
@ -1005,27 +1005,27 @@ If you are reading this page from within R, please <a href="https://msberends.gi
|
||||
<div id="interpretation-from-mic-values-disk-diameters-to-rsi" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#interpretation-from-mic-values-disk-diameters-to-rsi" class="anchor"></a>Interpretation from MIC values / disk diameters to R/SI</h2>
|
||||
<p>A data set with 20,486 rows and 10 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
|
||||
<p>A data set with 21,996 rows and 10 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
|
||||
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
|
||||
<p>It was last updated on 5 March 2021 09:46:55 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
|
||||
<p>It was last updated on 1 June 2021 14:47:11 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
|
||||
<p><strong>Direct download links:</strong></p>
|
||||
<ul>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds">R file</a> (34 kB)<br>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds">R file</a> (37 kB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.xlsx">Excel file</a> (0.7 MB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.txt">plain text file</a> (1.7 MB)<br>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.txt">plain text file</a> (1.8 MB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sas">SAS file</a> (3.5 MB)<br>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sas">SAS file</a> (3.8 MB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sav">SPSS file</a> (3.8 MB)<br>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sav">SPSS file</a> (2.4 MB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.dta">Stata file</a> (3.3 MB)</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.dta">Stata file</a> (3.5 MB)</li>
|
||||
</ul>
|
||||
<div id="source-5" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#source-5" class="anchor"></a>Source</h3>
|
||||
<p>This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2019) and EUCAST (2011-2021).</p>
|
||||
<p>This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2020) and EUCAST (2011-2021).</p>
|
||||
</div>
|
||||
<div id="example-content-5" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -39,7 +39,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -376,21 +376,33 @@
|
||||
<div id="latest-released-version" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#latest-released-version" class="anchor"></a>Latest released version</h4>
|
||||
<p>This package is <a href="https://msberends.r-universe.dev">available here</a> on the <a href="https://ropensci.org/r-universe/">rOpenSci R-universe platform</a>, as CRAN does not allow frequent updates of large packages (though the <code>AMR</code> package is only 7-9 MB). With CRAN, we apparently cannot update this package frequently enough to implement the latest EUCAST/CLSI guidelines or the latest microbial taxonomy.</p>
|
||||
<p>Install this package in R by using the command:</p>
|
||||
<p><a href="https://cran.r-project.org/package=AMR"><img src="https://www.r-pkg.org/badges/version-ago/AMR" alt="CRAN"></a> <a href="https://cran.r-project.org/package=AMR"><img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR" alt="CRANlogs"></a></p>
|
||||
<p>This package is available <a href="https://cran.r-project.org/package=AMR">here on the official R network (CRAN)</a>. Install this package in R from CRAN by using the command:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span>, repos <span class="op">=</span> <span class="st">"https://msberends.r-universe.dev"</span><span class="op">)</span></code></pre></div>
|
||||
<p>It will be downloaded and installed automatically.</p>
|
||||
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></code></pre></div>
|
||||
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> > <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
|
||||
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
|
||||
</div>
|
||||
<div id="latest-development-version" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#latest-development-version" class="anchor"></a>Latest development version</h4>
|
||||
<p>The latest and unpublished development version can be installed from GitHub using:</p>
|
||||
<p><img src="https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=master" alt="R-code-check"><img src="https://www.codefactor.io/repository/github/msberends/amr" alt="CodeFactor"><img src="https://codecov.io/gh/msberends/AMR?branch=master" alt="Codecov"></p>
|
||||
<p>The latest and unpublished development version can be installed from GitHub in two ways:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Directly, using:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span> <span class="co"># if you haven't already</span>
|
||||
<span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></code></pre></div>
|
||||
<p><img src="https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=master" alt="R-code-check"><img src="https://www.codefactor.io/repository/github/msberends/amr" alt="CodeFactor"><img src="https://codecov.io/gh/msberends/AMR?branch=master" alt="Codecov"></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>From the <a href="https://ropensci.org/r-universe/">rOpenSci R-universe platform</a>, by adding <a href="https://msberends.r-universe.dev">our R-universe address</a> to your list of repositories (‘repos’):</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op">(</span>repos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/options.html">getOption</a></span><span class="op">(</span><span class="st">"repos"</span><span class="op">)</span>,
|
||||
msberends <span class="op">=</span> <span class="st">"https://msberends.r-universe.dev"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||||
<p>After this, you can install and update this <code>AMR</code> package like any official release (using <code><a href="https://rdrr.io/r/utils/install.packages.html">install.packages("AMR")</a></code> or in RStudio via <em>Tools</em> > <em>Check of Package Updates…</em>).</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>You can also download the latest build from our repository: <a href="https://github.com/msberends/AMR/raw/master/data-raw/AMR_latest.tar.gz" class="uri">https://github.com/msberends/AMR/raw/master/data-raw/AMR_latest.tar.gz</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -236,15 +236,16 @@
|
||||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div id="amr-170" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.7.0">
|
||||
<a href="#amr-170" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.0</h1>
|
||||
<div id="amr-171" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.7.1">
|
||||
<a href="#amr-171" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1</h1>
|
||||
<div id="breaking-change" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#breaking-change" class="anchor"></a>Breaking change</h3>
|
||||
<ul>
|
||||
<li><p>Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using <code><a href="../reference/as.rsi.html">as.rsi()</a></code>)</p></li>
|
||||
<li>
|
||||
<p>All antibiotic class selectors (such as <code><a href="../reference/antibiotic_class_selectors.html">carbapenems()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) can now be used for filtering as well, making all their accompanying <code>filter_*()</code> functions redundant (such as <code><a href="../reference/AMR-deprecated.html">filter_carbapenems()</a></code>, <code><a href="../reference/AMR-deprecated.html">filter_aminoglycosides()</a></code>). These functions are now deprecated and will be removed in a next release.</p>
|
||||
<p>All antibiotic class selectors (such as <code><a href="../reference/antibiotic_class_selectors.html">carbapenems()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) can now be used for filtering as well, making all their accompanying <code>filter_*()</code> functions redundant (such as <code><a href="../reference/AMR-deprecated.html">filter_carbapenems()</a></code>, <code><a href="../reference/AMR-deprecated.html">filter_aminoglycosides()</a></code>). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># select columns with results for carbapenems</span>
|
||||
@ -284,7 +285,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>Function <code><a href="../reference/antibiotic_class_selectors.html">betalactams()</a></code> as additional antbiotic column selector and function <code><a href="../reference/AMR-deprecated.html">filter_betalactams()</a></code> as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.</li>
|
||||
<li>A <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>
|
||||
<li>A <code>ggplot()</code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -292,6 +293,8 @@
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#changed" class="anchor"></a>Changed</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> now supports grouping using the <code>dplyr</code> package</li>
|
||||
<li>Custom MDRO guidelines (<code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code>):
|
||||
<ul>
|
||||
<li>Custom MDRO guidelines can now be combined with other custom MDRO guidelines using <code><a href="https://rdrr.io/r/base/c.html">c()</a></code>
|
||||
@ -340,6 +343,7 @@
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#other" class="anchor"></a>Other</h3>
|
||||
<ul>
|
||||
<li>As requested by CRAN administrators: decreased package size by 3 MB in costs of a slower loading time of the package</li>
|
||||
<li>All unit tests are now processed by the <code>tinytest</code> package, instead of the <code>testthat</code> package. The <code>testthat</code> package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the <code>tinytest</code> package is very lightweight and dependency-free.</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -382,7 +386,7 @@
|
||||
<span class="co">#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div>
|
||||
</li>
|
||||
<li><p>Support for custom MDRO guidelines, using the new <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><a href="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
|
||||
<li><p><code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> generics for classes <code><mic></code> and <code><disk></code></p></li>
|
||||
<li><p><code>ggplot()</code> generics for classes <code><mic></code> and <code><disk></code></p></li>
|
||||
<li>
|
||||
<p>Function <code><a href="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||||
@ -439,7 +443,7 @@
|
||||
<li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
|
||||
<li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li>
|
||||
<li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li>
|
||||
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> on any vector of MIC and disk diffusion values</li>
|
||||
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code>ggplot()</code> on any vector of MIC and disk diffusion values</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the <code>microorganisms</code> data set</li>
|
||||
@ -456,7 +460,7 @@
|
||||
<code><a href="../reference/as.rsi.html">is.rsi.eligible()</a></code> now detects if the column name resembles an antibiotic name or code and now returns <code>TRUE</code> immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li>
|
||||
<li>Functions <code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> now support less than a day as value for argument <code>episode_days</code> (e.g., to include one patient/test per hour)</li>
|
||||
<li>Argument <code>ampc_cephalosporin_resistance</code> in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
|
||||
<li>Functions <code><a href="https://docs.ropensci.org/skimr/reference/print.html">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">dplyr::group_by()</a></code>
|
||||
<li>Functions <code><a href="https://rdrr.io/r/base/print.html">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">dplyr::group_by()</a></code>
|
||||
</li>
|
||||
<li>Improved speed and reliability of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
|
||||
<li>Fix for <code><a href="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li>
|
||||
@ -791,7 +795,7 @@
|
||||
<p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
|
||||
<p>Negative effects of this change are:</p>
|
||||
<ul>
|
||||
<li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>.</li>
|
||||
<li>Function <code>freq()</code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code>freq()</code>.</li>
|
||||
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code><ord></code>, not <code><rsi></code> anymore. This is purely a visual effect.</del></li>
|
||||
<li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
|
||||
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
|
||||
@ -1123,7 +1127,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="co">#> invalid microorganism code, NA generated</span></code></pre></div>
|
||||
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
|
||||
</li>
|
||||
<li><p>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
|
||||
<li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
|
||||
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1390,7 +1394,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
|
||||
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code>
|
||||
</li>
|
||||
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>):
|
||||
<li>Frequency tables (<code>freq()</code>):
|
||||
<ul>
|
||||
<li><p>speed improvement for microbial IDs</p></li>
|
||||
<li><p>fixed factor level names for R Markdown</p></li>
|
||||
@ -1400,12 +1404,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span>
|
||||
<span class="co"># grouped boxplots:</span>
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -1415,7 +1419,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
|
||||
</li>
|
||||
<li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
|
||||
<li>Fix for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> for when all values are <code>NA</code>
|
||||
<li>Fix for <code>freq()</code> for when all values are <code>NA</code>
|
||||
</li>
|
||||
<li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
|
||||
<li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
|
||||
@ -1654,7 +1658,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function):
|
||||
<li>Frequency tables (<code>freq()</code> function):
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
|
||||
@ -1664,15 +1668,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="co"># OLD WAY</span>
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
|
||||
<span class="co"># NEW WAY</span>
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># Even supports grouping variables:</span>
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
|
||||
<li><p>The argument <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
|
||||
@ -1754,7 +1758,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below argument <code>minimum</code></p></li>
|
||||
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
|
||||
<li>
|
||||
<p>Frequency tables - <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>:</p>
|
||||
<p>Frequency tables - <code>freq()</code>:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for grouping variables, test with:</p>
|
||||
@ -1762,14 +1766,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for (un)selecting columns:</p>
|
||||
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></code></pre></div>
|
||||
</li>
|
||||
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li>
|
||||
@ -1787,7 +1791,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
|
||||
<li><p>Fix for <code>mo_property</code> not working properly</p></li>
|
||||
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
|
||||
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">top_freq()</a></code></p></li>
|
||||
<li><p>Support for named vectors of class <code>mo</code>, useful for <code>top_freq()</code></p></li>
|
||||
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
|
||||
<li>
|
||||
<p>AI improvements for <code>as.mo</code>:</p>
|
||||
@ -1954,13 +1958,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<div class="sourceCode" id="cb49"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
|
||||
<p>For lists, subsetting is possible:</p>
|
||||
<div class="sourceCode" id="cb50"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span>
|
||||
<span class="va">my_list</span> <span class="op">%>%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
|
||||
<span class="va">my_list</span> <span class="op">%>%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
<span class="va">my_list</span> <span class="op">%>%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
|
||||
<span class="va">my_list</span> <span class="op">%>%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -2033,13 +2037,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<ul>
|
||||
<li>A vignette to explain its usage</li>
|
||||
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
|
||||
<li>Support for <code>table</code> to use as input: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(table(x, y))</a></code>
|
||||
<li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
|
||||
</li>
|
||||
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><a href="https://rdrr.io/r/graphics/hist.html">hist(freq(df$age))</a></code>
|
||||
</li>
|
||||
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
|
||||
</li>
|
||||
<li>Support for quasiquotation: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %>% freq(mycolumn)</code>
|
||||
<li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %>% freq(mycolumn)</code>
|
||||
</li>
|
||||
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li>
|
||||
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>
|
||||
|
@ -12,7 +12,7 @@ articles:
|
||||
datasets: datasets.html
|
||||
resistance_predict: resistance_predict.html
|
||||
welcome_to_AMR: welcome_to_AMR.html
|
||||
last_built: 2021-05-26T12:00Z
|
||||
last_built: 2021-06-03T13:04Z
|
||||
urls:
|
||||
reference: https://msberends.github.io/AMR//reference
|
||||
article: https://msberends.github.io/AMR//articles
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -431,7 +431,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>retired</
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -277,7 +277,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="contact-us"><a class="anchor" href="#contact-us"></a>Contact Us</h2>
|
||||
|
||||
|
||||
@ -286,7 +286,7 @@
|
||||
<p>Matthijs S. Berends <br />
|
||||
m.s.berends [at] umcg [dot] nl <br />
|
||||
University of Groningen
|
||||
Department of Medical Microbiology
|
||||
Department of Medical Microbiology and Infection Prevention
|
||||
University Medical Center Groningen <br />
|
||||
Post Office Box 30001 <br />
|
||||
9700 RB Groningen <br />
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -257,7 +257,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='fu'><a href='as.ab.html'>as.ab</a></span><span class='op'>(</span><span class='st'>"meropenem"</span><span class='op'>)</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -285,7 +285,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -317,7 +317,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># mind the bad spelling of amoxicillin in this line, </span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -342,7 +342,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><a href='antibiotics.html'>antibiotics</a></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -287,7 +287,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p>To split ages into groups, use the <code><a href='age_groups.html'>age_groups()</a></code> function.</p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -288,7 +288,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p>To determine ages, based on one or more reference dates, use the <code><a href='age.html'>age()</a></code> function.</p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -326,7 +326,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a>, <a href='intrinsic_resistant.html'>intrinsic_resistant</a></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -314,7 +314,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -276,7 +276,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi()</a></code></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -307,7 +307,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi()</a></code></p></div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Transform Input to a Microorganism ID — as.mo • AMR (for R)</title>
|
||||
<title>Transform Input to a Microorganism Code — as.mo • AMR (for R)</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@ -48,8 +48,8 @@
|
||||
<link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script>
|
||||
|
||||
<meta property="og:title" content="Transform Input to a Microorganism ID — as.mo" />
|
||||
<meta property="og:description" content="Use this function to determine a valid microorganism ID (mo). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples." />
|
||||
<meta property="og:title" content="Transform Input to a Microorganism Code — as.mo" />
|
||||
<meta property="og:description" content="Use this function to determine a valid microorganism code (mo). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples." />
|
||||
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
|
||||
|
||||
|
||||
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -233,13 +233,13 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Transform Input to a Microorganism ID</h1>
|
||||
<h1>Transform Input to a Microorganism Code</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/msberends/AMR/blob/master/R/mo.R'><code>R/mo.R</code></a></small>
|
||||
<div class="hidden name"><code>as.mo.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
<p>Use this function to determine a valid microorganism ID (<code>mo</code>). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see <em>Source</em>). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (such as <code>"S. aureus"</code>), an abbreviation known in the field (such as <code>"MRSA"</code>), or just a genus. See <em>Examples</em>.</p>
|
||||
<p>Use this function to determine a valid microorganism code (<code>mo</code>). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see <em>Source</em>). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (such as <code>"S. aureus"</code>), an abbreviation known in the field (such as <code>"MRSA"</code>), or just a genus. See <em>Examples</em>.</p>
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>as.mo</span><span class='op'>(</span>
|
||||
@ -314,7 +314,7 @@
|
||||
<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>General Info</h3>
|
||||
|
||||
|
||||
<p>A microorganism ID from this package (class: <code>mo</code>) is human readable and typically looks like these examples:</p><pre> Code Full name
|
||||
<p>A microorganism (MO) code from this package (class: <code>mo</code>) is human readable and typically looks like these examples:</p><pre> Code Full name
|
||||
--------------- --------------------------------------
|
||||
B_KLBSL Klebsiella
|
||||
B_KLBSL_PNMN Klebsiella pneumoniae
|
||||
@ -422,7 +422,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a> for the <a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a> that is being used to determine ID's.</p>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -363,8 +363,8 @@
|
||||
<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Supported Guidelines</h3>
|
||||
|
||||
|
||||
<p>For interpreting MIC values as well as disk diffusion diameters, currently supported guidelines to be used as input for the <code>guideline</code> argument are: "EUCAST 2021", "EUCAST 2020", "EUCAST 2019", "EUCAST 2018", "EUCAST 2017", "EUCAST 2016", "EUCAST 2015", "EUCAST 2014", "EUCAST 2013", "EUCAST 2012", "EUCAST 2011", "CLSI 2019", "CLSI 2018", "CLSI 2017", "CLSI 2016", "CLSI 2015", "CLSI 2014", "CLSI 2013", "CLSI 2012", "CLSI 2011" and "CLSI 2010".</p>
|
||||
<p>Simply using <code>"CLSI"</code> or <code>"EUCAST"</code> as input will automatically select the latest version of that guideline. You can set your own data set using the <code>reference_data</code> argument. The <code>guideline</code> argument will then be ignored.</p>
|
||||
<p>For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (2011-2021) and CLSI (2010-2020).</p>
|
||||
<p>Thus, the <code>guideline</code> argument must be set to e.g., <code>"EUCAST 2021"</code> or <code>"CLSI 2020"</code>. By simply using <code>"EUCAST"</code> (the default) or <code>"CLSI"</code> as input, the latest version of that guideline will automatically be selected. You can set your own data set using the <code>reference_data</code> argument. The <code>guideline</code> argument will then be ignored.</p>
|
||||
|
||||
<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>After Interpretation</h3>
|
||||
|
||||
@ -374,7 +374,7 @@
|
||||
<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Machine-Readable Interpretation Guidelines</h3>
|
||||
|
||||
|
||||
<p>The repository of this package <a href='https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt'>contains a machine-readable version</a> of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. <strong>This allows for easy implementation of these rules in laboratory information systems (LIS)</strong>. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.</p>
|
||||
<p>The repository of this package <a href='https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt'>contains a machine-readable version</a> of all guidelines. This is a CSV file consisting of 21,996 rows and 10 columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. <strong>This allows for easy implementation of these rules in laboratory information systems (LIS)</strong>. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.</p>
|
||||
|
||||
<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Other</h3>
|
||||
|
||||
@ -395,7 +395,7 @@ A microorganism is categorised as <em>Susceptible, standard dosing regimen</em>,
|
||||
A microorganism is categorised as <em>Susceptible, Increased exposure</em> when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
|
||||
<p>This AMR package honours this (new) insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
|
||||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
@ -412,7 +412,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.mic.html'>as.mic()</a></code>, <code><a href='as.disk.html'>as.disk()</a></code>, <code><a href='as.mo.html'>as.mo()</a></code></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -324,7 +324,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># \donttest{</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -274,7 +274,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='fu'>availability</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -272,7 +272,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>FUN</th>
|
||||
<td><p>the function to call on the <code>mo</code> column to transform the microorganism IDs, defaults to <code><a href='mo_property.html'>mo_shortname()</a></code></p></td>
|
||||
<td><p>the function to call on the <code>mo</code> column to transform the microorganism codes, defaults to <code><a href='mo_property.html'>mo_shortname()</a></code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>...</th>
|
||||
@ -339,7 +339,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># \donttest{</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -270,7 +270,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p>Data set <a href='microorganisms.html'>microorganisms</a> for the actual data. <br />
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -262,7 +262,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a></p></div>
|
||||
|
@ -83,7 +83,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -332,7 +332,7 @@ A microorganism is categorised as <em>Susceptible, standard dosing regimen</em>,
|
||||
A microorganism is categorised as <em>Susceptible, Increased exposure</em> when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code>count_susceptible()</code> (equal to <code>count_SI()</code>) to count susceptible isolates.</p>
|
||||
<p>This AMR package honours this (new) insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code>count_susceptible()</code> (equal to <code>count_SI()</code>) to count susceptible isolates.</p>
|
||||
<h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination Therapy</h2>
|
||||
|
||||
|
||||
@ -368,7 +368,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='proportion.html'>proportion_*</a></code> to calculate microbial resistance and susceptibility.</p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -348,7 +348,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>maturing<
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='va'>x</span> <span class='op'><-</span> <span class='fu'>custom_eucast_rules</span><span class='op'>(</span><span class='va'>AMC</span> <span class='op'>==</span> <span class='st'>"R"</span> <span class='op'>&</span> <span class='va'>genus</span> <span class='op'>==</span> <span class='st'>"Klebsiella"</span> <span class='op'>~</span> <span class='va'>aminopenicillins</span> <span class='op'>==</span> <span class='st'>"R"</span>,
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -271,7 +271,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
|
@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
|
||||
</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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -381,7 +381,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># \donttest{</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -269,7 +269,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -264,7 +264,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
|
@ -83,7 +83,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -448,7 +448,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='key_antimicrobials.html'>key_antimicrobials()</a></code></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -342,7 +342,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>questioni
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
|
||||
|
||||
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -287,7 +287,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate()</a></code></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -426,7 +426,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># \donttest{</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -287,7 +287,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='va'>df</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span><span class='op'>(</span>amox <span class='op'>=</span> <span class='st'>"S"</span>,
|
||||
|
@ -81,7 +81,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -363,7 +363,7 @@
|
||||
<td>
|
||||
<p><code><a href="as.mo.html">as.mo()</a></code> <code><a href="as.mo.html">is.mo()</a></code> <code><a href="as.mo.html">mo_failures()</a></code> <code><a href="as.mo.html">mo_uncertainties()</a></code> <code><a href="as.mo.html">mo_renamed()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Transform Input to a Microorganism ID</p></td>
|
||||
<td><p>Transform Input to a Microorganism Code</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -265,7 +265,7 @@
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># \donttest{</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -274,7 +274,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>maturing<
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='fu'>italicise_taxonomy</span><span class='op'>(</span><span class='st'>"An overview of Staphylococcus aureus isolates"</span><span class='op'>)</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -293,7 +293,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='fu'>left_join_microorganisms</span><span class='op'>(</span><span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"K. pneumoniae"</span><span class='op'>)</span><span class='op'>)</span>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -373,7 +373,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate()</a></code></p></div>
|
||||
|
@ -82,7 +82,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.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -281,7 +281,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
|
||||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='skewness.html'>skewness()</a></code></p></div>
|
||||
|