mirror of
https://github.com/msberends/AMR.git
synced 2026-03-26 15:15:56 +01:00
Compare commits
5 Commits
v1.8.0
...
ad82bb4ce0
| Author | SHA1 | Date | |
|---|---|---|---|
| ad82bb4ce0 | |||
| dedbe92322 | |||
| 3b2b2be5f8 | |||
| 18e8525d10 | |||
| be792cc9eb |
@@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 1.8.0
|
||||
Date: 2022-01-03
|
||||
Version: 1.8.0.9004
|
||||
Date: 2022-03-03
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
data analysis and to work with microbial and antimicrobial properties by
|
||||
@@ -71,7 +71,8 @@ Depends: R (>= 3.0.0)
|
||||
Enhances:
|
||||
cleaner,
|
||||
skimr,
|
||||
ggplot2
|
||||
ggplot2,
|
||||
tidyselect
|
||||
Suggests:
|
||||
curl,
|
||||
dplyr,
|
||||
|
||||
24
NEWS.md
24
NEWS.md
@@ -1,8 +1,26 @@
|
||||
# `AMR` 1.8.0.9004
|
||||
## <small>Last updated: 3 March 2022</small>
|
||||
|
||||
All functions in this package are considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months.
|
||||
|
||||
### Changed
|
||||
* Support for antibiotic interpretations of the MIPS laboratory system: `"U"` for S ('susceptible urine'), `"D"` for I ('susceptible dose-dependent')
|
||||
* Improved algorithm of `as.mo()`, especially for ignoring non-taxonomic text, such as:
|
||||
```r
|
||||
mo_name("methicillin-resistant S. aureus (MRSA)")
|
||||
#> [1] "Staphylococcus aureus"
|
||||
```
|
||||
* More informative warning messages
|
||||
* Added 192 as valid MIC
|
||||
* Updated MIC printing in tibbles
|
||||
|
||||
### Other
|
||||
* Fix for unit testing on R 3.3
|
||||
* Fix for size of some image elements, as requested by CRAN
|
||||
|
||||
|
||||
# `AMR` 1.8.0
|
||||
|
||||
|
||||
All functions in this package are now all considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months from now on.
|
||||
|
||||
### Breaking changes
|
||||
* Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version
|
||||
* Removed the `key_antibiotics()` and `key_antibiotics_equal()` functions, which were deprecated and superseded by `key_antimicrobials()` and `antimicrobials_equal()`
|
||||
|
||||
@@ -206,7 +206,7 @@ check_dataset_integrity <- function() {
|
||||
" overwritten by your global environment and prevent", plural[2],
|
||||
" the AMR package from working correctly: ",
|
||||
vector_and(overwritten, quotes = "'"),
|
||||
".\nPlease rename your object", plural[3], ".", call = FALSE)
|
||||
".\nPlease rename your object", plural[3], ".")
|
||||
}
|
||||
}
|
||||
# check if other packages did not overwrite our data sets
|
||||
@@ -492,7 +492,7 @@ message_ <- function(...,
|
||||
warning_ <- function(...,
|
||||
add_fn = list(),
|
||||
immediate = FALSE,
|
||||
call = TRUE) {
|
||||
call = FALSE) {
|
||||
warning(word_wrap(...,
|
||||
add_fn = add_fn,
|
||||
as_note = FALSE),
|
||||
@@ -559,7 +559,7 @@ stop_ifnot <- function(expr, ..., call = TRUE) {
|
||||
|
||||
return_after_integrity_check <- function(value, type, check_vector) {
|
||||
if (!all(value[!is.na(value)] %in% check_vector)) {
|
||||
warning_(paste0("invalid ", type, ", NA generated"), call = FALSE)
|
||||
warning_(paste0("invalid ", type, ", NA generated"))
|
||||
value[!value %in% check_vector] <- NA
|
||||
}
|
||||
value
|
||||
|
||||
10
R/ab.R
10
R/ab.R
@@ -455,15 +455,13 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
x_unknown_ATCs <- x_unknown[x_unknown %like% "[A-Z][0-9][0-9][A-Z][A-Z][0-9][0-9]"]
|
||||
x_unknown <- x_unknown[!x_unknown %in% x_unknown_ATCs]
|
||||
if (length(x_unknown_ATCs) > 0 & fast_mode == FALSE) {
|
||||
warning_("These ATC codes are not (yet) in the antibiotics data set: ",
|
||||
vector_and(x_unknown_ATCs), ".",
|
||||
call = FALSE)
|
||||
warning_("in `as.ab()`: these ATC codes are not (yet) in the antibiotics data set: ",
|
||||
vector_and(x_unknown_ATCs), ".")
|
||||
}
|
||||
|
||||
if (length(x_unknown) > 0 & fast_mode == FALSE) {
|
||||
warning_("These values could not be coerced to a valid antimicrobial ID: ",
|
||||
vector_and(x_unknown), ".",
|
||||
call = FALSE)
|
||||
warning_("in `as.ab()`: these values could not be coerced to a valid antimicrobial ID: ",
|
||||
vector_and(x_unknown), ".")
|
||||
}
|
||||
|
||||
x_result <- x_new[match(x_bak_clean, x)]
|
||||
|
||||
@@ -240,8 +240,8 @@ ab_ddd <- function(x, administration = "oral", ...) {
|
||||
units <- list(...)$units
|
||||
if (!is.null(units) && isTRUE(units)) {
|
||||
if (message_not_thrown_before("ab_ddd", entire_session = TRUE)) {
|
||||
warning_("Using `ab_ddd(..., units = TRUE)` is deprecated, use `ab_ddd_units()` to retrieve units instead. ",
|
||||
"This warning will be shown once per session.", call = FALSE)
|
||||
warning_("in `ab_ddd()`: using `ab_ddd(..., units = TRUE)` is deprecated, use `ab_ddd_units()` to retrieve units instead.",
|
||||
"This warning will be shown once per session.")
|
||||
}
|
||||
ddd_prop <- paste0(ddd_prop, "_units")
|
||||
} else {
|
||||
@@ -250,9 +250,9 @@ ab_ddd <- function(x, administration = "oral", ...) {
|
||||
out <- ab_validate(x = x, property = ddd_prop)
|
||||
|
||||
if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||
warning_("DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package. ",
|
||||
warning_("in `ab_ddd()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||
"Please refer to the WHOCC website:\n",
|
||||
"www.whocc.no/ddd/list_of_ddds_combined_products/", call = FALSE)
|
||||
"www.whocc.no/ddd/list_of_ddds_combined_products/")
|
||||
}
|
||||
out
|
||||
}
|
||||
@@ -265,9 +265,9 @@ ab_ddd_units <- function(x, administration = "oral", ...) {
|
||||
|
||||
x <- as.ab(x, ...)
|
||||
if (any(ab_name(x, language = NULL) %like% "/")) {
|
||||
warning_("DDDs of combined products are available for different dose combinations and not (yet) part of the AMR package. ",
|
||||
warning_("in `ab_ddd_units()`: DDDs of combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||
"Please refer to the WHOCC website:\n",
|
||||
"www.whocc.no/ddd/list_of_ddds_combined_products/", call = FALSE)
|
||||
"www.whocc.no/ddd/list_of_ddds_combined_products/")
|
||||
}
|
||||
|
||||
ddd_prop <- paste0(administration, "_units")
|
||||
@@ -311,12 +311,12 @@ ab_url <- function(x, open = FALSE, ...) {
|
||||
|
||||
NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(atcs)]
|
||||
if (length(NAs) > 0) {
|
||||
warning_("No ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
||||
warning_("in `ab_url()`: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
||||
}
|
||||
|
||||
if (open == TRUE) {
|
||||
if (length(u) > 1 & !is.na(u[1L])) {
|
||||
warning_("Only the first URL will be opened, as `browseURL()` only suports one string.")
|
||||
warning_("in `ab_url()`: only the first URL will be opened, as `browseURL()` only suports one string.")
|
||||
}
|
||||
if (!is.na(u[1L])) {
|
||||
utils::browseURL(u[1L])
|
||||
@@ -385,7 +385,8 @@ set_ab_names <- function(data, ..., property = "name", language = get_AMR_locale
|
||||
},
|
||||
USE.NAMES = FALSE)
|
||||
if (any(x %in% c("", NA))) {
|
||||
warning_("No ", property, " found for column(s): ", vector_and(vars[x %in% c("", NA)], sort = FALSE), call = FALSE)
|
||||
warning_("in `set_ab_names()`: no ", property, " found for column(s): ",
|
||||
vector_and(vars[x %in% c("", NA)], sort = FALSE))
|
||||
x[x %in% c("", NA)] <- vars[x %in% c("", NA)]
|
||||
}
|
||||
|
||||
|
||||
@@ -481,14 +481,13 @@ ab_select_exec <- function(function_name,
|
||||
untreatable <- antibiotics[which(antibiotics$name %like% "-high|EDTA|polysorbate|macromethod|screening|/nacubactam"), "ab", drop = TRUE]
|
||||
if (any(untreatable %in% names(ab_in_data))) {
|
||||
if (message_not_thrown_before(function_name, "ab_class", "untreatable", entire_session = TRUE)) {
|
||||
warning_("Some agents in `", function_name, "()` were ignored since they cannot be used for treating patients: ",
|
||||
warning_("in `", function_name, "()`: some agents were ignored since they cannot be used for treating patients: ",
|
||||
vector_and(ab_name(names(ab_in_data)[names(ab_in_data) %in% untreatable],
|
||||
language = NULL,
|
||||
tolower = TRUE),
|
||||
quotes = FALSE,
|
||||
sort = TRUE), ". They can be included using `", function_name, "(only_treatable = FALSE)`. ",
|
||||
"This warning will be shown once per session.",
|
||||
call = FALSE)
|
||||
"This warning will be shown once per session.")
|
||||
}
|
||||
ab_in_data <- ab_in_data[!names(ab_in_data) %in% untreatable]
|
||||
}
|
||||
|
||||
6
R/age.R
6
R/age.R
@@ -95,10 +95,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
||||
|
||||
if (any(ages < 0, na.rm = TRUE)) {
|
||||
ages[!is.na(ages) & ages < 0] <- NA
|
||||
warning_("NAs introduced for ages below 0.", call = TRUE)
|
||||
warning_("in `age()`: NAs introduced for ages below 0.")
|
||||
}
|
||||
if (any(ages > 120, na.rm = TRUE)) {
|
||||
warning_("Some ages are above 120.", call = TRUE)
|
||||
warning_("in `age()`: some ages are above 120.")
|
||||
}
|
||||
|
||||
if (isTRUE(na.rm)) {
|
||||
@@ -171,7 +171,7 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
|
||||
|
||||
if (any(x < 0, na.rm = TRUE)) {
|
||||
x[x < 0] <- NA
|
||||
warning_("NAs introduced for ages below 0.", call = TRUE)
|
||||
warning_("in `age_groups()`: NAs introduced for ages below 0.")
|
||||
}
|
||||
if (is.character(split_at)) {
|
||||
split_at <- split_at[1L]
|
||||
|
||||
@@ -175,7 +175,7 @@ atc_online_property <- function(atc_code,
|
||||
colnames(out) <- gsub("^atc.*", "atc", tolower(colnames(out)))
|
||||
|
||||
if (length(out) == 0) {
|
||||
warning_("ATC not found: ", atc_code[i], ". Please check ", atc_url, ".", call = FALSE)
|
||||
warning_("in `atc_online_property()`: ATC not found: ", atc_code[i], ". Please check ", atc_url, ".")
|
||||
returnvalue[i] <- NA
|
||||
next
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ format.bug_drug_combinations <- function(x,
|
||||
|
||||
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)
|
||||
warning_("in `format()`: formatting the output of `bug_drug_combinations()` does not support grouped variables, they were ignored")
|
||||
idx <- split(seq_len(nrow(x)), paste0(x$mo, "%%", x$ab))
|
||||
x <- data.frame(mo = gsub("(.*)%%(.*)", "\\1", names(idx)),
|
||||
ab = gsub("(.*)%%(.*)", "\\2", names(idx)),
|
||||
|
||||
@@ -43,7 +43,7 @@ format_included_data_number <- function(data) {
|
||||
#'
|
||||
#' This package contains the complete taxonomic tree (last updated: `r CATALOGUE_OF_LIFE$yearmonth_LPSN`) of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (CoL), supplemented with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN).
|
||||
#' @section Catalogue of Life:
|
||||
#' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{logo_col.png}{options: height="40" style=margin-bottom:"5"} \cr}
|
||||
#' This package contains the complete taxonomic tree of almost all microorganisms (`r format_included_data_number(microorganisms)` species) from the authoritative and comprehensive Catalogue of Life (CoL, <http://www.catalogueoflife.org>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/CatalogueOfLife/general) is finished, which we await.
|
||||
#'
|
||||
#' [Click here][catalogue_of_life] for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with [catalogue_of_life_version()].
|
||||
|
||||
4
R/disk.R
4
R/disk.R
@@ -100,10 +100,10 @@ as.disk <- function(x, na.rm = FALSE) {
|
||||
unique() %pm>%
|
||||
sort() %pm>%
|
||||
vector_and(quotes = TRUE)
|
||||
warning_(na_after - na_before, " results truncated (",
|
||||
warning_("in `as.disk()`: ", na_after - na_before, " results truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid disk zones: ",
|
||||
list_missing, call = FALSE)
|
||||
list_missing)
|
||||
}
|
||||
}
|
||||
set_clean_class(as.integer(x),
|
||||
|
||||
@@ -181,8 +181,7 @@ eucast_rules <- function(x,
|
||||
meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE)
|
||||
|
||||
if ("custom" %in% rules & is.null(custom_rules)) {
|
||||
warning_("No custom rules were set with the `custom_rules` argument",
|
||||
call = FALSE,
|
||||
warning_("in `eucast_rules()`: no custom rules were set with the `custom_rules` argument",
|
||||
immediate = TRUE)
|
||||
rules <- rules[rules != "custom"]
|
||||
if (length(rules) == 0) {
|
||||
@@ -915,13 +914,12 @@ eucast_rules <- function(x,
|
||||
# take order from original data set
|
||||
warn_lacking_rsi_class <- warn_lacking_rsi_class[order(colnames(x.bak))]
|
||||
warn_lacking_rsi_class <- warn_lacking_rsi_class[!is.na(warn_lacking_rsi_class)]
|
||||
warning_("Not all columns with antimicrobial results are of class <rsi>. Transform them on beforehand, with e.g.:\n",
|
||||
warning_("in `eucast_rules()`: not all columns with antimicrobial results are of class <rsi>. Transform them on beforehand, with e.g.:\n",
|
||||
" - ", x_deparsed, " %>% as.rsi(", ifelse(length(warn_lacking_rsi_class) == 1,
|
||||
warn_lacking_rsi_class,
|
||||
paste0(warn_lacking_rsi_class[1], ":", warn_lacking_rsi_class[length(warn_lacking_rsi_class)])), ")\n",
|
||||
" - ", x_deparsed, " %>% mutate_if(is.rsi.eligible, as.rsi)\n",
|
||||
" - ", x_deparsed, " %>% mutate(across(where(is.rsi.eligible), as.rsi))",
|
||||
call = FALSE)
|
||||
" - ", x_deparsed, " %>% mutate(across(where(is.rsi.eligible), as.rsi))")
|
||||
}
|
||||
|
||||
# Return data set ---------------------------------------------------------
|
||||
@@ -986,14 +984,14 @@ edit_rsi <- function(x,
|
||||
TRUE
|
||||
})
|
||||
suppressWarnings(new_edits[rows, cols] <<- to)
|
||||
warning_("Value \"", to, "\" added to the factor levels of column", ifelse(length(cols) == 1, "", "s"),
|
||||
warning_("in `eucast_rules()`: value \"", to, "\" added to the factor levels of column",
|
||||
ifelse(length(cols) == 1, "", "s"),
|
||||
" ", vector_and(cols, quotes = "`", sort = FALSE),
|
||||
" because this value was not an existing factor level.",
|
||||
call = FALSE)
|
||||
" because this value was not an existing factor level.")
|
||||
txt_warning()
|
||||
warned <- FALSE
|
||||
} else {
|
||||
warning_(w$message, call = FALSE)
|
||||
warning_("in `eucast_rules()`: ", w$message)
|
||||
txt_warning()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -267,7 +267,6 @@ get_column_abx <- function(x,
|
||||
", as it is already set for ",
|
||||
names(already_set_as), " (", ab_name(names(already_set_as), tolower = TRUE, language = NULL), ")"),
|
||||
add_fn = font_red,
|
||||
call = FALSE,
|
||||
immediate = verbose)
|
||||
}
|
||||
}
|
||||
@@ -338,6 +337,5 @@ generate_warning_abs_missing <- function(missing, any = FALSE) {
|
||||
}
|
||||
warning_(paste0("Introducing NAs since", any_txt[1], " these antimicrobials ", any_txt[2], " required: ",
|
||||
vector_and(missing, quotes = FALSE)),
|
||||
immediate = TRUE,
|
||||
call = FALSE)
|
||||
immediate = TRUE)
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ join_microorganisms <- function(type, x, by, suffix, ...) {
|
||||
}
|
||||
|
||||
if (type %like% "full|left|right|inner" && NROW(joined) > NROW(x)) {
|
||||
warning_("The newly joined data set contains ", nrow(joined) - nrow(x), " rows more than the number of rows of `x`.", call = FALSE)
|
||||
warning_("in `", type, "_join()`: the newly joined data set contains ", nrow(joined) - nrow(x), " rows more than the number of rows of `x`.")
|
||||
}
|
||||
|
||||
joined
|
||||
|
||||
@@ -150,7 +150,7 @@ key_antimicrobials <- function(x = NULL,
|
||||
col_mo <- search_type_in_df(x = x, type = "mo", info = FALSE)
|
||||
}
|
||||
if (is.null(col_mo)) {
|
||||
warning_("No column found for `col_mo`, ignoring antibiotics set in `gram_negative` and `gram_positive`, and antimycotics set in `antifungal`", call = FALSE)
|
||||
warning_("in `key_antimicrobials()`: no column found for `col_mo`, ignoring antibiotics set in `gram_negative` and `gram_positive`, and antimycotics set in `antifungal`")
|
||||
gramstain <- NA_character_
|
||||
kingdom <- NA_character_
|
||||
} else {
|
||||
@@ -172,11 +172,11 @@ key_antimicrobials <- function(x = NULL,
|
||||
if (values_new_length < values_old_length &
|
||||
any(filter, na.rm = TRUE) &
|
||||
message_not_thrown_before("key_antimicrobials", name)) {
|
||||
warning_(ifelse(values_new_length == 0,
|
||||
warning_("in `key_antimicrobials()`: ",
|
||||
ifelse(values_new_length == 0,
|
||||
"No columns available ",
|
||||
paste0("Only using ", values_new_length, " out of ", values_old_length, " defined columns ")),
|
||||
"as key antimicrobials for ", name, "s. See ?key_antimicrobials.",
|
||||
call = FALSE)
|
||||
"as key antimicrobials for ", name, "s. See ?key_antimicrobials.")
|
||||
}
|
||||
|
||||
generate_antimcrobials_string(x[which(filter), c(universal, values), drop = FALSE])
|
||||
@@ -217,7 +217,7 @@ key_antimicrobials <- function(x = NULL,
|
||||
cols = cols)
|
||||
|
||||
if (length(unique(key_ab)) == 1) {
|
||||
warning_("No distinct key antibiotics determined.", call = FALSE)
|
||||
warning_("in `key_antimicrobials()`: no distinct key antibiotics determined.")
|
||||
}
|
||||
|
||||
key_ab
|
||||
|
||||
@@ -32,23 +32,23 @@
|
||||
#' @rdname lifecycle
|
||||
#' @description Functions in this `AMR` package are categorised using [the lifecycle circle of the Tidyverse as found on www.tidyverse.org/lifecycle](https://lifecycle.r-lib.org/articles/stages.html).
|
||||
#'
|
||||
#' \if{html}{\figure{lifecycle_tidyverse.svg}{options: height=200px style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_tidyverse.svg}{options: height="200" style=margin-bottom:"5"} \cr}
|
||||
#' This page contains a section for every lifecycle (with text borrowed from the aforementioned Tidyverse website), so they can be used in the manual pages of the functions.
|
||||
#' @section Experimental Lifecycle:
|
||||
#' \if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
#' The [lifecycle][AMR::lifecycle] of this function is **experimental**. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this `AMR` package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.
|
||||
#' @section Maturing Lifecycle:
|
||||
#' \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
#' The [lifecycle][AMR::lifecycle] of this function is **maturing**. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome [to suggest changes at our repository](https://github.com/msberends/AMR/issues) or [write us an email (see section 'Contact Us')][AMR::AMR].
|
||||
#' @section Stable Lifecycle:
|
||||
#' \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
#' The [lifecycle][AMR::lifecycle] of this function is **stable**. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
#'
|
||||
#' If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
#' @section Retired Lifecycle:
|
||||
#' \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
#' The [lifecycle][AMR::lifecycle] of this function is **retired**. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
|
||||
#' @section Questioning Lifecycle:
|
||||
#' \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
#' The [lifecycle][AMR::lifecycle] of this function is **questioning**. This function might be no longer be optimal approach, or is it questionable whether this function should be in this `AMR` package at all.
|
||||
NULL
|
||||
|
||||
8
R/mdro.R
8
R/mdro.R
@@ -240,7 +240,7 @@ mdro <- function(x = NULL,
|
||||
}
|
||||
|
||||
if (!is.null(list(...)$country)) {
|
||||
warning_("Using `country` is deprecated, use `guideline` instead. See ?mdro.", call = FALSE)
|
||||
warning_("in `mdro()`: using `country` is deprecated, use `guideline` instead. See ?mdro")
|
||||
guideline <- list(...)$country
|
||||
}
|
||||
|
||||
@@ -1550,8 +1550,8 @@ mdro <- function(x = NULL,
|
||||
if (guideline$code == "cmi2012") {
|
||||
if (any(x$MDRO == -1, na.rm = TRUE)) {
|
||||
if (message_not_thrown_before("mdro", "availability")) {
|
||||
warning_("NA introduced for isolates where the available percentage of antimicrobial classes was below ",
|
||||
percentage(pct_required_classes), " (set with `pct_required_classes`)", call = FALSE)
|
||||
warning_("in `mdro()`: NA introduced for isolates where the available percentage of antimicrobial classes was below ",
|
||||
percentage(pct_required_classes), " (set with `pct_required_classes`)")
|
||||
}
|
||||
# set these -1s to NA
|
||||
x[which(x$MDRO == -1), "MDRO"] <- NA_integer_
|
||||
@@ -1709,7 +1709,7 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
|
||||
return("error")
|
||||
})
|
||||
if (identical(qry, "error")) {
|
||||
warning_("in custom_mdro_guideline(): rule ", i,
|
||||
warning_("in `custom_mdro_guideline()`: rule ", i,
|
||||
" (`", as.character(guideline[[i]]$query), "`) was ignored because of this error message: ",
|
||||
pkg_env$err_msg,
|
||||
call = FALSE,
|
||||
|
||||
12
R/mic.R
12
R/mic.R
@@ -37,8 +37,8 @@ valid_mic_levels <- c(c(t(vapply(FUN.VALUE = character(9), ops,
|
||||
function(x) paste0(x, sort(c(1:9, 1.5)))))),
|
||||
c(t(vapply(FUN.VALUE = character(45), ops,
|
||||
function(x) paste0(x, c(10:98)[9:98 %% 2 == TRUE])))),
|
||||
c(t(vapply(FUN.VALUE = character(16), ops,
|
||||
function(x) paste0(x, sort(c(2 ^ c(7:11), 80 * c(2:12))))))))
|
||||
c(t(vapply(FUN.VALUE = character(17), ops,
|
||||
function(x) paste0(x, sort(c(2 ^ c(7:11), 192, 80 * c(2:12))))))))
|
||||
|
||||
#' Transform Input to Minimum Inhibitory Concentrations (MIC)
|
||||
#'
|
||||
@@ -175,7 +175,7 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
unique() %pm>%
|
||||
sort() %pm>%
|
||||
vector_and(quotes = TRUE)
|
||||
warning_(na_after - na_before, " results truncated (",
|
||||
warning_("in `as.mic()`: ", na_after - na_before, " results truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid MICs: ",
|
||||
list_missing, call = FALSE)
|
||||
@@ -247,7 +247,9 @@ pillar_shaft.mic <- function(x, ...) {
|
||||
out <- pasted
|
||||
out[is.na(x)] <- font_na(NA)
|
||||
out <- gsub("(<|=|>)", font_silver("\\1"), out)
|
||||
out <- gsub("([.]?0+)$", font_white("\\1"), out)
|
||||
if (any(out %like% "[.]", na.rm = TRUE)) {
|
||||
out <- gsub("([.]?0+)$", font_white("\\1"), out)
|
||||
}
|
||||
create_pillar_column(out, align = "right", width = max(nchar(pasted)))
|
||||
}
|
||||
|
||||
@@ -358,7 +360,7 @@ sort.mic <- function(x, decreasing = FALSE, ...) {
|
||||
#' @export
|
||||
#' @noRd
|
||||
hist.mic <- function(x, ...) {
|
||||
warning_("Use `plot()` or ggplot2's `autoplot()` for optimal plotting of MIC values", call = FALSE)
|
||||
warning_("in `hist()`: use `plot()` or ggplot2's `autoplot()` for optimal plotting of MIC values")
|
||||
hist(log2(x))
|
||||
}
|
||||
|
||||
|
||||
110
R/mo.R
110
R/mo.R
@@ -31,9 +31,9 @@
|
||||
#' @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).
|
||||
#'
|
||||
#' This excludes *Staphylococcus aureus* at default, use `Becker = "all"` to also categorise *S. aureus* as "CoPS".
|
||||
#' @param Lancefield a [logical] to indicate whether beta-haemolytic *Streptococci* should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These *Streptococci* will be categorised in their first group, e.g. *Streptococcus dysgalactiae* will be group C, although officially it was also categorised into groups G and L.
|
||||
#' @param Lancefield a [logical] to indicate whether a beta-haemolytic *Streptococcus* should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These streptococci will be categorised in their first group, e.g. *Streptococcus dysgalactiae* will be group C, although officially it was also categorised into groups G and L.
|
||||
#'
|
||||
#' This excludes *Enterococci* at default (who are in group D), use `Lancefield = "all"` to also categorise all *Enterococci* as group D.
|
||||
#' This excludes enterococci at default (who are in group D), use `Lancefield = "all"` to also categorise all enterococci as group D.
|
||||
#' @param allow_uncertain a number between `0` (or `"none"`) and `3` (or `"all"`), or `TRUE` (= `2`) or `FALSE` (= `0`) to indicate whether the input should be checked for less probable results, see *Details*
|
||||
#' @param reference_df a [data.frame] to be used for extra reference when translating `x` to a valid [`mo`]. See [set_mo_source()] and [get_mo_source()] to automate the usage of your own codes (e.g. used in your analysis or organisation).
|
||||
#' @param ignore_pattern a regular expression (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the option `AMR_ignore_pattern`, e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`.
|
||||
@@ -1188,9 +1188,38 @@ exec_as.mo <- function(x,
|
||||
return(found)
|
||||
}
|
||||
|
||||
# (6) try to strip off half an element from end and check the remains ----
|
||||
# (6) remove non-taxonomic prefix and suffix ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (6) try to strip off half an element from end and check the remains\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (6) remove non-taxonomic prefix and suffix\n"))
|
||||
}
|
||||
x_without_nontax <- gsub("(^[a-zA-Z]+[./-]+[a-zA-Z]+[^a-zA-Z]* )([a-zA-Z.]+ [a-zA-Z]+.*)",
|
||||
"\\2", a.x_backup, perl = TRUE)
|
||||
x_without_nontax <- gsub("( *[(].*[)] *)[^a-zA-Z]*$", "", x_without_nontax, perl = TRUE)
|
||||
if (isTRUE(debug)) {
|
||||
message("Running '", x_without_nontax, "'")
|
||||
}
|
||||
|
||||
# first try without dyslexia mode
|
||||
found <- suppressMessages(suppressWarnings(exec_as.mo(x_without_nontax, initial_search = FALSE, dyslexia_mode = FALSE, allow_uncertain = FALSE, debug = debug, reference_data_to_use = uncertain.reference_data_to_use, actual_uncertainty = 2, actual_input = x_without_nontax)))
|
||||
if (empty_result(found)) {
|
||||
# then with dyslexia mode
|
||||
found <- suppressMessages(suppressWarnings(exec_as.mo(x_without_nontax, initial_search = FALSE, dyslexia_mode = TRUE, allow_uncertain = FALSE, debug = debug, reference_data_to_use = uncertain.reference_data_to_use, actual_uncertainty = 2, actual_input = x_without_nontax)))
|
||||
}
|
||||
if (!empty_result(found) & nchar(g.x_backup_without_spp) >= 6) {
|
||||
# we ran with actual_input = x_without_nontax, so now correct for a.x_backup:
|
||||
uncertain_df <- attr(found, which = "uncertainties", exact = TRUE)
|
||||
uncertain_df$input <- a.x_backup
|
||||
found_result <- found
|
||||
uncertainties <<- rbind(uncertainties,
|
||||
uncertain_df,
|
||||
stringsAsFactors = FALSE)
|
||||
found <- lookup(mo == found)
|
||||
return(found)
|
||||
}
|
||||
|
||||
# (7) try to strip off half an element from end and check the remains ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (7) try to strip off half an element from end and check the remains\n"))
|
||||
}
|
||||
x_strip <- a.x_backup %pm>% strsplit("[ .]") %pm>% unlist()
|
||||
if (length(x_strip) > 1) {
|
||||
@@ -1220,9 +1249,9 @@ exec_as.mo <- function(x,
|
||||
}
|
||||
}
|
||||
}
|
||||
# (7) try to strip off one element from end and check the remains ----
|
||||
# (8) try to strip off one element from end and check the remains ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (7) try to strip off one element from end and check the remains\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (8) try to strip off one element from end and check the remains\n"))
|
||||
}
|
||||
if (length(x_strip) > 1) {
|
||||
for (i in seq_len(length(x_strip) - 1)) {
|
||||
@@ -1249,9 +1278,9 @@ exec_as.mo <- function(x,
|
||||
}
|
||||
}
|
||||
}
|
||||
# (8) check for unknown yeasts/fungi ----
|
||||
# (9) check for unknown yeasts/fungi ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (8) check for unknown yeasts/fungi\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (9) check for unknown yeasts/fungi\n"))
|
||||
}
|
||||
if (b.x_trimmed %like_case% "yeast") {
|
||||
found <- "F_YEAST"
|
||||
@@ -1275,9 +1304,9 @@ exec_as.mo <- function(x,
|
||||
stringsAsFactors = FALSE)
|
||||
return(found)
|
||||
}
|
||||
# (9) try to strip off one element from start and check the remains (only allow >= 2-part name outcome) ----
|
||||
# (10) try to strip off one element from start and check the remains (only allow >= 2-part name outcome) ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (9) try to strip off one element from start and check the remains (only allow >= 2-part name outcome)\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (10) try to strip off one element from start and check the remains (only allow >= 2-part name outcome)\n"))
|
||||
}
|
||||
x_strip <- a.x_backup %pm>% strsplit("[ .]") %pm>% unlist()
|
||||
if (length(x_strip) > 1 & nchar(g.x_backup_without_spp) >= 6) {
|
||||
@@ -1311,9 +1340,9 @@ exec_as.mo <- function(x,
|
||||
if (uncertainty_level >= 3) {
|
||||
now_checks_for_uncertainty_level <- 3
|
||||
|
||||
# (10) try to strip off one element from start and check the remains (any text size) ----
|
||||
# (11) try to strip off one element from start and check the remains (any text size) ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (10) try to strip off one element from start and check the remains (any text size)\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (11) try to strip off one element from start and check the remains (any text size)\n"))
|
||||
}
|
||||
x_strip <- a.x_backup %pm>% strsplit("[ .]") %pm>% unlist()
|
||||
if (length(x_strip) > 1 & nchar(g.x_backup_without_spp) >= 6) {
|
||||
@@ -1338,10 +1367,10 @@ exec_as.mo <- function(x,
|
||||
}
|
||||
}
|
||||
}
|
||||
# (11) try to strip off one element from end and check the remains (any text size) ----
|
||||
# (12) try to strip off one element from end and check the remains (any text size) ----
|
||||
# (this is in fact 7 but without nchar limit of >=6)
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (11) try to strip off one element from end and check the remains (any text size)\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (12) try to strip off one element from end and check the remains (any text size)\n"))
|
||||
}
|
||||
if (length(x_strip) > 1) {
|
||||
for (i in seq_len(length(x_strip) - 1)) {
|
||||
@@ -1366,9 +1395,9 @@ exec_as.mo <- function(x,
|
||||
}
|
||||
}
|
||||
|
||||
# (12) part of a name (very unlikely match) ----
|
||||
# (13) part of a name (very unlikely match) ----
|
||||
if (isTRUE(debug)) {
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (12) part of a name (very unlikely match)\n"))
|
||||
cat(font_bold("\n[ UNCERTAINTY LEVEL", now_checks_for_uncertainty_level, "] (13) part of a name (very unlikely match)\n"))
|
||||
}
|
||||
if (isTRUE(debug)) {
|
||||
message("Running '", f.x_withspaces_end_only, "'")
|
||||
@@ -1460,9 +1489,8 @@ exec_as.mo <- function(x,
|
||||
"You can also use your own reference data with set_mo_source() or directly, e.g.:\n",
|
||||
' as.mo("mycode", reference_df = data.frame(own = "mycode", mo = "', MO_lookup$mo[match("Escherichia coli", MO_lookup$fullname)], '"))\n',
|
||||
' mo_name("mycode", reference_df = data.frame(own = "mycode", mo = "', MO_lookup$mo[match("Escherichia coli", MO_lookup$fullname)], '"))\n')
|
||||
warning_(paste0("\n", msg),
|
||||
warning_(paste0("\nin `as.mo()`: ", msg),
|
||||
add_fn = font_red,
|
||||
call = FALSE,
|
||||
immediate = TRUE) # thus will always be shown, even if >= warnings
|
||||
}
|
||||
# handling uncertainties ----
|
||||
@@ -1502,12 +1530,11 @@ exec_as.mo <- function(x,
|
||||
# comment below code if all staphylococcal species are categorised as CoNS/CoPS
|
||||
if (any(x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property])) {
|
||||
if (message_not_thrown_before("as.mo", "becker")) {
|
||||
warning_("Becker ", font_italic("et al."), " (2014, 2019, 2020) does not contain these species named after their publication: ",
|
||||
warning_("in `as.mo()`: Becker ", font_italic("et al."), " (2014, 2019, 2020) does not contain these species named after their publication: ",
|
||||
font_italic(paste("S.",
|
||||
sort(mo_species(unique(x[x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property]]))),
|
||||
collapse = ", ")),
|
||||
". Categorisation to CoNS/CoPS was taken from the original scientific publication(s).",
|
||||
call = FALSE,
|
||||
immediate = TRUE)
|
||||
}
|
||||
}
|
||||
@@ -1680,8 +1707,7 @@ pillar_shaft.mo <- function(x, ...) {
|
||||
col <- "The data"
|
||||
}
|
||||
warning_(col, " contains old MO codes (from a previous AMR package version). ",
|
||||
"Please update your MO codes with `as.mo()`.",
|
||||
call = FALSE)
|
||||
"Please update your MO codes with `as.mo()`.")
|
||||
}
|
||||
|
||||
# make it always fit exactly
|
||||
@@ -1755,8 +1781,7 @@ print.mo <- function(x, print.shortnames = FALSE, ...) {
|
||||
names(x) <- x_names
|
||||
if (!all(x[!is.na(x)] %in% MO_lookup$mo)) {
|
||||
warning_("Some MO codes are from a previous AMR package version. ",
|
||||
"Please update these MO codes with `as.mo()`.",
|
||||
call = FALSE)
|
||||
"Please update the MO codes with `as.mo()`.")
|
||||
}
|
||||
print.default(x, quote = FALSE)
|
||||
}
|
||||
@@ -1785,8 +1810,7 @@ summary.mo <- function(object, ...) {
|
||||
as.data.frame.mo <- function(x, ...) {
|
||||
if (!all(x[!is.na(x)] %in% MO_lookup$mo)) {
|
||||
warning_("The data contains old MO codes (from a previous AMR package version). ",
|
||||
"Please update your MO codes with `as.mo()`.",
|
||||
call = FALSE)
|
||||
"Please update your MO codes with `as.mo()`.")
|
||||
}
|
||||
nm <- deparse1(substitute(x))
|
||||
if (!"nm" %in% names(list(...))) {
|
||||
@@ -1882,7 +1906,7 @@ print.mo_uncertainties <- function(x, ...) {
|
||||
if (NROW(x) == 0) {
|
||||
return(NULL)
|
||||
}
|
||||
cat(word_wrap("Matching scores", ifelse(has_colour(), " (in blue)", ""), " are based on human pathogenic prevalence and the resemblance between the input and the full taxonomic name. See `?mo_matching_score`.\n\n", add_fn = font_blue))
|
||||
cat(word_wrap("Matching scores", ifelse(has_colour(), " (in blue)", ""), " are based on pathogenicity in humans and the resemblance between the input and the full taxonomic name. See `?mo_matching_score`.\n\n", add_fn = font_blue))
|
||||
|
||||
txt <- ""
|
||||
for (i in seq_len(nrow(x))) {
|
||||
@@ -2090,24 +2114,22 @@ replace_old_mo_codes <- function(x, property) {
|
||||
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)
|
||||
warning_("in `mo_", property, "()`: 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.")
|
||||
} else {
|
||||
warning_(paste0("The input contained ", n_matched,
|
||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (", n_unique, "from a previous AMR package version). ",
|
||||
n_solved, " old MO code", ifelse(n_solved == 1, "", "s"),
|
||||
ifelse(n_solved == 1, " was", " were"),
|
||||
ifelse(all_direct_matches, " updated ", font_bold(" guessed ")),
|
||||
"to ", ifelse(n_solved == 1, "a ", ""),
|
||||
"currently used MO code", ifelse(n_solved == 1, "", "s"),
|
||||
ifelse(n_unsolved > 0,
|
||||
paste0(" and ", n_unsolved, " old MO code", ifelse(n_unsolved == 1, "", "s"), " could not be updated."),
|
||||
".")),
|
||||
call = FALSE)
|
||||
warning_("in `as.mo()`: the input contained ", n_matched,
|
||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||
" (", n_unique, "from a previous AMR package version). ",
|
||||
n_solved, " old MO code", ifelse(n_solved == 1, "", "s"),
|
||||
ifelse(n_solved == 1, " was", " were"),
|
||||
ifelse(all_direct_matches, " updated ", font_bold(" guessed ")),
|
||||
"to ", ifelse(n_solved == 1, "a ", ""),
|
||||
"currently used MO code", ifelse(n_solved == 1, "", "s"),
|
||||
ifelse(n_unsolved > 0,
|
||||
paste0(" and ", n_unsolved, " old MO code", ifelse(n_unsolved == 1, "", "s"), " could not be updated."),
|
||||
"."))
|
||||
}
|
||||
}
|
||||
x
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
#'
|
||||
#' This algorithm is used by [as.mo()] and all the [`mo_*`][mo_property()] functions to determine the most probable match of taxonomic records based on user input.
|
||||
#' @inheritSection lifecycle Stable Lifecycle
|
||||
#' @author Dr. Matthijs Berends
|
||||
#' @author Dr Matthijs Berends
|
||||
#' @param x Any user input value(s)
|
||||
#' @param n A full taxonomic name, that exists in [`microorganisms$fullname`][microorganisms]
|
||||
#' @section Matching Score for Microorganisms:
|
||||
#' With ambiguous user input in [as.mo()] and all the [`mo_*`][mo_property()] functions, the returned results are chosen based on their matching score using [mo_matching_score()]. This matching score \eqn{m}, is calculated as:
|
||||
#'
|
||||
#' \ifelse{latex}{\deqn{m_{(x, n)} = \frac{l_{n} - 0.5 \cdot \min \begin{cases}l_{n} \\ \textrm{lev}(x, n)\end{cases}}{l_{n} \cdot p_{n} \cdot k_{n}}}}{\ifelse{html}{\figure{mo_matching_score.png}{options: width="300px" alt="mo matching score"}}{m(x, n) = ( l_n * min(l_n, lev(x, n) ) ) / ( l_n * p_n * k_n )}}
|
||||
#' \ifelse{latex}{\deqn{m_{(x, n)} = \frac{l_{n} - 0.5 \cdot \min \begin{cases}l_{n} \\ \textrm{lev}(x, n)\end{cases}}{l_{n} \cdot p_{n} \cdot k_{n}}}}{\ifelse{html}{\figure{mo_matching_score.png}{options: width="300" alt="mo matching score"}}{m(x, n) = ( l_n * min(l_n, lev(x, n) ) ) / ( l_n * p_n * k_n )}}
|
||||
#'
|
||||
#' where:
|
||||
#'
|
||||
@@ -49,6 +49,8 @@
|
||||
#' All characters in \eqn{x} and \eqn{n} are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.
|
||||
#'
|
||||
#' All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., `"E. coli"` will return the microbial ID of *Escherichia coli* (\eqn{m = `r round(mo_matching_score("E. coli", "Escherichia coli"), 3)`}, a highly prevalent microorganism found in humans) and not *Entamoeba coli* (\eqn{m = `r round(mo_matching_score("E. coli", "Entamoeba coli"), 3)`}, a less prevalent microorganism in humans), although the latter would alphabetically come first.
|
||||
#'
|
||||
#' Since `AMR` version 1.8.1, common microorganism abbreviations are ignored in determining the matching score. These abbreviations are currently: `r vector_and(pkg_env$mo_field_abbreviations, quotes = FALSE)`.
|
||||
#' @export
|
||||
#' @inheritSection AMR Reference Data Publicly Available
|
||||
#' @inheritSection AMR Read more on Our Website!
|
||||
@@ -65,9 +67,16 @@ mo_matching_score <- function(x, n) {
|
||||
x <- parse_and_convert(x)
|
||||
# no dots and other non-whitespace characters
|
||||
x <- gsub("[^a-zA-Z0-9 \\(\\)]+", "", x)
|
||||
|
||||
# remove abbreviations known to the field
|
||||
x <- gsub(paste0("(^|[^a-z0-9]+)(",
|
||||
paste0(pkg_env$mo_field_abbreviations, collapse = "|"),
|
||||
")([^a-z0-9]+|$)"),
|
||||
"", x, perl = TRUE, ignore.case = TRUE)
|
||||
|
||||
# only keep one space
|
||||
x <- gsub(" +", " ", x)
|
||||
|
||||
|
||||
# n is always a taxonomically valid full name
|
||||
if (length(n) == 1) {
|
||||
n <- rep(n, length(x))
|
||||
@@ -82,7 +91,7 @@ mo_matching_score <- function(x, n) {
|
||||
l_n.lev <- double(length = length(x))
|
||||
for (i in seq_len(length(x))) {
|
||||
# determine Levenshtein distance, but maximise to nchar of n
|
||||
lev[i] <- utils::adist(x[i], n[i], ignore.case = FALSE, fixed = TRUE)
|
||||
lev[i] <- utils::adist(x[i], n[i], ignore.case = FALSE, fixed = TRUE, costs = c(ins = 1, del = 1, sub = 1))
|
||||
# minimum of (l_n, Levenshtein distance)
|
||||
l_n.lev[i] <- min(l_n[i], as.double(lev[i]))
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ mo_url <- function(x, open = FALSE, language = get_AMR_locale(), ...) {
|
||||
|
||||
if (isTRUE(open)) {
|
||||
if (length(u) > 1) {
|
||||
warning_("Only the first URL will be opened, as `browseURL()` only suports one string.")
|
||||
warning_("in `mo_url()`: only the first URL will be opened, as `browseURL()` only suports one string.")
|
||||
}
|
||||
utils::browseURL(u[1L])
|
||||
}
|
||||
|
||||
2
R/pca.R
2
R/pca.R
@@ -98,7 +98,7 @@ pca <- function(x,
|
||||
|
||||
x <- as.data.frame(new_list, stringsAsFactors = FALSE)
|
||||
if (any(vapply(FUN.VALUE = logical(1), x, function(y) !is.numeric(y)))) {
|
||||
warning_("Be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with [numeric] variables only. See Examples in ?pca.", call = FALSE)
|
||||
warning_("in `pca()`: be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with numeric variables only. See Examples in ?pca.", call = FALSE)
|
||||
}
|
||||
|
||||
# set column names
|
||||
|
||||
@@ -106,7 +106,7 @@ random_exec <- function(type, size, mo = NULL, ab = NULL) {
|
||||
if (nrow(df_new) > 0) {
|
||||
df <- df_new
|
||||
} else {
|
||||
warning_("No rows found that match mo '", mo, "', ignoring argument `mo`", call = FALSE)
|
||||
warning_("in `random_", tolower(type), "()`: no rows found that match mo '", mo, "', ignoring argument `mo`")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ random_exec <- function(type, size, mo = NULL, ab = NULL) {
|
||||
if (nrow(df_new) > 0) {
|
||||
df <- df_new
|
||||
} else {
|
||||
warning_("No rows found that match ab '", ab, "', ignoring argument `ab`", call = FALSE)
|
||||
warning_("in `random_", tolower(type), "()`: no rows found that match ab '", ab, "', ignoring argument `ab`")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ resistance_predict <- function(x,
|
||||
x <- dots[which(dots.names == "tbl")]
|
||||
}
|
||||
if ("I_as_R" %in% dots.names) {
|
||||
warning_("`I_as_R is deprecated - use I_as_S instead.", call = FALSE)
|
||||
warning_("in `resistance_predict()`: I_as_R is deprecated - use I_as_S instead.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
370
R/rsi.R
370
R/rsi.R
@@ -67,7 +67,7 @@
|
||||
#'
|
||||
#' 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)))`).
|
||||
#'
|
||||
#' 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.
|
||||
#' 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 included 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
|
||||
#'
|
||||
@@ -233,9 +233,9 @@ is.rsi.eligible <- function(x, threshold = 0.05) {
|
||||
} else if (!any(c("R", "S", "I") %in% x, na.rm = TRUE) & !all(is.na(x))) {
|
||||
return(FALSE)
|
||||
} else {
|
||||
x <- x[!is.na(x) & !is.null(x) & x != ""]
|
||||
x <- x[!is.na(x) & !is.null(x) & !x %in% c("", "-", "NULL")]
|
||||
if (length(x) == 0) {
|
||||
# no other values than NA or ""
|
||||
# no other values than empty
|
||||
cur_col <- get_current_column()
|
||||
if (!is.null(cur_col)) {
|
||||
ab <- suppressWarnings(as.ab(cur_col, fast_mode = TRUE, info = FALSE))
|
||||
@@ -257,7 +257,7 @@ is.rsi.eligible <- function(x, threshold = 0.05) {
|
||||
}
|
||||
|
||||
#' @export
|
||||
# extra param: warn (never throw warning)
|
||||
# extra param: warn (logical, to never throw a warning)
|
||||
as.rsi.default <- function(x, ...) {
|
||||
if (is.rsi(x)) {
|
||||
return(x)
|
||||
@@ -278,22 +278,23 @@ as.rsi.default <- function(x, ...) {
|
||||
x[x.bak == 2] <- "I"
|
||||
x[x.bak == 3] <- "R"
|
||||
}
|
||||
|
||||
|
||||
} else if (!all(is.na(x)) && !identical(levels(x), c("R", "S", "I")) && !all(x %in% c("R", "S", "I", NA))) {
|
||||
|
||||
|
||||
if (all(x %unlike% "(R|S|I)", na.rm = TRUE)) {
|
||||
# check if they are actually MICs or disks
|
||||
if (all_valid_mics(x)) {
|
||||
warning_("The input seems to contain MIC values. You can transform them with `as.mic()` before running `as.rsi()` to interpret them.", call = FALSE)
|
||||
warning_("in `as.rsi()`: the input seems to contain MIC values. You can transform them with `as.mic()` before running `as.rsi()` to interpret them.")
|
||||
} else if (all_valid_disks(x)) {
|
||||
warning_("The input seems to contain disk diffusion values. You can transform them with `as.disk()` before running `as.rsi()` to interpret them.", call = FALSE)
|
||||
warning_("in `as.rsi()`: the input seems to contain disk diffusion values. You can transform them with `as.disk()` before running `as.rsi()` to interpret them.")
|
||||
}
|
||||
}
|
||||
|
||||
# trim leading and trailing spaces, new lines, etc.
|
||||
x <- trimws2(as.character(unlist(x)))
|
||||
x[x %in% c(NA, "", "-", "NULL")] <- NA_character_
|
||||
x.bak <- x
|
||||
na_before <- length(x[is.na(x) | x == ""])
|
||||
na_before <- length(x[is.na(x)])
|
||||
|
||||
# correct for translations
|
||||
trans_R <- unlist(TRANSLATIONS[which(TRANSLATIONS$pattern == "Resistant"),
|
||||
@@ -310,11 +311,15 @@ as.rsi.default <- function(x, ...) {
|
||||
x[x %like% "([^a-z]|^)sus(cep(tible)?)?"] <- "S"
|
||||
x[x %like% "([^a-z]|^)int(er(mediate)?)?|incr.*exp"] <- "I"
|
||||
# remove other invalid characters
|
||||
x <- gsub("[^rsiRSIHi]+", "", x, perl = TRUE)
|
||||
# some labs now report "H" instead of "I" to not interfere with EUCAST prior to 2019
|
||||
x <- gsub("H", "I", x, ignore.case = TRUE)
|
||||
# set to capitals
|
||||
x <- toupper(x)
|
||||
x <- gsub("[^RSIHDU]+", "", x, perl = TRUE)
|
||||
# some labs now report "H" instead of "I" to not interfere with EUCAST prior to 2019
|
||||
x <- gsub("^H$", "I", x, perl = TRUE)
|
||||
# and MIPS uses D for Dose-dependent (which is I, but it will throw a note)
|
||||
x <- gsub("^D$", "I", x, perl = TRUE)
|
||||
# and MIPS uses U for "susceptible urine"
|
||||
x <- gsub("^U$", "S", x, perl = TRUE)
|
||||
# in cases of "S;S" keep S, but in case of "S;I" make it NA
|
||||
x <- gsub("^S+$", "S", x)
|
||||
x <- gsub("^I+$", "I", x)
|
||||
@@ -328,11 +333,20 @@ as.rsi.default <- function(x, ...) {
|
||||
unique() %pm>%
|
||||
sort() %pm>%
|
||||
vector_and(quotes = TRUE)
|
||||
warning_(na_after - na_before, " results truncated (",
|
||||
warning_("in `as.rsi()`: ", na_after - na_before, " results truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid antimicrobial interpretations: ",
|
||||
list_missing, call = FALSE)
|
||||
}
|
||||
if (any(toupper(x.bak[!is.na(x.bak)]) == "U") && message_not_thrown_before("as.rsi", "U")) {
|
||||
warning_("in `as.rsi()`: 'U' was interpreted as 'S', following some laboratory systems")
|
||||
}
|
||||
if (any(toupper(x.bak[!is.na(x.bak)]) == "D") && message_not_thrown_before("as.rsi", "D")) {
|
||||
warning_("in `as.rsi()`: 'D' (dose-dependent) was interpreted as 'I', following some laboratory systems")
|
||||
}
|
||||
if (any(toupper(x.bak[!is.na(x.bak)]) == "H") && message_not_thrown_before("as.rsi", "H")) {
|
||||
warning_("in `as.rsi()`: 'H' was interpreted as 'I', following some laboratory systems")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,89 +365,17 @@ as.rsi.mic <- function(x,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::rsi_translation,
|
||||
...) {
|
||||
meet_criteria(x)
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"))
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
meet_criteria(uti, allow_class = "logical", has_length = c(1, length(x)))
|
||||
meet_criteria(conserve_capped_values, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(reference_data, allow_class = "data.frame")
|
||||
check_reference_data(reference_data)
|
||||
|
||||
# for dplyr's across()
|
||||
cur_column_dplyr <- import_fn("cur_column", "dplyr", error_on_fail = FALSE)
|
||||
if (!is.null(cur_column_dplyr) && tryCatch(is.data.frame(get_current_data("ab", call = 0)), error = function(e) FALSE)) {
|
||||
# try to get current column, which will only be available when in across()
|
||||
ab <- tryCatch(cur_column_dplyr(),
|
||||
error = function(e) ab)
|
||||
}
|
||||
|
||||
# for auto-determining mo
|
||||
mo_var_found <- ""
|
||||
if (is.null(mo)) {
|
||||
tryCatch({
|
||||
df <- get_current_data(arg_name = "mo", call = -3) # will return an error if not found
|
||||
mo <- NULL
|
||||
try({
|
||||
mo <- suppressMessages(search_type_in_df(df, "mo"))
|
||||
}, silent = TRUE)
|
||||
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
|
||||
mo_var_found <- paste0(" based on column '", font_bold(mo), "'")
|
||||
mo <- df[, mo, drop = TRUE]
|
||||
}
|
||||
}, error = function(e)
|
||||
stop_('No information was supplied about the microorganisms (missing argument `mo`). See ?as.rsi.\n\n',
|
||||
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
|
||||
"To tranform all disk diffusion zones in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.disk, as.rsi).", call = FALSE)
|
||||
)
|
||||
}
|
||||
if (length(ab) == 1 && ab %like% "as.mic") {
|
||||
stop_('No unambiguous name was supplied about the antibiotic (argument `ab`). See ?as.rsi.', call = FALSE)
|
||||
}
|
||||
|
||||
ab_coerced <- suppressWarnings(as.ab(ab))
|
||||
mo_coerced <- suppressWarnings(as.mo(mo))
|
||||
guideline_coerced <- get_guideline(guideline, reference_data)
|
||||
if (is.na(ab_coerced)) {
|
||||
message_("Returning NAs for unknown drug: '", font_bold(ab),
|
||||
"'. Rename this column to a drug name or code, and check the output with `as.ab()`.",
|
||||
add_fn = font_red,
|
||||
as_note = FALSE)
|
||||
return(as.rsi(rep(NA, length(x))))
|
||||
}
|
||||
if (length(mo_coerced) == 1) {
|
||||
mo_coerced <- rep(mo_coerced, length(x))
|
||||
}
|
||||
if (length(uti) == 1) {
|
||||
uti <- rep(uti, length(x))
|
||||
}
|
||||
|
||||
agent_formatted <- paste0("'", font_bold(ab), "'")
|
||||
agent_name <- ab_name(ab_coerced, tolower = TRUE, language = NULL)
|
||||
if (generalise_antibiotic_name(ab) != generalise_antibiotic_name(agent_name)) {
|
||||
agent_formatted <- paste0(agent_formatted, " (", ab_coerced, ", ", agent_name, ")")
|
||||
}
|
||||
message_("=> Interpreting MIC values of ", ifelse(isTRUE(list(...)$is_data.frame), "column ", ""),
|
||||
agent_formatted,
|
||||
mo_var_found,
|
||||
" according to ", ifelse(identical(reference_data, AMR::rsi_translation),
|
||||
font_bold(guideline_coerced),
|
||||
"manually defined 'reference_data'"),
|
||||
"... ",
|
||||
appendLF = FALSE,
|
||||
as_note = FALSE)
|
||||
|
||||
result <- exec_as.rsi(method = "mic",
|
||||
x = x,
|
||||
mo = mo_coerced,
|
||||
ab = ab_coerced,
|
||||
guideline = guideline_coerced,
|
||||
uti = uti,
|
||||
conserve_capped_values = conserve_capped_values,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data) # exec_as.rsi will return message 'OK'
|
||||
result
|
||||
as_rsi_method(method_short = "mic",
|
||||
method_long = "MIC values",
|
||||
x = x,
|
||||
mo = mo,
|
||||
ab = ab,
|
||||
guideline = guideline,
|
||||
uti = uti,
|
||||
conserve_capped_values = conserve_capped_values,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
...)
|
||||
}
|
||||
|
||||
#' @rdname as.rsi
|
||||
@@ -446,88 +388,17 @@ as.rsi.disk <- function(x,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::rsi_translation,
|
||||
...) {
|
||||
meet_criteria(x)
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"))
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
meet_criteria(uti, allow_class = "logical", has_length = c(1, length(x)))
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(reference_data, allow_class = "data.frame")
|
||||
check_reference_data(reference_data)
|
||||
|
||||
# for dplyr's across()
|
||||
cur_column_dplyr <- import_fn("cur_column", "dplyr", error_on_fail = FALSE)
|
||||
if (!is.null(cur_column_dplyr) && tryCatch(is.data.frame(get_current_data("ab", call = 0)), error = function(e) FALSE)) {
|
||||
# try to get current column, which will only be available when in across()
|
||||
ab <- tryCatch(cur_column_dplyr(),
|
||||
error = function(e) ab)
|
||||
}
|
||||
|
||||
# for auto-determining mo
|
||||
mo_var_found <- ""
|
||||
if (is.null(mo)) {
|
||||
tryCatch({
|
||||
df <- get_current_data(arg_name = "mo", call = -3) # will return an error if not found
|
||||
mo <- NULL
|
||||
try({
|
||||
mo <- suppressMessages(search_type_in_df(df, "mo"))
|
||||
}, silent = TRUE)
|
||||
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
|
||||
mo_var_found <- paste0(" based on column '", font_bold(mo), "'")
|
||||
mo <- df[, mo, drop = TRUE]
|
||||
}
|
||||
}, error = function(e)
|
||||
stop_('No information was supplied about the microorganisms (missing argument `mo`). See ?as.rsi.\n\n',
|
||||
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
|
||||
"To tranform all disk diffusion zones in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.disk, as.rsi).", call = FALSE)
|
||||
)
|
||||
}
|
||||
if (length(ab) == 1 && ab %like% "as.disk") {
|
||||
stop_('No unambiguous name was supplied about the antibiotic (argument `ab`). See ?as.rsi.', call = FALSE)
|
||||
}
|
||||
|
||||
ab_coerced <- suppressWarnings(as.ab(ab))
|
||||
mo_coerced <- suppressWarnings(as.mo(mo))
|
||||
guideline_coerced <- get_guideline(guideline, reference_data)
|
||||
if (is.na(ab_coerced)) {
|
||||
message_("Returning NAs for unknown drug: '", font_bold(ab),
|
||||
"'. Rename this column to a drug name or code, and check the output with `as.ab()`.",
|
||||
add_fn = font_red,
|
||||
as_note = FALSE)
|
||||
return(as.rsi(rep(NA, length(x))))
|
||||
}
|
||||
if (length(mo_coerced) == 1) {
|
||||
mo_coerced <- rep(mo_coerced, length(x))
|
||||
}
|
||||
if (length(uti) == 1) {
|
||||
uti <- rep(uti, length(x))
|
||||
}
|
||||
|
||||
agent_formatted <- paste0("'", font_bold(ab), "'")
|
||||
agent_name <- ab_name(ab_coerced, tolower = TRUE, language = NULL)
|
||||
if (generalise_antibiotic_name(ab) != generalise_antibiotic_name(agent_name)) {
|
||||
agent_formatted <- paste0(agent_formatted, " (", ab_coerced, ", ", agent_name, ")")
|
||||
}
|
||||
message_("=> Interpreting disk zones of ", ifelse(isTRUE(list(...)$is_data.frame), "column ", ""),
|
||||
agent_formatted,
|
||||
mo_var_found,
|
||||
" according to ", ifelse(identical(reference_data, AMR::rsi_translation),
|
||||
font_bold(guideline_coerced),
|
||||
"manually defined 'reference_data'"),
|
||||
"... ",
|
||||
appendLF = FALSE,
|
||||
as_note = FALSE)
|
||||
|
||||
result <- exec_as.rsi(method = "disk",
|
||||
x = x,
|
||||
mo = mo_coerced,
|
||||
ab = ab_coerced,
|
||||
guideline = guideline_coerced,
|
||||
uti = uti,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data) # exec_as.rsi will return message 'OK'
|
||||
result
|
||||
as_rsi_method(method_short = "disk",
|
||||
method_long = "disk diffusion zones",
|
||||
x = x,
|
||||
mo = mo,
|
||||
ab = ab,
|
||||
guideline = guideline,
|
||||
uti = uti,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
...)
|
||||
}
|
||||
|
||||
#' @rdname as.rsi
|
||||
@@ -547,7 +418,7 @@ as.rsi.data.frame <- function(x,
|
||||
meet_criteria(conserve_capped_values, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(reference_data, allow_class = "data.frame")
|
||||
|
||||
|
||||
x.bak <- x
|
||||
for (i in seq_len(ncol(x))) {
|
||||
# don't keep factors, overwriting them is hard
|
||||
@@ -561,7 +432,7 @@ as.rsi.data.frame <- function(x,
|
||||
if (is.null(col_mo)) {
|
||||
col_mo <- search_type_in_df(x = x, type = "mo", info = FALSE)
|
||||
}
|
||||
|
||||
|
||||
# -- UTIs
|
||||
col_uti <- uti
|
||||
if (is.null(col_uti)) {
|
||||
@@ -602,7 +473,7 @@ as.rsi.data.frame <- function(x,
|
||||
uti <- FALSE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
i <- 0
|
||||
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
||||
sel <- colnames(pm_select(x, ...))
|
||||
@@ -612,7 +483,7 @@ as.rsi.data.frame <- function(x,
|
||||
if (!is.null(col_mo)) {
|
||||
sel <- sel[sel != col_mo]
|
||||
}
|
||||
|
||||
|
||||
ab_cols <- colnames(x)[vapply(FUN.VALUE = logical(1), x, function(y) {
|
||||
i <<- i + 1
|
||||
check <- is.mic(y) | is.disk(y)
|
||||
@@ -635,7 +506,7 @@ as.rsi.data.frame <- function(x,
|
||||
return(FALSE)
|
||||
}
|
||||
})]
|
||||
|
||||
|
||||
stop_if(length(ab_cols) == 0,
|
||||
"no columns with MIC values, disk zones or antibiotic column names found in this data set. Use as.mic() or as.disk() to transform antimicrobial columns.")
|
||||
# set type per column
|
||||
@@ -654,7 +525,7 @@ as.rsi.data.frame <- function(x,
|
||||
}
|
||||
x_mo <- as.mo(x[, col_mo, drop = TRUE])
|
||||
}
|
||||
|
||||
|
||||
for (i in seq_len(length(ab_cols))) {
|
||||
if (types[i] == "mic") {
|
||||
x[, ab_cols[i]] <- as.rsi(x = x %pm>%
|
||||
@@ -732,6 +603,106 @@ get_guideline <- function(guideline, reference_data) {
|
||||
guideline_param
|
||||
}
|
||||
|
||||
as_rsi_method <- function(method_short = "mic",
|
||||
method_long = "MIC values",
|
||||
x = x,
|
||||
mo = NULL,
|
||||
ab = deparse(substitute(x)),
|
||||
guideline = "EUCAST",
|
||||
uti = FALSE,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::rsi_translation,
|
||||
...) {
|
||||
meet_criteria(x)
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"))
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
meet_criteria(uti, allow_class = "logical", has_length = c(1, length(x)))
|
||||
meet_criteria(conserve_capped_values, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(reference_data, allow_class = "data.frame")
|
||||
check_reference_data(reference_data)
|
||||
|
||||
# for dplyr's across()
|
||||
cur_column_dplyr <- import_fn("cur_column", "dplyr", error_on_fail = FALSE)
|
||||
if (!is.null(cur_column_dplyr) && tryCatch(is.data.frame(get_current_data("ab", call = 0)), error = function(e) FALSE)) {
|
||||
# try to get current column, which will only be available when in across()
|
||||
ab <- tryCatch(cur_column_dplyr(),
|
||||
error = function(e) ab)
|
||||
}
|
||||
|
||||
# for auto-determining mo
|
||||
mo_var_found <- ""
|
||||
if (is.null(mo)) {
|
||||
tryCatch({
|
||||
df <- get_current_data(arg_name = "mo", call = -3) # will return an error if not found
|
||||
mo <- NULL
|
||||
try({
|
||||
mo <- suppressMessages(search_type_in_df(df, "mo"))
|
||||
}, silent = TRUE)
|
||||
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
|
||||
mo_var_found <- paste0(" based on column '", font_bold(mo), "'")
|
||||
mo <- df[, mo, drop = TRUE]
|
||||
}
|
||||
}, error = function(e) {
|
||||
mo <- NULL
|
||||
})
|
||||
}
|
||||
if (is.null(mo)) {
|
||||
stop_("No information was supplied about the microorganisms (missing argument `mo` and no column of class <mo> found). See ?as.rsi.\n\n",
|
||||
"To transform certain columns with e.g. mutate(), use `data %>% mutate(across(..., as.rsi, mo = x))`, where x is your column with microorganisms.\n",
|
||||
"To tranform all ", method_long, " in a data set, use `data %>% as.rsi()` or `data %>% mutate(across(where(is.", method_short, "), as.rsi))`.", call = FALSE)
|
||||
}
|
||||
|
||||
if (length(ab) == 1 && ab %like% paste0("as.", method_short)) {
|
||||
stop_('No unambiguous name was supplied about the antibiotic (argument `ab`). See ?as.rsi.', call = FALSE)
|
||||
}
|
||||
|
||||
ab_coerced <- suppressWarnings(as.ab(ab))
|
||||
mo_coerced <- suppressWarnings(as.mo(mo))
|
||||
guideline_coerced <- get_guideline(guideline, reference_data)
|
||||
if (is.na(ab_coerced)) {
|
||||
message_("Returning NAs for unknown drug: '", font_bold(ab),
|
||||
"'. Rename this column to a drug name or code, and check the output with `as.ab()`.",
|
||||
add_fn = font_red,
|
||||
as_note = FALSE)
|
||||
return(as.rsi(rep(NA, length(x))))
|
||||
}
|
||||
if (length(mo_coerced) == 1) {
|
||||
mo_coerced <- rep(mo_coerced, length(x))
|
||||
}
|
||||
if (length(uti) == 1) {
|
||||
uti <- rep(uti, length(x))
|
||||
}
|
||||
|
||||
agent_formatted <- paste0("'", font_bold(ab), "'")
|
||||
agent_name <- ab_name(ab_coerced, tolower = TRUE, language = NULL)
|
||||
if (generalise_antibiotic_name(ab) != generalise_antibiotic_name(agent_name)) {
|
||||
agent_formatted <- paste0(agent_formatted, " (", ab_coerced, ", ", agent_name, ")")
|
||||
}
|
||||
message_("=> Interpreting ", method_long, " of ", ifelse(isTRUE(list(...)$is_data.frame), "column ", ""),
|
||||
agent_formatted,
|
||||
mo_var_found,
|
||||
" according to ", ifelse(identical(reference_data, AMR::rsi_translation),
|
||||
font_bold(guideline_coerced),
|
||||
"manually defined 'reference_data'"),
|
||||
"... ",
|
||||
appendLF = FALSE,
|
||||
as_note = FALSE)
|
||||
|
||||
result <- exec_as.rsi(method = method_short,
|
||||
x = x,
|
||||
mo = mo_coerced,
|
||||
ab = ab_coerced,
|
||||
guideline = guideline_coerced,
|
||||
uti = uti,
|
||||
conserve_capped_values = conserve_capped_values,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data) # exec_as.rsi will return message 'OK'
|
||||
result
|
||||
}
|
||||
|
||||
exec_as.rsi <- function(method,
|
||||
x,
|
||||
mo,
|
||||
@@ -754,7 +725,7 @@ exec_as.rsi <- function(method,
|
||||
x <- as.disk(x) # when as.rsi.disk is called directly
|
||||
}
|
||||
|
||||
warned <- FALSE
|
||||
rise_warning <- FALSE
|
||||
method_param <- toupper(method)
|
||||
|
||||
genera <- mo_genus(mo, language = NULL)
|
||||
@@ -799,13 +770,6 @@ exec_as.rsi <- function(method,
|
||||
lookup_lancefield <- paste(mo_lancefield, ab)
|
||||
lookup_other <- paste(mo_other, ab)
|
||||
|
||||
if (length(unique(paste(trans$mo, trans$ab))) == length(unique(paste(trans$mo, trans$ab, trans$uti))) &&
|
||||
any(trans$uti == TRUE, na.rm = TRUE) && all(uti == FALSE)) {
|
||||
message_("WARNING.", add_fn = list(font_yellow, font_bold), as_note = FALSE)
|
||||
warning_("Introducing NA: interpretation of ", font_bold(ab_name(ab, tolower = TRUE)), " for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI). Use argument `uti` to set which isolates are from urine. See ?as.rsi.", call = FALSE)
|
||||
warned <- TRUE
|
||||
}
|
||||
|
||||
any_is_intrinsic_resistant <- FALSE
|
||||
|
||||
for (i in seq_len(length(x))) {
|
||||
@@ -815,7 +779,7 @@ exec_as.rsi <- function(method,
|
||||
if (isTRUE(add_intrinsic_resistance) & is_intrinsic_r) {
|
||||
if (guideline_coerced %unlike% "EUCAST") {
|
||||
if (message_not_thrown_before("as.rsi", "msg2")) {
|
||||
warning_("Using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.", call = FALSE)
|
||||
warning_("in `as.rsi()`: using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.")
|
||||
}
|
||||
} else {
|
||||
new_rsi[i] <- "R"
|
||||
@@ -824,7 +788,7 @@ exec_as.rsi <- function(method,
|
||||
}
|
||||
|
||||
get_record <- trans %pm>%
|
||||
# no subsetting to UTI for now
|
||||
# no subsetting to UTI here
|
||||
subset(lookup %in% c(lookup_mo[i],
|
||||
lookup_genus[i],
|
||||
lookup_family[i],
|
||||
@@ -833,6 +797,11 @@ exec_as.rsi <- function(method,
|
||||
lookup_lancefield[i],
|
||||
lookup_other[i]))
|
||||
|
||||
if (any(get_record$uti == TRUE, na.rm = TRUE) && message_not_thrown_before("as.rsi", "msg3", ab)) {
|
||||
warning_("in `as.rsi()`: interpretation of ", font_bold(ab_name(ab, tolower = TRUE)), " is only available for (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use argument `uti` to set which isolates are from urine. See ?as.rsi.")
|
||||
rise_warning <- TRUE
|
||||
}
|
||||
|
||||
if (isTRUE(uti[i])) {
|
||||
get_record <- get_record %pm>%
|
||||
# be as specific as possible (i.e. prefer species over genus):
|
||||
@@ -843,7 +812,7 @@ exec_as.rsi <- function(method,
|
||||
pm_filter(uti == FALSE) %pm>% # 'uti' is a column in rsi_translation
|
||||
pm_arrange(rank_index)
|
||||
}
|
||||
|
||||
|
||||
get_record <- get_record[1L, , drop = FALSE]
|
||||
|
||||
if (NROW(get_record) > 0) {
|
||||
@@ -872,11 +841,10 @@ exec_as.rsi <- function(method,
|
||||
|
||||
if (any_is_intrinsic_resistant & guideline_coerced %like% "EUCAST" & !isTRUE(add_intrinsic_resistance)) {
|
||||
# found some intrinsic resistance, but was not applied
|
||||
message_("WARNING.", add_fn = list(font_yellow, font_bold), as_note = FALSE)
|
||||
if (message_not_thrown_before("as.rsi", "msg3")) {
|
||||
warning_("Found intrinsic resistance in some bug/drug combinations, although it was not applied.\nUse `as.rsi(..., add_intrinsic_resistance = TRUE)` to apply it.", call = FALSE)
|
||||
if (message_not_thrown_before("as.rsi", "msg4")) {
|
||||
warning_("in `as.rsi()`: found intrinsic resistance in some bug/drug combinations, although it was not applied.\nUse `as.rsi(..., add_intrinsic_resistance = TRUE)` to apply it.")
|
||||
}
|
||||
warned <- TRUE
|
||||
rise_warning <- TRUE
|
||||
}
|
||||
|
||||
new_rsi <- x_bak %pm>%
|
||||
@@ -885,7 +853,9 @@ exec_as.rsi <- function(method,
|
||||
by = "x_mo") %pm>%
|
||||
pm_pull(new_rsi)
|
||||
|
||||
if (warned == FALSE) {
|
||||
if (isTRUE(rise_warning)) {
|
||||
message_("WARNING.", add_fn = list(font_yellow, font_bold), as_note = FALSE)
|
||||
} else {
|
||||
message_(" OK.", add_fn = list(font_green, font_bold), as_note = FALSE)
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ rsi_calc <- function(...,
|
||||
}
|
||||
|
||||
if (is.null(x)) {
|
||||
warning_("argument is NULL (check if columns exist): returning NA", call = FALSE)
|
||||
warning_("argument is NULL (check if columns exist): returning NA")
|
||||
if (as_percent == TRUE) {
|
||||
return(NA_character_)
|
||||
} else {
|
||||
|
||||
@@ -193,7 +193,7 @@ translate_AMR <- function(from,
|
||||
any_form_in_patterns <- tryCatch(
|
||||
any(from_unique %like% paste0("(", paste(gsub(" +\\(.*", "", df_trans$pattern), collapse = "|"), ")")),
|
||||
error = function(e) {
|
||||
warning_("Translation not possible. Please open an issue on GitHub (https://github.com/msberends/AMR/issues).", call = FALSE)
|
||||
warning_("Translation not possible. Please open an issue on GitHub (https://github.com/msberends/AMR/issues).")
|
||||
return(FALSE)
|
||||
})
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#'
|
||||
#' All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology.
|
||||
#' @section WHOCC:
|
||||
#' \if{html}{\figure{logo_who.png}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
#' \if{html}{\figure{logo_who.png}{options: height="60" style=margin-bottom:"5"} \cr}
|
||||
#' This package contains **all ~550 antibiotic, antimycotic and antiviral drugs** and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <https://www.whocc.no>) and the Pharmaceuticals Community Register of the European Commission (<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>).
|
||||
#'
|
||||
#' These have become the gold standard for international drug utilisation monitoring and research.
|
||||
|
||||
5
R/zzz.R
5
R/zzz.R
@@ -26,6 +26,11 @@
|
||||
# set up package environment, used by numerous AMR functions
|
||||
pkg_env <- new.env(hash = FALSE)
|
||||
pkg_env$mo_failed <- character(0)
|
||||
pkg_env$mo_field_abbreviations <- c("AIEC", "ATEC", "BORSA", "CRSM", "DAEC", "EAEC",
|
||||
"EHEC", "EIEC", "EPEC", "ETEC", "GISA", "MRPA",
|
||||
"MRSA", "MRSE", "MSSA", "MSSE", "NMEC", "PISP",
|
||||
"PRSP", "STEC", "UPEC", "VISA", "VISP", "VRE",
|
||||
"VRSA", "VRSP")
|
||||
|
||||
# determine info icon for messages
|
||||
utf8_supported <- isTRUE(base::l10n_info()$`UTF-8`)
|
||||
|
||||
Binary file not shown.
@@ -26,8 +26,8 @@
|
||||
# Reproduction of the `microorganisms` data set
|
||||
|
||||
# Data retrieved from the Catalogue of Life (CoL):
|
||||
# https://download.catalogueoflife.org/col/monthly/life/
|
||||
# (download latest dwca, such as https://download.catalogueoflife.org/col/monthly/2020-12-01_dwca.zip)
|
||||
# https://download.catalogueoflife.org/col/monthly/
|
||||
# (download latest dwca, such as https://download.catalogueoflife.org/col/monthly/2022-01-14_dwca.zip)
|
||||
# Data retrieved from the Global Biodiversity Information Facility (GBIF):
|
||||
# https://doi.org/10.15468/rffz4x
|
||||
#
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -210,7 +210,7 @@ Content not found. Please use links in the navbar.
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -420,7 +420,7 @@ END OF TERMS AND CONDITIONS
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>Data sets for download / own use</h1>
|
||||
|
||||
<h4 data-toc-skip class="date">23 December 2021</h4>
|
||||
<h4 data-toc-skip class="date">03 March 2022</h4>
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
|
||||
<div class="hidden name"><code>datasets.Rmd</code></div>
|
||||
@@ -1321,7 +1321,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
|
||||
// v0.0.1
|
||||
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const codeList = document.getElementsByClassName("sourceCode");
|
||||
for (var i = 0; i < codeList.length; i++) {
|
||||
var linkList = codeList[i].getElementsByTagName('a');
|
||||
for (var j = 0; j < linkList.length; j++) {
|
||||
if (linkList[j].innerHTML === "") {
|
||||
linkList[j].setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Anthony Underwood</strong>. Contributor. <a href="https://orcid.org/0000-0002-8547-427" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a>
|
||||
<p><strong>Anthony Underwood</strong>. Contributor. <a href="https://orcid.org/0000-0002-8547-4277" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a>
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
@@ -273,7 +273,7 @@ Antimicrobial Resistance Data. Journal of Statistical Software (accepted for pub
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
</h5>
|
||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="co"># AMR works great with dplyr, but it's not required or neccesary</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR">AMR</a></span><span class="op">)</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -340,7 +340,7 @@
|
||||
</h4>
|
||||
<p>The development of this package is part of, related to, or made possible by:</p>
|
||||
<div align="center">
|
||||
<p><a href="https://www.rug.nl" title="University of Groningen" class="external-link"><img src="./logo_rug.png" class="partner_logo"></a> <a href="https://www.umcg.nl" title="University Medical Center Groningen" class="external-link"><img src="./logo_umcg.png" class="partner_logo"></a> <a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice Foundation" class="external-link"><img src="./logo_certe.png" class="partner_logo"></a> <a href="http://www.eurhealth-1health.eu" title="EurHealth-1-Health" class="external-link"><img src="./logo_eh1h.png" class="partner_logo"></a> <a href="https://www.deutschland-nederland.eu" title="INTERREG" class="external-link"><img src="./logo_interreg.png" class="partner_logo"></a></p>
|
||||
<p><a href="https://www.rug.nl" title="University of Groningen" class="external-link"><img src="./logo_rug.png" class="partner_logo"></a> <a href="https://www.umcg.nl" title="University Medical Center Groningen" class="external-link"><img src="./logo_umcg.png" class="partner_logo"></a> <a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice Foundation" class="external-link"><img src="./logo_certe.png" class="partner_logo"></a> <a href="https://www.deutschland-nederland.eu" title="EurHealth-1-Health" class="external-link"><img src="./logo_eh1h.png" class="partner_logo"></a> <a href="https://www.deutschland-nederland.eu" title="INTERREG" class="external-link"><img src="./logo_interreg.png" class="partner_logo"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -561,7 +561,7 @@
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -156,10 +156,36 @@
|
||||
<small>Source: <a href="https://github.com/msberends/AMR/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 class="page-header" data-toc-text="1.8.0.9004" id="amr-1809004">
|
||||
<code>AMR</code> 1.8.0.9004<a class="anchor" aria-label="anchor" href="#amr-1809004"></a></h2>
|
||||
<div class="section level3">
|
||||
<h3 id="last-updated-march-1-8-0-9004"><small>Last updated: 3 March 2022</small><a class="anchor" aria-label="anchor" href="#last-updated-march-1-8-0-9004"></a></h3>
|
||||
<p>All functions in this package are considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months.</p>
|
||||
<div class="section level4">
|
||||
<h4 id="changed-1-8-0-9004">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-0-9004"></a></h4>
|
||||
<ul><li><p>Support for antibiotic interpretations of the MIPS laboratory system: <code>"U"</code> for S (‘susceptible urine’), <code>"D"</code> for I (‘susceptible dose-dependent’)</p></li>
|
||||
<li>
|
||||
<p>Improved algorithm of <code><a href="../reference/as.mo.html">as.mo()</a></code>, especially for ignoring non-taxonomic text, such as:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="st">"methicillin-resistant S. aureus (MRSA)"</span><span class="op">)</span>
|
||||
<span class="co">#> [1] "Staphylococcus aureus"</span></code></pre></div>
|
||||
</li>
|
||||
<li><p>More informative warning messages</p></li>
|
||||
<li><p>Added 192 as valid MIC</p></li>
|
||||
<li><p>Updated MIC printing in tibbles</p></li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="other-1-8-0-9004">Other<a class="anchor" aria-label="anchor" href="#other-1-8-0-9004"></a></h4>
|
||||
<ul><li>Fix for unit testing on R 3.3</li>
|
||||
<li>Fix for size of some image elements, as requested by CRAN</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 class="page-header" data-toc-text="1.8.0" id="amr-180">
|
||||
<code>AMR</code> 1.8.0<a class="anchor" aria-label="anchor" href="#amr-180"></a></h2>
|
||||
<p>All functions in this package are now all considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months from now on.</p>
|
||||
<code>AMR</code> 1.8.0<small>2022-01-07</small><a class="anchor" aria-label="anchor" href="#amr-180"></a></h2>
|
||||
<div class="section level4">
|
||||
<h4 id="breaking-changes-1-8-0">Breaking changes<a class="anchor" aria-label="anchor" href="#breaking-changes-1-8-0"></a></h4>
|
||||
<ul><li>Removed <code>p_symbol()</code> and all <code>filter_*()</code> functions (except for <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>), which were all deprecated in a previous package version</li>
|
||||
@@ -175,7 +201,7 @@
|
||||
<li><p>Support for all antimicrobial drug (group) names and colloquial microorganism names in Danish, Dutch, English, French, German, Italian, Portuguese, Russian, Spanish and Swedish</p></li>
|
||||
<li>
|
||||
<p>Function <code><a href="../reference/ab_property.html">set_ab_names()</a></code> to rename data set columns that resemble antimicrobial drugs. This allows for quickly renaming columns to official names, ATC codes, etc. Its second argument can be a tidyverse way of selecting:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="../reference/ab_property.html">set_ab_names</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.rsi</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="../reference/ab_property.html">set_ab_names</a></span><span class="op">(</span><span class="va">AMC</span><span class="op">:</span><span class="va">GEN</span>, property <span class="op">=</span> <span class="st">"atc"</span><span class="op">)</span></code></pre></div>
|
||||
@@ -201,14 +227,14 @@
|
||||
<li><p>Added more selectors for antibiotic classes: <code><a href="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code></p></li>
|
||||
<li>
|
||||
<p>Added specific selectors for certain types for treatment: <code><a href="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">administrable_iv()</a></code>, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">example_isolates</span><span class="op">[</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span> <span class="op">&</span> <span class="fu"><a href="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><span class="op">(</span><span class="op">)</span><span class="op">]</span> <span class="co"># base R</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span> <span class="op">&</span> <span class="fu"><a href="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="co"># dplyr</span></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the selector <code><a href="../reference/antibiotic_class_selectors.html">ab_selector()</a></code>, which accepts a filter to be used internally on the <code>antibiotics</code> data set, yielding great flexibility on drug properties, such as selecting antibiotic columns with an oral DDD of at least 1 gram:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">example_isolates</span><span class="op">[</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">ab_selector</a></span><span class="op">(</span><span class="va">oral_ddd</span> <span class="op">></span> <span class="fl">1</span> <span class="op">&</span> <span class="va">oral_units</span> <span class="op">==</span> <span class="st">"g"</span><span class="op">)</span><span class="op">]</span> <span class="co"># base R</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">ab_selector</a></span><span class="op">(</span><span class="va">oral_ddd</span> <span class="op">></span> <span class="fl">1</span> <span class="op">&</span> <span class="va">oral_units</span> <span class="op">==</span> <span class="st">"g"</span><span class="op">)</span><span class="op">)</span> <span class="co"># dplyr</span></code></pre></div>
|
||||
@@ -244,7 +270,7 @@
|
||||
</li>
|
||||
<li>Improved plot legends for MICs and disk diffusion values</li>
|
||||
<li>Improved speed of <code><a href="../reference/as.ab.html">as.ab()</a></code> and all <code>ab_*()</code> functions</li>
|
||||
<li>Added <code><a href="https://ggplot2.tidyverse.org/reference/fortify.html" class="external-link">fortify()</a></code> extensions for plotting methods</li>
|
||||
<li>Added <code>fortify()</code> extensions for plotting methods</li>
|
||||
<li>
|
||||
<code>NA</code> values of the classes <code><mic></code>, <code><disk></code> and <code><rsi></code> are now exported objects of this package, e.g. <code>NA_mic_</code> is an <code>NA</code> of class <code>mic</code> (just like the base R <code>NA_character_</code> is an <code>NA</code> of class <code>character</code>)</li>
|
||||
<li>The <code><a href="../reference/proportion.html">proportion_df()</a></code>, <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/proportion.html">rsi_df()</a></code> functions now return with the additional S3 class ‘rsi_df’ so they can be extended by other packages</li>
|
||||
@@ -266,7 +292,7 @@
|
||||
<h4 id="breaking-change-1-7-1">Breaking change<a class="anchor" aria-label="anchor" href="#breaking-change-1-7-1"></a></h4>
|
||||
<ul><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>filter_carbapenems()</code>, <code>filter_aminoglycosides()</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="cb4"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># select columns with results for carbapenems</span>
|
||||
<span class="va">example_isolates</span><span class="op">[</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">]</span> <span class="co"># base R</span>
|
||||
@@ -301,7 +327,7 @@
|
||||
<li>The documentation of the <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> functions has been completely rewritten.</li>
|
||||
</ul></li>
|
||||
<li>Function <code><a href="../reference/antibiotic_class_selectors.html">betalactams()</a></code> as additional antbiotic column selector and function <code>filter_betalactams()</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" class="external-link">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>
|
||||
<div class="section level4">
|
||||
@@ -321,7 +347,7 @@
|
||||
<ul><li><p>Now checks if <code>pattern</code> is a <em>valid</em> regular expression</p></li>
|
||||
<li>
|
||||
<p>Added <code>%unlike%</code> and <code>%unlike_case%</code> (as negations of the existing <code>%like%</code> and <code>%like_case%</code>). This greatly improves readability:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/grep.html" class="external-link">grepl</a></span><span class="op">(</span><span class="st">"EUCAST"</span>, <span class="va">guideline</span><span class="op">)</span><span class="op">)</span> <span class="va">...</span>
|
||||
<span class="co"># same:</span>
|
||||
@@ -374,7 +400,7 @@
|
||||
</ul></li>
|
||||
<li>
|
||||
<p>Functions <code><a href="../reference/antibiotic_class_selectors.html">oxazolidinones()</a></code> (an antibiotic selector function) and <code>filter_oxazolidinones()</code> (an antibiotic filter function) to select/filter on e.g. linezolid and tedizolid</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
<span class="va">x</span> <span class="op"><-</span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="va">date</span>, <span class="va">hospital_id</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">oxazolidinones</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>
|
||||
@@ -384,10 +410,10 @@
|
||||
<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" class="external-link">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="cb7"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_kingdom</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Aspergillus"</span>, <span class="st">"Candida"</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="co">#> [1] "Fungi" "Fungi"</span>
|
||||
@@ -399,7 +425,7 @@
|
||||
<span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_is_yeast</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>, <span class="op">]</span> <span class="co"># base R</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_is_yeast</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="co"># dplyr</span></code></pre></div>
|
||||
<p>The <code><a href="../reference/mo_property.html">mo_type()</a></code> function has also been updated to reflect this change:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_type</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Aspergillus"</span>, <span class="st">"Candida"</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="co"># [1] "Fungi" "Yeasts"</span>
|
||||
@@ -409,7 +435,7 @@
|
||||
<li><p>Added Pretomanid (PMD, J04AK08) to the <code>antibiotics</code> data set</p></li>
|
||||
<li>
|
||||
<p>MIC values (see <code><a href="../reference/as.mic.html">as.mic()</a></code>) can now be used in any mathematical processing, such as usage inside functions <code><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">min()</a></code>, <code><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max()</a></code>, <code><a href="https://rdrr.io/r/base/range.html" class="external-link">range()</a></code>, and with binary operators (<code>+</code>, <code>-</code>, etc.). This allows for easy distribution analysis and fast filtering on MIC values:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">x</span> <span class="op"><-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span>
|
||||
<span class="va">x</span>
|
||||
@@ -435,7 +461,7 @@
|
||||
<ul><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" class="external-link">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>
|
||||
<li>
|
||||
@@ -451,7 +477,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" class="external-link">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">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" class="external-link">dplyr::group_by()</a></code>
|
||||
<li>Functions <code><a href="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">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" class="external-link">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>
|
||||
@@ -469,7 +495,7 @@
|
||||
<div class="section level4">
|
||||
<h4 id="other-1-6-0">Other<a class="anchor" aria-label="anchor" href="#other-1-6-0"></a></h4>
|
||||
<ul><li>Big documentation updates</li>
|
||||
<li>Loading the package (i.e., <code><a href="https://msberends.github.io/AMR">library(AMR)</a></code>) now is ~50 times faster than before, in costs of package size (which increased by ~3 MB)</li>
|
||||
<li>Loading the package (i.e., <code><a href="https://msberends.github.io/AMR/">library(AMR)</a></code>) now is ~50 times faster than before, in costs of package size (which increased by ~3 MB)</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
@@ -478,7 +504,7 @@
|
||||
<h4 id="new-1-5-0">New<a class="anchor" aria-label="anchor" href="#new-1-5-0"></a></h4>
|
||||
<ul><li>
|
||||
<p>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> to determine (patient) episodes which are not necessarily based on microorganisms. The <code><a href="../reference/get_episode.html">get_episode()</a></code> function returns the index number of the episode per group, while the <code><a href="../reference/get_episode.html">is_new_episode()</a></code> function returns values <code>TRUE</code>/<code>FALSE</code> to indicate whether an item in a vector is the start of a new episode. They also support <code>dplyr</code>s grouping (i.e. using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code>):</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -523,7 +549,7 @@
|
||||
<li>
|
||||
<code><a href="../reference/mdro.html">mdr_cmi2012()</a></code>,</li>
|
||||
<li><code><a href="../reference/mdro.html">eucast_exceptional_phenotypes()</a></code></li>
|
||||
</ul><div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
|
||||
</ul><div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># to select first isolates that are Gram-negative </span>
|
||||
<span class="co"># and view results of cephalosporins and aminoglycosides:</span>
|
||||
@@ -535,7 +561,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<p>For antibiotic selection functions (such as <code><a href="../reference/antibiotic_class_selectors.html">cephalosporins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) to select columns based on a certain antibiotic group, the dependency on the <code>tidyselect</code> package was removed, meaning that they can now also be used without the need to have this package installed and now also work in base R function calls (they rely on R 3.2 or later):</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># above example in base R:</span>
|
||||
<span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="op">)</span> <span class="op">&</span> <span class="fu"><a href="../reference/mo_property.html">mo_is_gram_negative</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,
|
||||
@@ -578,9 +604,9 @@
|
||||
<li>
|
||||
<p>Data set <code>intrinsic_resistant</code>. This data set contains all bug-drug combinations where the ‘bug’ is intrinsic resistant to the ‘drug’ according to the latest EUCAST insights. It contains just two columns: <code>microorganism</code> and <code>antibiotic</code>.</p>
|
||||
<p>Curious about which enterococci are actually intrinsic resistant to vancomycin?</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR">AMR</a></span><span class="op">)</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
<span class="va">intrinsic_resistant</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="va">antibiotic</span> <span class="op">==</span> <span class="st">"Vancomycin"</span>, <span class="va">microorganism</span> <span class="op"><a href="../reference/like.html">%like%</a></span> <span class="st">"Enterococcus"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -597,7 +623,7 @@
|
||||
<p>Improvements for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>:</p>
|
||||
<ul><li>
|
||||
<p>Support for using <code>dplyr</code>’s <code><a href="https://dplyr.tidyverse.org/reference/across.html" class="external-link">across()</a></code> to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># until dplyr 1.0.0</span>
|
||||
<span class="va">your_data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_if</a></span><span class="op">(</span><span class="va">is.mic</span>, <span class="va">as.rsi</span><span class="op">)</span>
|
||||
@@ -614,7 +640,7 @@
|
||||
</ul></li>
|
||||
<li>
|
||||
<p>Added intelligent data cleaning to <code><a href="../reference/as.disk.html">as.disk()</a></code>, so numbers can also be extracted from text and decimal numbers will always be rounded up:</p>
|
||||
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/as.disk.html">as.disk</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"disk zone: 23.4 mm"</span>, <span class="fl">23.4</span><span class="op">)</span><span class="op">)</span>
|
||||
<span class="co">#> Class <disk></span>
|
||||
@@ -663,7 +689,7 @@
|
||||
<ul><li><p>Function <code><a href="../reference/ab_from_text.html">ab_from_text()</a></code> to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses <code><a href="../reference/as.ab.html">as.ab()</a></code> internally</p></li>
|
||||
<li>
|
||||
<p><a href="https://tidyselect.r-lib.org/reference/language.html" class="external-link">Tidyverse selection helpers</a> for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like <code><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">dplyr::select()</a></code> and <code><a href="https://tidyr.tidyverse.org/reference/pivot_longer.html" class="external-link">tidyr::pivot_longer()</a></code>:</p>
|
||||
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
|
||||
@@ -730,7 +756,7 @@
|
||||
<p>Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.</p>
|
||||
<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" class="external-link">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" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner" class="external-link">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>.</li>
|
||||
<ul><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" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner" class="external-link">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>
|
||||
@@ -804,7 +830,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<ul><li><p>Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline</p></li>
|
||||
<li>
|
||||
<p>Interpretation from MIC values (and disk zones) to R/SI can now be used with <code><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_at()</a></code> of the <code>dplyr</code> package:</p>
|
||||
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">yourdata</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html" class="external-link">vars</a></span><span class="op">(</span><span class="va">antibiotic1</span><span class="op">:</span><span class="va">antibiotic25</span><span class="op">)</span>, <span class="va">as.rsi</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span><span class="op">)</span>
|
||||
@@ -827,7 +853,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>Support for LOINC and SNOMED codes
|
||||
<ul><li>
|
||||
<p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><a href="../reference/ab_property.html">ab_loinc()</a></code> to retrieve LOINC codes, or use a LOINC code for input in any <code>ab_*</code> function:</p>
|
||||
<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/ab_property.html">ab_loinc</a></span><span class="op">(</span><span class="st">"ampicillin"</span><span class="op">)</span>
|
||||
<span class="co">#> [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"</span>
|
||||
@@ -838,7 +864,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for SNOMED CT codes in the <code>microorganisms</code> data set. Use <code><a href="../reference/mo_property.html">mo_snomed()</a></code> to retrieve SNOMED codes, or use a SNOMED code for input in any <code>mo_*</code> function:</p>
|
||||
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_snomed</a></span><span class="op">(</span><span class="st">"S. aureus"</span><span class="op">)</span>
|
||||
<span class="co">#> [1] 115329001 3092008 113961008</span>
|
||||
@@ -886,11 +912,11 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<ul><li>Adopted Adeolu <em>et al.</em> (2016), <a href="https:/pubmed.ncbi.nlm.nih.gov/27620848/">PMID 27620848</a> for the <code>microorganisms</code> data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like <em>Morganellaceae</em> and <em>Yersiniaceae</em>). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with <code><a href="../reference/mdro.html">mdro()</a></code> will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family.
|
||||
<ul><li>
|
||||
<p>If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:</p>
|
||||
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_family</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacteriaceae"</span><span class="op">)</span> <span class="va">...</span></code></pre></div>
|
||||
<p>then please adjust this to:</p>
|
||||
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_order</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacterales"</span><span class="op">)</span> <span class="va">...</span></code></pre></div>
|
||||
</li>
|
||||
@@ -900,7 +926,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<h4 id="new-0-9-0">New<a class="anchor" aria-label="anchor" href="#new-0-9-0"></a></h4>
|
||||
<ul><li>
|
||||
<p>Functions <code><a href="../reference/proportion.html">susceptibility()</a></code> and <code><a href="../reference/proportion.html">resistance()</a></code> as aliases of <code><a href="../reference/proportion.html">proportion_SI()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code>, respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.</p>
|
||||
<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
<span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -923,7 +949,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li>
|
||||
<li>
|
||||
<p>Added a score (a certainty percentage) to <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance" class="external-link">Levenshtein distance</a>:</p>
|
||||
<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Stafylococcus aureus"</span>,
|
||||
<span class="st">"staphylokok aureuz"</span><span class="op">)</span><span class="op">)</span>
|
||||
@@ -971,14 +997,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<h4 id="breaking-0-8-0">Breaking<a class="anchor" aria-label="anchor" href="#breaking-0-8-0"></a></h4>
|
||||
<ul><li>
|
||||
<p>Determination of first isolates now <strong>excludes</strong> all ‘unknown’ microorganisms at default, i.e. microbial code <code>"UNKNOWN"</code>. They can be included with the new argument <code>include_unknown</code>:</p>
|
||||
<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb25"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">...</span>, include_unknown <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
|
||||
<p>For WHONET users, this means that all records/isolates with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For code consistency, classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in <code>NA</code>:</p>
|
||||
<div class="sourceCode" id="cb25"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># how it works in base R:</span>
|
||||
<span class="va">x</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a></span><span class="op">(</span><span class="st">"A"</span><span class="op">)</span>
|
||||
@@ -993,14 +1019,14 @@ 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" class="external-link">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">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" class="external-link">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" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">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>
|
||||
<div class="section level4">
|
||||
<h4 id="new-0-8-0">New<a class="anchor" aria-label="anchor" href="#new-0-8-0"></a></h4>
|
||||
<ul><li>
|
||||
<p>Function <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with <code><a href="../reference/mo_property.html">mo_shortname()</a></code> at default:</p>
|
||||
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">x</span> <span class="op"><-</span> <span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="va">example_isolates</span><span class="op">)</span>
|
||||
<span class="co">#> NOTE: Using column `mo` as input for `col_mo`.</span>
|
||||
@@ -1023,13 +1049,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="co">#> 4 Gram-negative AMX 227 0 405 632</span>
|
||||
<span class="co">#> NOTE: Use 'format()' on this result to get a publicable/printable format.</span></code></pre></div>
|
||||
<p>You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R <code><a href="https://rdrr.io/r/base/format.html" class="external-link">format()</a></code> function:</p>
|
||||
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span><span class="va">x</span>, combine_IR <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibility of a combination therapy. A new argument <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
|
||||
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># --------------------------------------------------------------------</span>
|
||||
<span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span>
|
||||
@@ -1051,7 +1077,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
<li>
|
||||
<p><code>tibble</code> printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code> <code>mo</code>. When using <code>tibble</code>s containing antimicrobial columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red. Microbial IDs (class <code>mo</code>) will emphasise on the genus and species, not on the kingdom.</p>
|
||||
<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb30"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># (run this on your own console, as this page does not support colour printing)</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span>
|
||||
@@ -1119,7 +1145,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<h5 id="new-0-7-1">New<a class="anchor" aria-label="anchor" href="#new-0-7-1"></a></h5>
|
||||
<ul><li>
|
||||
<p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> to immediately show resistance percentages and number of available isolates:</p>
|
||||
<div class="sourceCode" id="cb30"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb31"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="va">AMX</span>, <span class="va">CIP</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -1144,7 +1170,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>STEC (Shiga-toxin producing <em>E. coli</em>)</li>
|
||||
<li>UPEC (Uropathogenic <em>E. coli</em>)</li>
|
||||
</ul><p>All these lead to the microbial ID of <em>E. coli</em>:</p>
|
||||
<div class="sourceCode" id="cb31"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb32"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"UPEC"</span><span class="op">)</span>
|
||||
<span class="co"># B_ESCHR_COL</span>
|
||||
@@ -1222,21 +1248,21 @@ 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" class="external-link">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>
|
||||
<li><p>when all values are unique it now shows a message instead of a warning</p></li>
|
||||
<li>
|
||||
<p>support for boxplots:</p>
|
||||
<div class="sourceCode" id="cb32"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb33"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html" class="external-link">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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html" class="external-link">boxplot</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
</ul></li>
|
||||
@@ -1245,7 +1271,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" class="external-link">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>
|
||||
@@ -1303,7 +1329,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</ul></li>
|
||||
<li>
|
||||
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
|
||||
<div class="sourceCode" id="cb33"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb34"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu">filter_aminoglycosides</span><span class="op">(</span><span class="op">)</span>
|
||||
<span class="fu">filter_carbapenems</span><span class="op">(</span><span class="op">)</span>
|
||||
@@ -1317,7 +1343,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="fu">filter_macrolides</span><span class="op">(</span><span class="op">)</span>
|
||||
<span class="fu">filter_tetracyclines</span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
|
||||
<div class="sourceCode" id="cb34"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb35"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu">filter_glycopeptides</span><span class="op">(</span>result <span class="op">=</span> <span class="st">"R"</span><span class="op">)</span>
|
||||
<span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span>
|
||||
@@ -1326,7 +1352,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
<li>
|
||||
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
|
||||
<div class="sourceCode" id="cb35"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb36"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">ab_property</span> <span class="op">-></span> <span class="fu">atc_property</span><span class="op">(</span><span class="op">)</span>
|
||||
<span class="va">ab_name</span> <span class="op">-></span> <span class="fu">atc_name</span><span class="op">(</span><span class="op">)</span>
|
||||
@@ -1347,7 +1373,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic AMR data analysis per age group.</p></li>
|
||||
<li>
|
||||
<p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="../reference/plot.html">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
|
||||
<div class="sourceCode" id="cb36"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">x</span> <span class="op"><-</span> <span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span><span class="va">septic_patients</span>, col_ab <span class="op">=</span> <span class="st">"amox"</span><span class="op">)</span>
|
||||
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
|
||||
@@ -1355,13 +1381,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
<li>
|
||||
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code>filter_first_weighted_isolate()</code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
|
||||
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb38"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">...</span><span class="op">)</span>
|
||||
<span class="co"># or</span>
|
||||
<span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
<p>is equal to:</p>
|
||||
<div class="sourceCode" id="cb38"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb39"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>only_firsts <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
@@ -1388,7 +1414,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:
|
||||
<ul><li>
|
||||
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
|
||||
<div class="sourceCode" id="cb39"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb40"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># mo_fullname() uses as.mo() internally</span>
|
||||
|
||||
@@ -1400,7 +1426,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</li>
|
||||
<li>
|
||||
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
|
||||
<div class="sourceCode" id="cb40"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb41"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># equal:</span>
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
|
||||
@@ -1448,24 +1474,24 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>Now accepts high and low resistance: <code>"HIGH S"</code> will return <code>S</code>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">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>
|
||||
<div class="sourceCode" id="cb41"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span>
|
||||
<span class="co"># OLD WAY</span>
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="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>
|
||||
@@ -1521,7 +1547,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Fewer than 3 characters as input for <code>as.mo</code> will return NA</p></li>
|
||||
<li>
|
||||
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
|
||||
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. species"</span><span class="op">)</span> <span class="co"># B_ESCHR</span>
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"E. spp."</span><span class="op">)</span> <span class="co"># "Escherichia species"</span>
|
||||
@@ -1534,21 +1560,21 @@ 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" class="external-link">freq()</a></code>:</p>
|
||||
<p>Frequency tables - <code>freq()</code>:</p>
|
||||
<ul><li>
|
||||
<p>Support for grouping variables, test with:</p>
|
||||
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for (un)selecting columns:</p>
|
||||
<div class="sourceCode" id="cb44"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<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="cb45"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">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" class="external-link">hms::is.hms</a></code></p></li>
|
||||
@@ -1565,7 +1591,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" class="external-link">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>
|
||||
@@ -1612,7 +1638,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li>Author and year: <code>mo_ref</code>
|
||||
</li>
|
||||
</ul><p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||
<div class="sourceCode" id="cb45"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb46"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span>
|
||||
<span class="co"># [1] "Gram negative"</span>
|
||||
@@ -1623,7 +1649,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. group A"</span>, language <span class="op">=</span> <span class="st">"pt"</span><span class="op">)</span> <span class="co"># Portuguese</span>
|
||||
<span class="co"># [1] "Streptococcus grupo A"</span></code></pre></div>
|
||||
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
|
||||
<div class="sourceCode" id="cb46"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb47"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"Esc blattae"</span><span class="op">)</span>
|
||||
<span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span>
|
||||
@@ -1636,7 +1662,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Function <code>is.rsi.eligible</code> to check for columns that have valid antimicrobial results, but do not have the <code>rsi</code> class yet. Transform the columns of your raw data with: <code>data %>% mutate_if(is.rsi.eligible, as.rsi)</code></p></li>
|
||||
<li>
|
||||
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
|
||||
<div class="sourceCode" id="cb47"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb48"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span>
|
||||
<span class="co"># [1] B_ESCHR_COL</span>
|
||||
@@ -1645,7 +1671,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"S group A"</span><span class="op">)</span>
|
||||
<span class="co"># [1] B_STRPTC_GRA</span></code></pre></div>
|
||||
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
|
||||
<div class="sourceCode" id="cb48"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb49"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">thousands_of_E_colis</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"E. coli"</span>, <span class="fl">25000</span><span class="op">)</span>
|
||||
<span class="fu">microbenchmark</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html" class="external-link">microbenchmark</a></span><span class="op">(</span><span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">thousands_of_E_colis</span><span class="op">)</span>, unit <span class="op">=</span> <span class="st">"s"</span><span class="op">)</span>
|
||||
@@ -1674,7 +1700,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<ul><li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li>
|
||||
<li>
|
||||
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
|
||||
<div class="sourceCode" id="cb49"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb50"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="fu">ab_official</span><span class="op">(</span><span class="st">"Bactroban"</span><span class="op">)</span>
|
||||
<span class="co"># [1] "Mupirocin"</span>
|
||||
@@ -1691,7 +1717,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Added arguments <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code></p></li>
|
||||
<li>
|
||||
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
|
||||
<div class="sourceCode" id="cb50"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb51"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R">
|
||||
<span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="va">amox</span>, <span class="va">cipr</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="../reference/count.html">count_IR</a></span><span class="op">(</span><span class="op">)</span>
|
||||
<span class="co"># which is the same as:</span>
|
||||
@@ -1711,16 +1737,16 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
<li><p>Added longest en shortest character length in the frequency table (<code>freq</code>) header of class <code>character</code></p></li>
|
||||
<li>
|
||||
<p>Support for types (classes) list and matrix for <code>freq</code></p>
|
||||
<div class="sourceCode" id="cb51"><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" class="external-link">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" class="external-link">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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" class="external-link">freq</a></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="cb52"><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" class="external-link">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" class="external-link">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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">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="cb53"><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" class="external-link">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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
|
||||
<span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
|
||||
<span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></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"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></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>
|
||||
<div class="section level5">
|
||||
@@ -1906,7 +1932,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,13 +161,12 @@
|
||||
<p>These functions are so-called '<a href="https://rdrr.io/r/base/Deprecated.html" class="external-link">Deprecated</a>'. <strong>They will be removed in a future release.</strong> Using the functions will give a warning with the name of the function it has been replaced by (if there is one).</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,NULL</div>
|
||||
|
||||
<div id="retired-lifecycle">
|
||||
<h2>Retired Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_retired.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_retired.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>retired</strong>. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.</p>
|
||||
</div>
|
||||
<div id="read-more-on-our-website-">
|
||||
@@ -189,7 +188,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>retired</
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,13 +161,12 @@
|
||||
<p>All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,NULL</div>
|
||||
|
||||
<div id="whocc">
|
||||
<h2>WHOCC</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_who.png" height="60px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_who.png" height="60" style='margin-bottom:"5"'><br>
|
||||
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://www.whocc.no" class="external-link">https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
|
||||
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
|
||||
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
|
||||
@@ -200,7 +199,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Use this function on e.g. clinical texts from health care records. It returns a <a href="https://rdrr.io/r/base/list.html" class="external-link">list</a> with all antimicrobial drugs, doses and forms of administration found in the texts.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_from_text</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_from_text</span><span class="op">(</span>
|
||||
<span class="va">text</span>,
|
||||
type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"drug"</span>, <span class="st">"dose"</span>, <span class="st">"administration"</span><span class="op">)</span>,
|
||||
collapse <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
@@ -169,7 +170,8 @@
|
||||
thorough_search <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -217,7 +219,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -277,7 +279,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Use these functions to return a specific property of an antibiotic from the <a href="antibiotics.html">antibiotics</a> data set. All input values will be evaluated internally with <code><a href="as.ab.html">as.ab()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_name</span><span class="op">(</span><span class="va">x</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, tolower <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_name</span><span class="op">(</span><span class="va">x</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, tolower <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">ab_cid</span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
@@ -195,7 +196,8 @@
|
||||
property <span class="op">=</span> <span class="st">"name"</span>,
|
||||
language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,
|
||||
snake_case <span class="op">=</span> <span class="cn">NULL</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -238,7 +240,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -247,7 +249,6 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: <a href="https://www.whocc.no/atc_ddd_index/" class="external-link">https://www.whocc.no/atc_ddd_index/</a></p>
|
||||
<p>WHONET 2019 software: <a href="http://www.whonet.org/software.html" class="external-link">http://www.whonet.org/software.html</a></p>
|
||||
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a></p>
|
||||
</div>
|
||||
<div id="reference-data-publicly-available">
|
||||
@@ -347,7 +348,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>Calculates age in years based on a reference date, which is the sytem date at default.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">age</span><span class="op">(</span><span class="va">x</span>, reference <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>, exact <span class="op">=</span> <span class="cn">FALSE</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">age</span><span class="op">(</span><span class="va">x</span>, reference <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>, exact <span class="op">=</span> <span class="cn">FALSE</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -189,7 +191,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -228,7 +230,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>Split ages into age groups defined by the <code>split</code> argument. This allows for easier demographic (antimicrobial resistance) analysis.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">age_groups</span><span class="op">(</span><span class="va">x</span>, split_at <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">12</span>, <span class="fl">25</span>, <span class="fl">55</span>, <span class="fl">75</span><span class="op">)</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">age_groups</span><span class="op">(</span><span class="va">x</span>, split_at <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">12</span>, <span class="fl">25</span>, <span class="fl">55</span>, <span class="fl">75</span><span class="op">)</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -190,7 +192,7 @@ The default is to split on young children (0-11), youth (12-24), young adults (2
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -252,7 +254,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>These functions allow for filtering rows and selecting columns based on antibiotic test results that are of a specific antibiotic class or group, without the need to define the columns or antibiotic abbreviations. In short, if you have a column name that resembles an antimicrobial agent, it will be picked up by any of these functions that matches its pharmaceutical class: "cefazolin", "CZO" and "J01DB04" will all be picked up by <code>cephalosporins()</code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_class</span><span class="op">(</span><span class="va">ab_class</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ab_class</span><span class="op">(</span><span class="va">ab_class</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">ab_selector</span><span class="op">(</span><span class="va">filter</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
@@ -224,7 +225,8 @@
|
||||
col_mo <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
version_expertrules <span class="op">=</span> <span class="fl">3.3</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -290,7 +292,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -432,7 +434,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,9 +161,11 @@
|
||||
<p>Two data sets containing all antibiotics/antimycotics and antivirals. Use <code><a href="as.ab.html">as.ab()</a></code> or one of the <code><a href="ab_property.html">ab_*</a></code> functions to retrieve values from the antibiotics data set. Three identifiers are included in this data set: an antibiotic ID (<code>ab</code>, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (<code>atc</code>) as defined by the WHO, and a Compound ID (<code>cid</code>) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">antibiotics</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">antibiotics</span>
|
||||
|
||||
<span class="va">antivirals</span></code></pre></div></div>
|
||||
<span class="va">antivirals</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -206,7 +208,6 @@
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): <a href="https://www.whocc.no/atc_ddd_index/" class="external-link">https://www.whocc.no/atc_ddd_index/</a></p>
|
||||
<p>WHONET 2019 software: <a href="http://www.whonet.org/software.html" class="external-link">http://www.whonet.org/software.html</a></p>
|
||||
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a></p>
|
||||
</div>
|
||||
<div id="details">
|
||||
@@ -233,7 +234,7 @@
|
||||
<h2>WHOCC</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_who.png" height="60px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_who.png" height="60" style='margin-bottom:"5"'><br>
|
||||
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://www.whocc.no" class="external-link">https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
|
||||
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
|
||||
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
|
||||
@@ -262,7 +263,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,9 +161,11 @@
|
||||
<p>Use this function to determine the antibiotic code of one or more antibiotics. The data set <a href="antibiotics.html">antibiotics</a> will be searched for abbreviations, official names and synonyms (brand names).</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.ab</span><span class="op">(</span><span class="va">x</span>, flag_multiple_results <span class="op">=</span> <span class="cn">TRUE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.ab</span><span class="op">(</span><span class="va">x</span>, flag_multiple_results <span class="op">=</span> <span class="cn">TRUE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">is.ab</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">is.ab</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -195,14 +197,13 @@
|
||||
|
||||
|
||||
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: <a href="https://www.whocc.no/atc_ddd_index/" class="external-link">https://www.whocc.no/atc_ddd_index/</a></p>
|
||||
<p>WHONET 2019 software: <a href="http://www.whonet.org/software.html" class="external-link">http://www.whonet.org/software.html</a></p>
|
||||
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a></p>
|
||||
</div>
|
||||
<div id="stable-lifecycle">
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -210,7 +211,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
<h2>WHOCC</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_who.png" height="60px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_who.png" height="60" style='margin-bottom:"5"'><br>
|
||||
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://www.whocc.no" class="external-link">https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
|
||||
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
|
||||
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
|
||||
@@ -283,7 +284,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,11 +161,13 @@
|
||||
<p>This transforms a vector to a new class <code>disk</code>, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 6 and 50.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.disk</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.disk</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="va">NA_disk_</span>
|
||||
|
||||
<span class="fu">is.disk</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">is.disk</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -191,7 +193,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -241,7 +243,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,11 +161,13 @@
|
||||
<p>This transforms vectors to a new class <code>mic</code>, which treats the input as decimal numbers, while maintaining operators (such as ">=") and only allowing valid MIC values known to the field of (medical) microbiology.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.mic</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.mic</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="va">NA_mic_</span>
|
||||
|
||||
<span class="fu">is.mic</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">is.mic</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -220,7 +222,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -275,7 +277,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<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>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.mo</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.mo</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
Becker <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
Lancefield <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
@@ -179,7 +180,8 @@
|
||||
|
||||
<span class="fu">mo_uncertainties</span><span class="op">(</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">mo_renamed</span><span class="op">(</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">mo_renamed</span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -189,8 +191,8 @@
|
||||
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> 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 <em>et al.</em> (1,2,3).</p>
|
||||
<p>This excludes <em>Staphylococcus aureus</em> at default, use <code>Becker = "all"</code> to also categorise <em>S. aureus</em> as "CoPS".</p></dd>
|
||||
<dt>Lancefield</dt>
|
||||
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether beta-haemolytic <em>Streptococci</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These <em>Streptococci</em> will be categorised in their first group, e.g. <em>Streptococcus dysgalactiae</em> will be group C, although officially it was also categorised into groups G and L.</p>
|
||||
<p>This excludes <em>Enterococci</em> at default (who are in group D), use <code>Lancefield = "all"</code> to also categorise all <em>Enterococci</em> as group D.</p></dd>
|
||||
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether a beta-haemolytic <em>Streptococcus</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These streptococci will be categorised in their first group, e.g. <em>Streptococcus dysgalactiae</em> will be group C, although officially it was also categorised into groups G and L.</p>
|
||||
<p>This excludes enterococci at default (who are in group D), use <code>Lancefield = "all"</code> to also categorise all enterococci as group D.</p></dd>
|
||||
<dt>allow_uncertain</dt>
|
||||
<dd><p>a number between <code>0</code> (or <code>"none"</code>) and <code>3</code> (or <code>"all"</code>), or <code>TRUE</code> (= <code>2</code>) or <code>FALSE</code> (= <code>0</code>) to indicate whether the input should be checked for less probable results, see <em>Details</em></p></dd>
|
||||
<dt>reference_df</dt>
|
||||
@@ -279,7 +281,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -288,7 +290,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
<p>With ambiguous user input in <code>as.mo()</code> and all the <code><a href="mo_property.html">mo_*</a></code> functions, the returned results are chosen based on their matching score using <code><a href="mo_matching_score.html">mo_matching_score()</a></code>. This matching score \(m\), is calculated as:</p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300px" alt="mo matching score"></p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300" alt="mo matching score"></p>
|
||||
<p>where:</p><ul><li><p><i>x</i> is the user input;</p></li>
|
||||
<li><p><i>n</i> is a taxonomic name (genus, species, and subspecies);</p></li>
|
||||
<li><p><i>l<sub>n</sub></i> is the length of <i>n</i>;</p></li>
|
||||
@@ -298,12 +300,13 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</ul><p>The grouping into human pathogenic prevalence (\(p\)) is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence. <strong>Group 1</strong> (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is <em>Enterococcus</em>, <em>Staphylococcus</em> or <em>Streptococcus</em>. This group consequently contains all common Gram-negative bacteria, such as <em>Pseudomonas</em> and <em>Legionella</em> and all species within the order Enterobacterales. <strong>Group 2</strong> consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Absidia</em>, <em>Acremonium</em>, <em>Actinotignum</em>, <em>Alternaria</em>, <em>Anaerosalibacter</em>, <em>Apophysomyces</em>, <em>Arachnia</em>, <em>Aspergillus</em>, <em>Aureobacterium</em>, <em>Aureobasidium</em>, <em>Bacteroides</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Blastocystis</em>, <em>Branhamella</em>, <em>Calymmatobacterium</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Catabacter</em>, <em>Chaetomium</em>, <em>Chryseobacterium</em>, <em>Chryseomonas</em>, <em>Chrysonilia</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Conidiobolus</em>, <em>Cryptococcus</em>, <em>Curvularia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Flavobacterium</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Fusobacterium</em>, <em>Hendersonula</em>, <em>Hypomyces</em>, <em>Koserella</em>, <em>Lelliottia</em>, <em>Leptosphaeria</em>, <em>Leptotrichia</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Mycoplasma</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oidiodendron</em>, <em>Phoma</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Prevotella</em>, <em>Pseudallescheria</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Sporobolomyces</em>, <em>Stachybotrys</em>, <em>Stomatococcus</em>, <em>Treponema</em>, <em>Trichoderma</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Tritirachium</em> or <em>Ureaplasma</em>. <strong>Group 3</strong> consists of all other microorganisms.</p>
|
||||
<p>All characters in \(x\) and \(n\) are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.</p>
|
||||
<p>All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., <code>"E. coli"</code> will return the microbial ID of <em>Escherichia coli</em> (\(m = 0.688\), a highly prevalent microorganism found in humans) and not <em>Entamoeba coli</em> (\(m = 0.079\), a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
|
||||
<p>Since <code>AMR</code> version 1.8.1, common microorganism abbreviations are ignored in determining the matching score. These abbreviations are currently: AIEC, ATEC, BORSA, CRSM, DAEC, EAEC, EHEC, EIEC, EPEC, ETEC, GISA, MRPA, MRSA, MRSE, MSSA, MSSE, NMEC, PISP, PRSP, STEC, UPEC, VISA, VISP, VRE, VRSA and VRSP.</p>
|
||||
</div>
|
||||
<div id="catalogue-of-life">
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -378,7 +381,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class <code>rsi</code>, which is an ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a> with levels <code>S < I < R</code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.rsi</span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.rsi</span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="va">NA_rsi_</span>
|
||||
|
||||
@@ -204,7 +205,8 @@
|
||||
conserve_capped_values <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="rsi_translation.html">rsi_translation</a></span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -262,7 +264,7 @@
|
||||
|
||||
|
||||
<p>For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (2011-2021) and CLSI (2010-2021).</p>
|
||||
<p>Thus, the <code>guideline</code> argument must be set to e.g., <code>"EUCAST 2021"</code> or <code>"CLSI 2021"</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>
|
||||
<p>Thus, the <code>guideline</code> argument must be set to e.g., <code>"EUCAST 2021"</code> or <code>"CLSI 2021"</code>. By simply using <code>"EUCAST"</code> (the default) or <code>"CLSI"</code> as input, the latest included 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>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
@@ -305,7 +307,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -425,7 +427,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antibiotic), such as the name, defined daily dose (DDD) or standard unit.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">atc_online_property</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">atc_online_property</span><span class="op">(</span>
|
||||
<span class="va">atc_code</span>,
|
||||
<span class="va">property</span>,
|
||||
administration <span class="op">=</span> <span class="st">"O"</span>,
|
||||
@@ -173,7 +174,8 @@
|
||||
|
||||
<span class="fu">atc_online_ddd</span><span class="op">(</span><span class="va">atc_code</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">atc_online_ddd_units</span><span class="op">(</span><span class="va">atc_code</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">atc_online_ddd_units</span><span class="op">(</span><span class="va">atc_code</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -220,7 +222,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -259,7 +261,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. <code><a href="proportion.html">susceptibility()</a></code> and <code><a href="proportion.html">resistance()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">availability</span><span class="op">(</span><span class="va">tbl</span>, width <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">availability</span><span class="op">(</span><span class="va">tbl</span>, width <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -182,7 +184,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -218,7 +220,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use <code><a href="https://rdrr.io/r/base/format.html" class="external-link">format()</a></code> on the result to prettify it to a publishable/printable format, see <em>Examples</em>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">bug_drug_combinations</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, FUN <span class="op">=</span> <span class="va">mo_shortname</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">bug_drug_combinations</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, FUN <span class="op">=</span> <span class="va">mo_shortname</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for bug_drug_combinations</span>
|
||||
<span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span>
|
||||
@@ -176,7 +177,8 @@
|
||||
decimal.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"OutDec"</span><span class="op">)</span>,
|
||||
big.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">decimal.mark</span> <span class="op">==</span> <span class="st">","</span>, <span class="st">"."</span>, <span class="st">","</span><span class="op">)</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -226,7 +228,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -267,7 +269,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,13 +161,12 @@
|
||||
<p>This package contains the complete taxonomic tree (last updated: 5 October 2021) of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (CoL), supplemented with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN).</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,NULL</div>
|
||||
|
||||
<div id="catalogue-of-life">
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p>Click here for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -240,7 +239,7 @@ Function <code><a href="as.mo.html">as.mo()</a></code> to use the data for intel
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>This function returns information about the included data from the Catalogue of Life.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">catalogue_of_life_version</span><span class="op">(</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">catalogue_of_life_version</span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="value">
|
||||
<h2>Value</h2>
|
||||
@@ -175,7 +177,7 @@
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code>catalogue_of_life_version()</code>.</p>
|
||||
</div>
|
||||
@@ -202,7 +204,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,8 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
<p><code>count_resistant()</code> should be used to count resistant isolates, <code>count_susceptible()</code> should be used to count susceptible isolates.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">count_resistant</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">count_resistant</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">count_susceptible</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
@@ -187,7 +188,8 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,
|
||||
combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
combine_IR <span class="op">=</span> <span class="cn">FALSE</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -221,7 +223,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -360,7 +362,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>Define custom EUCAST rules for your organisation or specific analysis and use the output of this function in <code><a href="eucast_rules.html">eucast_rules()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">custom_eucast_rules</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">custom_eucast_rules</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -265,7 +267,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -303,7 +305,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,8 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
|
||||
<p>To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see <em>Details</em>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">eucast_rules</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">eucast_rules</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
col_mo <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,
|
||||
@@ -177,7 +178,8 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span>
|
||||
|
||||
<span class="fu">eucast_dosage</span><span class="op">(</span><span class="va">ab</span>, administration <span class="op">=</span> <span class="st">"iv"</span>, version_breakpoints <span class="op">=</span> <span class="fl">11</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">eucast_dosage</span><span class="op">(</span><span class="va">ab</span>, administration <span class="op">=</span> <span class="st">"iv"</span>, version_breakpoints <span class="op">=</span> <span class="fl">11</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -261,7 +263,7 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -336,7 +338,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,8 @@
|
||||
). To determine patient episodes not necessarily based on microorganisms, use <code><a href="get_episode.html">is_new_episode()</a></code> that also supports grouping with the <code>dplyr</code> package.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">first_isolate</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">first_isolate</span><span class="op">(</span>
|
||||
x <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
col_date <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
col_patient_id <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
@@ -194,7 +195,8 @@
|
||||
episode_days <span class="op">=</span> <span class="fl">365</span>,
|
||||
method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"phenotype-based"</span>, <span class="st">"episode-based"</span>, <span class="st">"patient-based"</span>, <span class="st">"isolate-based"</span><span class="op">)</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -302,7 +304,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -373,7 +375,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p><code>g.test()</code> performs chi-squared contingency table tests and goodness-of-fit tests, just like <code><a href="https://rdrr.io/r/stats/chisq.test.html" class="external-link">chisq.test()</a></code> but is more reliable (1). A <em>G</em>-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a <strong><em>G</em>-test of goodness-of-fit</strong>), or to see whether the proportions of one variable are different for different values of the other variable (called a <strong><em>G</em>-test of independence</strong>).</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">g.test</span><span class="op">(</span><span class="va">x</span>, y <span class="op">=</span> <span class="cn">NULL</span>, p <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span><span class="op">/</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, rescale.p <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">g.test</span><span class="op">(</span><span class="va">x</span>, y <span class="op">=</span> <span class="cn">NULL</span>, p <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span><span class="op">/</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, rescale.p <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -258,7 +260,7 @@
|
||||
<h2>Questioning Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_questioning.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_questioning.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>questioning</strong>. This function might be no longer be optimal approach, or is it questionable whether this function should be in this <code>AMR</code> package at all.</p>
|
||||
</div>
|
||||
<div id="read-more-on-our-website-">
|
||||
@@ -325,7 +327,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>questioni
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,9 +161,11 @@
|
||||
<p>These functions determine which items in a vector can be considered (the start of) a new episode, based on the argument <code>episode_days</code>. This can be used to determine clinical episodes for any epidemiological analysis. The <code>get_episode()</code> function returns the index number of the episode per group, while the <code>is_new_episode()</code> function returns values <code>TRUE</code>/<code>FALSE</code> to indicate whether an item in a vector is the start of a new episode.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">get_episode</span><span class="op">(</span><span class="va">x</span>, <span class="va">episode_days</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">get_episode</span><span class="op">(</span><span class="va">x</span>, <span class="va">episode_days</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">is_new_episode</span><span class="op">(</span><span class="va">x</span>, <span class="va">episode_days</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">is_new_episode</span><span class="op">(</span><span class="va">x</span>, <span class="va">episode_days</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -189,7 +191,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -280,7 +282,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Produces a <code>ggplot2</code> variant of a so-called <a href="https://en.wikipedia.org/wiki/Biplot" class="external-link">biplot</a> for PCA (principal component analysis), but is more flexible and more appealing than the base <span style="R">R</span> <code><a href="https://rdrr.io/r/stats/biplot.html" class="external-link">biplot()</a></code> function.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ggplot_pca</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ggplot_pca</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
choices <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>,
|
||||
scale <span class="op">=</span> <span class="fl">1</span>,
|
||||
@@ -184,7 +185,8 @@
|
||||
arrows_alpha <span class="op">=</span> <span class="fl">0.75</span>,
|
||||
base_textsize <span class="op">=</span> <span class="fl">10</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -260,7 +262,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -306,7 +308,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Use these functions to create bar plots for AMR data analysis. All functions rely on <a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot2</a> functions.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ggplot_rsi</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">ggplot_rsi</span><span class="op">(</span>
|
||||
<span class="va">data</span>,
|
||||
position <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
x <span class="op">=</span> <span class="st">"antibiotic"</span>,
|
||||
@@ -218,7 +219,8 @@
|
||||
combine_IR <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
datalabels.size <span class="op">=</span> <span class="fl">3</span>,
|
||||
datalabels.colour <span class="op">=</span> <span class="st">"grey15"</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -291,7 +293,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -397,7 +399,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,12 +161,14 @@
|
||||
<p>This tries to find a column name in a data set based on information from the <a href="antibiotics.html">antibiotics</a> data set. Also supports WHONET abbreviations.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">guess_ab_col</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">guess_ab_col</span><span class="op">(</span>
|
||||
x <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
search_string <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
verbose <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -191,7 +193,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -245,7 +247,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,9 +161,11 @@
|
||||
<p>According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italic. This function finds taxonomic names within strings and makes them italic.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span><span class="op">)</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">italicise_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span><span class="op">)</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">italicize_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span><span class="op">)</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">italicize_taxonomy</span><span class="op">(</span><span class="va">string</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"markdown"</span>, <span class="st">"ansi"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -182,7 +184,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -223,7 +225,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Join the data set <a href="microorganisms.html">microorganisms</a> easily to an existing data set or to a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> vector.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">inner_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, suffix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2"</span>, <span class="st">""</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">inner_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, suffix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2"</span>, <span class="st">""</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, suffix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2"</span>, <span class="st">""</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
@@ -171,7 +172,8 @@
|
||||
|
||||
<span class="fu">semi_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">anti_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">anti_join_microorganisms</span><span class="op">(</span><span class="va">x</span>, by <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -197,7 +199,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -244,7 +246,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see <code><a href="first_isolate.html">first_isolate()</a></code>). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">key_antimicrobials</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">key_antimicrobials</span><span class="op">(</span>
|
||||
x <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
col_mo <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
universal <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"ampicillin"</span>, <span class="st">"amoxicillin/clavulanic acid"</span>, <span class="st">"cefuroxime"</span>,
|
||||
@@ -185,7 +186,8 @@
|
||||
ignore_I <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
points_threshold <span class="op">=</span> <span class="fl">2</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -248,7 +250,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -310,7 +312,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for default</span>
|
||||
<span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
@@ -170,7 +171,8 @@
|
||||
<span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for data.frame</span>
|
||||
<span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">kurtosis</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, excess <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -185,7 +187,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -212,7 +214,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -19,7 +19,7 @@ This page contains a section for every lifecycle (with text borrowed from the af
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,31 +161,30 @@ This page contains a section for every lifecycle (with text borrowed from the af
|
||||
|
||||
<div class="ref-description">
|
||||
<p>Functions in this <code>AMR</code> package are categorised using <a href="https://lifecycle.r-lib.org/articles/stages.html" class="external-link">the lifecycle circle of the Tidyverse as found on www.tidyverse.org/lifecycle</a>.</p>
|
||||
<p><img src="figures/lifecycle_tidyverse.svg" height="200px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_tidyverse.svg" height="200" style='margin-bottom:"5"'><br>
|
||||
This page contains a section for every lifecycle (with text borrowed from the aforementioned Tidyverse website), so they can be used in the manual pages of the functions.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,NULL</div>
|
||||
|
||||
<div id="experimental-lifecycle">
|
||||
<h2>Experimental Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_experimental.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_experimental.svg" style='margin-bottom:"5"'><br>
|
||||
The lifecycle of this function is <strong>experimental</strong>. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this <code>AMR</code> package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.</p>
|
||||
</div>
|
||||
<div id="maturing-lifecycle">
|
||||
<h2>Maturing Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_maturing.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_maturing.svg" style='margin-bottom:"5"'><br>
|
||||
The lifecycle of this function is <strong>maturing</strong>. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome <a href="https://github.com/msberends/AMR/issues" class="external-link">to suggest changes at our repository</a> or <a href="AMR.html">write us an email (see section 'Contact Us')</a>.</p>
|
||||
</div>
|
||||
<div id="stable-lifecycle">
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The lifecycle of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -193,14 +192,14 @@ The lifecycle of this function is <strong>stable</strong>. In a stable function,
|
||||
<h2>Retired Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_retired.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_retired.svg" style='margin-bottom:"5"'><br>
|
||||
The lifecycle of this function is <strong>retired</strong>. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.</p>
|
||||
</div>
|
||||
<div id="questioning-lifecycle">
|
||||
<h2>Questioning Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_questioning.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_questioning.svg" style='margin-bottom:"5"'><br>
|
||||
The lifecycle of this function is <strong>questioning</strong>. This function might be no longer be optimal approach, or is it questionable whether this function should be in this <code>AMR</code> package at all.</p>
|
||||
</div>
|
||||
|
||||
@@ -216,7 +215,7 @@ The lifecycle of this function is <strong>questioning</strong>. This function mi
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Convenient wrapper around <code><a href="https://rdrr.io/r/base/grep.html" class="external-link">grepl()</a></code> to match a pattern: <code>x %like% pattern</code>. It always returns a <code><a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a></code> vector and is always case-insensitive (use <code>x %like_case% pattern</code> for case-sensitive matching). Also, <code>pattern</code> can be as long as <code>x</code> to compare items of each index in both vectors, or they both can have the same length to iterate over all cases.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">like</span><span class="op">(</span><span class="va">x</span>, <span class="va">pattern</span>, ignore.case <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">like</span><span class="op">(</span><span class="va">x</span>, <span class="va">pattern</span>, ignore.case <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
|
||||
|
||||
<span class="va">x</span> <span class="op">%like%</span> <span class="va">pattern</span>
|
||||
|
||||
@@ -169,7 +170,8 @@
|
||||
|
||||
<span class="va">x</span> <span class="op">%like_case%</span> <span class="va">pattern</span>
|
||||
|
||||
<span class="va">x</span> <span class="op">%unlike_case%</span> <span class="va">pattern</span></code></pre></div></div>
|
||||
<span class="va">x</span> <span class="op">%unlike_case%</span> <span class="va">pattern</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -200,7 +202,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -262,7 +264,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mdro</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mdro</span><span class="op">(</span>
|
||||
x <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
guideline <span class="op">=</span> <span class="st">"CMI2012"</span>,
|
||||
col_mo <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
@@ -183,7 +184,8 @@
|
||||
|
||||
<span class="fu">mdr_cmi2012</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">eucast_exceptional_phenotypes</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">eucast_exceptional_phenotypes</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_rsi_columns <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -287,7 +289,7 @@ Ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">facto
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -354,7 +356,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with <code><a href="mo_source.html">set_mo_source()</a></code>. They will all be searched when using <code><a href="as.mo.html">as.mo()</a></code> and consequently all the <code><a href="mo_property.html">mo_*</a></code> functions.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms.codes</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms.codes</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -178,7 +180,7 @@
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -205,7 +207,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>A data set containing the full microbial taxonomy (<strong>last updated: 5 October 2021</strong>) of six kingdoms from the Catalogue of Life (CoL) and the List of Prokaryotic names with Standing in Nomenclature (LPSN). MO codes can be looked up using <code><a href="as.mo.html">as.mo()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -223,7 +225,7 @@
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -256,7 +258,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by <code><a href="as.mo.html">as.mo()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms.old</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="va">microorganisms.old</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="format">
|
||||
<h2>Format</h2>
|
||||
@@ -179,7 +181,7 @@
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -212,7 +214,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>This algorithm is used by <code><a href="as.mo.html">as.mo()</a></code> and all the <code><a href="mo_property.html">mo_*</a></code> functions to determine the most probable match of taxonomic records based on user input.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mo_matching_score</span><span class="op">(</span><span class="va">x</span>, <span class="va">n</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mo_matching_score</span><span class="op">(</span><span class="va">x</span>, <span class="va">n</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -175,7 +177,7 @@
|
||||
|
||||
|
||||
<p>With ambiguous user input in <code><a href="as.mo.html">as.mo()</a></code> and all the <code><a href="mo_property.html">mo_*</a></code> functions, the returned results are chosen based on their matching score using <code>mo_matching_score()</code>. This matching score \(m\), is calculated as:</p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300px" alt="mo matching score"></p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300" alt="mo matching score"></p>
|
||||
<p>where:</p><ul><li><p><i>x</i> is the user input;</p></li>
|
||||
<li><p><i>n</i> is a taxonomic name (genus, species, and subspecies);</p></li>
|
||||
<li><p><i>l<sub>n</sub></i> is the length of <i>n</i>;</p></li>
|
||||
@@ -185,12 +187,13 @@
|
||||
</ul><p>The grouping into human pathogenic prevalence (\(p\)) is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence. <strong>Group 1</strong> (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is <em>Enterococcus</em>, <em>Staphylococcus</em> or <em>Streptococcus</em>. This group consequently contains all common Gram-negative bacteria, such as <em>Pseudomonas</em> and <em>Legionella</em> and all species within the order Enterobacterales. <strong>Group 2</strong> consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Absidia</em>, <em>Acremonium</em>, <em>Actinotignum</em>, <em>Alternaria</em>, <em>Anaerosalibacter</em>, <em>Apophysomyces</em>, <em>Arachnia</em>, <em>Aspergillus</em>, <em>Aureobacterium</em>, <em>Aureobasidium</em>, <em>Bacteroides</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Blastocystis</em>, <em>Branhamella</em>, <em>Calymmatobacterium</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Catabacter</em>, <em>Chaetomium</em>, <em>Chryseobacterium</em>, <em>Chryseomonas</em>, <em>Chrysonilia</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Conidiobolus</em>, <em>Cryptococcus</em>, <em>Curvularia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Flavobacterium</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Fusobacterium</em>, <em>Hendersonula</em>, <em>Hypomyces</em>, <em>Koserella</em>, <em>Lelliottia</em>, <em>Leptosphaeria</em>, <em>Leptotrichia</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Mycoplasma</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oidiodendron</em>, <em>Phoma</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Prevotella</em>, <em>Pseudallescheria</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Sporobolomyces</em>, <em>Stachybotrys</em>, <em>Stomatococcus</em>, <em>Treponema</em>, <em>Trichoderma</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Tritirachium</em> or <em>Ureaplasma</em>. <strong>Group 3</strong> consists of all other microorganisms.</p>
|
||||
<p>All characters in \(x\) and \(n\) are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.</p>
|
||||
<p>All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., <code>"E. coli"</code> will return the microbial ID of <em>Escherichia coli</em> (\(m = 0.688\), a highly prevalent microorganism found in humans) and not <em>Entamoeba coli</em> (\(m = 0.079\), a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
|
||||
<p>Since <code>AMR</code> version 1.8.1, common microorganism abbreviations are ignored in determining the matching score. These abbreviations are currently: AIEC, ATEC, BORSA, CRSM, DAEC, EAEC, EHEC, EIEC, EPEC, ETEC, GISA, MRPA, MRSA, MRSE, MSSA, MSSE, NMEC, PISP, PRSP, STEC, UPEC, VISA, VISP, VRE, VRSA and VRSP.</p>
|
||||
</div>
|
||||
<div id="stable-lifecycle">
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -208,7 +211,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
<div id="author">
|
||||
<h2>Author</h2>
|
||||
<p>Dr. Matthijs Berends</p>
|
||||
<p>Dr Matthijs Berends</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-examples">
|
||||
@@ -232,7 +235,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with <code><a href="as.mo.html">as.mo()</a></code>, which makes it possible to use microbial abbreviations, codes and names as input. See <em>Examples</em>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mo_name</span><span class="op">(</span><span class="va">x</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mo_name</span><span class="op">(</span><span class="va">x</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">mo_fullname</span><span class="op">(</span><span class="va">x</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
@@ -217,7 +218,8 @@
|
||||
|
||||
<span class="fu">mo_url</span><span class="op">(</span><span class="va">x</span>, open <span class="op">=</span> <span class="cn">FALSE</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">mo_property</span><span class="op">(</span><span class="va">x</span>, property <span class="op">=</span> <span class="st">"fullname"</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">mo_property</span><span class="op">(</span><span class="va">x</span>, property <span class="op">=</span> <span class="st">"fullname"</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -260,7 +262,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -269,7 +271,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
<p>With ambiguous user input in <code><a href="as.mo.html">as.mo()</a></code> and all the <code>mo_*</code> functions, the returned results are chosen based on their matching score using <code><a href="mo_matching_score.html">mo_matching_score()</a></code>. This matching score \(m\), is calculated as:</p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300px" alt="mo matching score"></p>
|
||||
<p><img src="figures/mo_matching_score.png" width="300" alt="mo matching score"></p>
|
||||
<p>where:</p><ul><li><p><i>x</i> is the user input;</p></li>
|
||||
<li><p><i>n</i> is a taxonomic name (genus, species, and subspecies);</p></li>
|
||||
<li><p><i>l<sub>n</sub></i> is the length of <i>n</i>;</p></li>
|
||||
@@ -279,12 +281,13 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</ul><p>The grouping into human pathogenic prevalence (\(p\)) is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence. <strong>Group 1</strong> (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is <em>Enterococcus</em>, <em>Staphylococcus</em> or <em>Streptococcus</em>. This group consequently contains all common Gram-negative bacteria, such as <em>Pseudomonas</em> and <em>Legionella</em> and all species within the order Enterobacterales. <strong>Group 2</strong> consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Absidia</em>, <em>Acremonium</em>, <em>Actinotignum</em>, <em>Alternaria</em>, <em>Anaerosalibacter</em>, <em>Apophysomyces</em>, <em>Arachnia</em>, <em>Aspergillus</em>, <em>Aureobacterium</em>, <em>Aureobasidium</em>, <em>Bacteroides</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Blastocystis</em>, <em>Branhamella</em>, <em>Calymmatobacterium</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Catabacter</em>, <em>Chaetomium</em>, <em>Chryseobacterium</em>, <em>Chryseomonas</em>, <em>Chrysonilia</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Conidiobolus</em>, <em>Cryptococcus</em>, <em>Curvularia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Flavobacterium</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Fusobacterium</em>, <em>Hendersonula</em>, <em>Hypomyces</em>, <em>Koserella</em>, <em>Lelliottia</em>, <em>Leptosphaeria</em>, <em>Leptotrichia</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Mycoplasma</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oidiodendron</em>, <em>Phoma</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Prevotella</em>, <em>Pseudallescheria</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Sporobolomyces</em>, <em>Stachybotrys</em>, <em>Stomatococcus</em>, <em>Treponema</em>, <em>Trichoderma</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Tritirachium</em> or <em>Ureaplasma</em>. <strong>Group 3</strong> consists of all other microorganisms.</p>
|
||||
<p>All characters in \(x\) and \(n\) are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.</p>
|
||||
<p>All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., <code>"E. coli"</code> will return the microbial ID of <em>Escherichia coli</em> (\(m = 0.688\), a highly prevalent microorganism found in humans) and not <em>Entamoeba coli</em> (\(m = 0.079\), a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
|
||||
<p>Since <code>AMR</code> version 1.8.1, common microorganism abbreviations are ignored in determining the matching score. These abbreviations are currently: AIEC, ATEC, BORSA, CRSM, DAEC, EAEC, EHEC, EIEC, EPEC, ETEC, GISA, MRPA, MRSA, MRSE, MSSA, MSSE, NMEC, PISP, PRSP, STEC, UPEC, VISA, VISP, VRE, VRSA and VRSP.</p>
|
||||
</div>
|
||||
<div id="catalogue-of-life">
|
||||
<h2>Catalogue of Life</h2>
|
||||
|
||||
|
||||
<p><img src="figures/logo_col.png" height="40px" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
|
||||
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
|
||||
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
</div>
|
||||
@@ -434,7 +437,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,12 +163,14 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<p>This is <strong>the fastest way</strong> to have your organisation (or analysis) specific codes picked up and translated by this package, since you don't have to bother about it again after setting it up once.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">set_mo_source</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">set_mo_source</span><span class="op">(</span>
|
||||
<span class="va">path</span>,
|
||||
destination <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_mo_source"</span>, <span class="st">"~/mo_source.rds"</span><span class="op">)</span>
|
||||
<span class="op">)</span>
|
||||
|
||||
<span class="fu">get_mo_source</span><span class="op">(</span>destination <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_mo_source"</span>, <span class="st">"~/mo_source.rds"</span><span class="op">)</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">get_mo_source</span><span class="op">(</span>destination <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_mo_source"</span>, <span class="st">"~/mo_source.rds"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -246,7 +248,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -269,7 +271,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Performs a principal component analysis (PCA) based on a data set with automatic determination for afterwards plotting the groups and labels, and automatic filtering on only suitable (i.e. non-empty and numeric) variables.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">pca</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">pca</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
<span class="va">...</span>,
|
||||
retx <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
@@ -169,7 +170,8 @@
|
||||
scale. <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
tol <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
rank. <span class="op">=</span> <span class="cn">NULL</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -220,7 +222,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -268,7 +270,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Functions to plot classes <code>rsi</code>, <code>mic</code> and <code>disk</code>, with support for base <span style="R">R</span> and <code>ggplot2</code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="co"># S3 method for mic</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="co"># S3 method for mic</span>
|
||||
<span class="fu">plot</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
mo <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
@@ -248,7 +249,8 @@
|
||||
<span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for rsi</span>
|
||||
<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/fortify.html" class="external-link">fortify</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/fortify.html" class="external-link">fortify</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -288,7 +290,7 @@ The <code><a href="https://ggplot2.tidyverse.org/reference/fortify.html" class="
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -334,7 +336,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,8 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<p><code>resistance()</code> should be used to calculate resistance, <code>susceptibility()</code> should be used to calculate susceptibility.<br></p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">resistance</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">resistance</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">susceptibility</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
@@ -195,7 +196,8 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
as_percent <span class="op">=</span> <span class="cn">FALSE</span>,
|
||||
combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
combine_IR <span class="op">=</span> <span class="cn">FALSE</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="source">
|
||||
<h2>Source</h2>
|
||||
@@ -267,7 +269,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -383,7 +385,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,11 +161,13 @@
|
||||
<p>These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice. By providing a microorganism and antimicrobial agent, the generated results will reflect reality as much as possible.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">random_mic</span><span class="op">(</span>size <span class="op">=</span> <span class="cn">NULL</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">random_mic</span><span class="op">(</span>size <span class="op">=</span> <span class="cn">NULL</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">random_disk</span><span class="op">(</span>size <span class="op">=</span> <span class="cn">NULL</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span>
|
||||
|
||||
<span class="fu">random_rsi</span><span class="op">(</span>size <span class="op">=</span> <span class="cn">NULL</span>, prob_RSI <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.33</span>, <span class="fl">0.33</span>, <span class="fl">0.33</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">random_rsi</span><span class="op">(</span>size <span class="op">=</span> <span class="cn">NULL</span>, prob_RSI <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.33</span>, <span class="fl">0.33</span>, <span class="fl">0.33</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -193,7 +195,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -234,7 +236,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,8 @@
|
||||
<p>Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns <code>se_min</code> and <code>se_max</code>. See <em>Examples</em> for a real live example.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">resistance_predict</span><span class="op">(</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">resistance_predict</span><span class="op">(</span>
|
||||
<span class="va">x</span>,
|
||||
<span class="va">col_ab</span>,
|
||||
col_date <span class="op">=</span> <span class="cn">NULL</span>,
|
||||
@@ -207,7 +208,8 @@
|
||||
main <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"Resistance Prediction of"</span>, <span class="va">x_name</span><span class="op">)</span>,
|
||||
ribbon <span class="op">=</span> <span class="cn">TRUE</span>,
|
||||
<span class="va">...</span>
|
||||
<span class="op">)</span></code></pre></div></div>
|
||||
<span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -263,7 +265,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -360,7 +362,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -18,7 +18,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,8 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
|
||||
<p>When negative ('left-skewed'): the left tail is longer; the mass of the distribution is concentrated on the right of a histogram. When positive ('right-skewed'): the right tail is longer; the mass of the distribution is concentrated on the left of a histogram. A normal distribution has a skewness of 0.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for default</span>
|
||||
<span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
@@ -172,7 +173,8 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
|
||||
<span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
|
||||
|
||||
<span class="co"># S3 method for data.frame</span>
|
||||
<span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div></div>
|
||||
<span class="fu">skewness</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="arguments">
|
||||
<h2>Arguments</h2>
|
||||
@@ -185,7 +187,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -212,7 +214,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
<p>For language-dependent output of AMR functions, like <code><a href="mo_property.html">mo_name()</a></code>, <code><a href="mo_property.html">mo_gramstain()</a></code>, <code><a href="mo_property.html">mo_type()</a></code> and <code><a href="ab_property.html">ab_name()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div id="ref-usage">Usage,<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">get_AMR_locale</span><span class="op">(</span><span class="op">)</span></code></pre></div></div>
|
||||
<div id="ref-usage">
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">get_AMR_locale</span><span class="op">(</span><span class="op">)</span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div id="details">
|
||||
<h2>Details</h2>
|
||||
@@ -181,7 +183,7 @@
|
||||
<h2>Stable Lifecycle</h2>
|
||||
|
||||
|
||||
<p><img src="figures/lifecycle_stable.svg" style="margin-bottom:5px"><br>
|
||||
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
|
||||
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||||
</div>
|
||||
@@ -239,7 +241,7 @@ The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -17,7 +17,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="Released version">1.8.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
@@ -142,14 +142,12 @@ if [ $lazy == "FALSE" ]; then
|
||||
Rscript -e "devtools::install(quiet = TRUE, dependencies = FALSE)"
|
||||
Rscript -e "suppressMessages(pkgdown::build_site(lazy = FALSE, examples = FALSE, install = FALSE))"
|
||||
else
|
||||
# always build home page
|
||||
Rscript -e "pkgdown::build_home()"
|
||||
if ! git diff --quiet man; then
|
||||
# documentation has changed
|
||||
Rscript -e "pkgdown::build_reference(lazy = $lazy, examples = FALSE)"
|
||||
fi
|
||||
if ! git diff --quiet index.md; then
|
||||
# home page has changed
|
||||
Rscript -e "pkgdown::build_home()"
|
||||
fi
|
||||
if ! git diff --quiet NEWS.md; then
|
||||
# news has changed
|
||||
Rscript -e "pkgdown::build_news()"
|
||||
|
||||
2
index.md
2
index.md
@@ -67,7 +67,7 @@ The development of this package is part of, related to, or made possible by:
|
||||
<a href="https://www.rug.nl" title="University of Groningen"><img src="./logo_rug.png" class="partner_logo"></a>
|
||||
<a href="https://www.umcg.nl" title="University Medical Center Groningen"><img src="./logo_umcg.png" class="partner_logo"></a>
|
||||
<a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice Foundation"><img src="./logo_certe.png" class="partner_logo"></a>
|
||||
<a href="http://www.eurhealth-1health.eu" title="EurHealth-1-Health"><img src="./logo_eh1h.png" class="partner_logo"></a>
|
||||
<a href="https://www.deutschland-nederland.eu" title="EurHealth-1-Health"><img src="./logo_eh1h.png" class="partner_logo"></a>
|
||||
<a href="https://www.deutschland-nederland.eu" title="INTERREG"><img src="./logo_interreg.png" class="partner_logo"></a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -87,8 +87,9 @@ expect_identical(
|
||||
"Sthafilokkockus aureeuzz",
|
||||
"Staphylococcus aureus",
|
||||
"MRSA",
|
||||
"VISA")))),
|
||||
rep("B_STPHY_AURS", 9))
|
||||
"VISA",
|
||||
"meth.-resis. S. aureus (MRSA)")))),
|
||||
rep("B_STPHY_AURS", 10))
|
||||
expect_identical(
|
||||
as.character(
|
||||
as.mo(c("EHEC", "EPEC", "EIEC", "STEC", "ATEC", "UPEC"))),
|
||||
@@ -243,7 +244,7 @@ expect_stdout(print(mo_uncertainties()))
|
||||
expect_equal(suppressMessages(as.mo(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A"))),
|
||||
as.mo(c("Salmonella enterica", "Salmonella enterica", "Salmonella")))
|
||||
|
||||
# no virusses
|
||||
# no viruses
|
||||
expect_equal(as.character(as.mo("Virus")), NA_character_)
|
||||
|
||||
# summary
|
||||
|
||||
@@ -39,6 +39,7 @@ if (AMR:::pkg_is_available("ggplot2")) {
|
||||
}
|
||||
expect_stdout(print(as.rsi(c("S", "I", "R"))))
|
||||
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
||||
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
||||
expect_equal(suppressWarnings(as.logical(as.rsi("INVALID VALUE"))), NA)
|
||||
expect_equal(summary(as.rsi(c("S", "R"))),
|
||||
structure(c("Class" = "rsi",
|
||||
@@ -63,7 +64,7 @@ if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) {
|
||||
|
||||
expect_stdout(print(tibble(ab = as.rsi("S"))))
|
||||
}
|
||||
if (AMR:::pkg_is_available("skimr")) {
|
||||
if (AMR:::pkg_is_available("skimr", min_version = "2.0.0")) {
|
||||
expect_inherits(skim(example_isolates),
|
||||
"data.frame")
|
||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) {
|
||||
@@ -75,6 +76,7 @@ if (AMR:::pkg_is_available("skimr")) {
|
||||
}
|
||||
}
|
||||
|
||||
expect_equal(as.rsi(c("", "-", NA, "NULL")), c(NA_rsi_, NA_rsi_, NA_rsi_, NA_rsi_))
|
||||
|
||||
# S. pneumoniae/ampicillin in EUCAST 2020: 0.5-2 ug/ml (R is only > 2)
|
||||
expect_equal(as.character(
|
||||
|
||||
@@ -8,7 +8,7 @@ These functions are so-called '\link{Deprecated}'. \strong{They will be removed
|
||||
}
|
||||
\section{Retired Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ All antimicrobial drugs and their official names, ATC codes, ATC groups and defi
|
||||
}
|
||||
\section{WHOCC}{
|
||||
|
||||
\if{html}{\figure{logo_who.png}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{logo_who.png}{options: height="60" style=margin-bottom:"5"} \cr}
|
||||
This package contains \strong{all ~550 antibiotic, antimycotic and antiviral drugs} and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, \url{https://www.whocc.no}) and the Pharmaceuticals Community Register of the European Commission (\url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm}).
|
||||
|
||||
These have become the gold standard for international drug utilisation monitoring and research.
|
||||
|
||||
@@ -59,7 +59,7 @@ With using \code{collapse}, this function will return a \link{character}:\cr
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
|
||||
@@ -97,7 +97,7 @@ The function \code{\link[=set_ab_names]{set_ab_names()}} is a special column ren
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
|
||||
@@ -30,7 +30,7 @@ This function vectorises over both \code{x} and \code{reference}, meaning that e
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
|
||||
@@ -35,7 +35,7 @@ The default is to split on young children (0-11), youth (12-24), young adults (2
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
|
||||
@@ -166,7 +166,7 @@ The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function c
|
||||
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
|
||||
@@ -80,7 +80,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
|
||||
|
||||
\section{WHOCC}{
|
||||
|
||||
\if{html}{\figure{logo_who.png}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{logo_who.png}{options: height="60" style=margin-bottom:"5"} \cr}
|
||||
This package contains \strong{all ~550 antibiotic, antimycotic and antiviral drugs} and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, \url{https://www.whocc.no}) and the Pharmaceuticals Community Register of the European Commission (\url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm}).
|
||||
|
||||
These have become the gold standard for international drug utilisation monitoring and research.
|
||||
|
||||
@@ -49,7 +49,7 @@ European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{htt
|
||||
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:"5"} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
|
||||
|
||||
If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
|
||||
@@ -57,7 +57,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
|
||||
|
||||
\section{WHOCC}{
|
||||
|
||||
\if{html}{\figure{logo_who.png}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
\if{html}{\figure{logo_who.png}{options: height="60" style=margin-bottom:"5"} \cr}
|
||||
This package contains \strong{all ~550 antibiotic, antimycotic and antiviral drugs} and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, \url{https://www.whocc.no}) and the Pharmaceuticals Community Register of the European Commission (\url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm}).
|
||||
|
||||
These have become the gold standard for international drug utilisation monitoring and research.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user