Compare commits

..

4 Commits

197 changed files with 1284 additions and 768 deletions

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -120,7 +120,7 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE) sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0} shell: Rscript {0}
- name: Run Check - name: Run R CMD check
env: env:
_R_CHECK_CRAN_INCOMING_: false _R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 1.4.0.9045 Version: 1.4.0.9049
Date: 2020-12-25 Date: 2020-12-27
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person(role = c("aut", "cre"), person(role = c("aut", "cre"),
@ -29,6 +29,8 @@ Authors@R: c(
family = "Meijer", given = c("Bart", "C."), email = "b.meijerg@certe.nl"), family = "Meijer", given = c("Bart", "C."), email = "b.meijerg@certe.nl"),
person(role = "ctb", person(role = "ctb",
family = "Ny", given = "Sofia", email = "sofia.ny@folkhalsomyndigheten.se"), family = "Ny", given = "Sofia", email = "sofia.ny@folkhalsomyndigheten.se"),
person(role = "ctb",
family = "Schade", given = c("Rogier", "P."), email = "r.schade@amsterdamumc.nl"),
person(role = "ctb", person(role = "ctb",
family = "Souverein", given = "Dennis", email = "d.souvereing@streeklabhaarlem.nl"), family = "Souverein", given = "Dennis", email = "d.souvereing@streeklabhaarlem.nl"),
person(role = "ctb", person(role = "ctb",

View File

@ -137,6 +137,7 @@ export(fluoroquinolones)
export(full_join_microorganisms) export(full_join_microorganisms)
export(g.test) export(g.test)
export(geom_rsi) export(geom_rsi)
export(get_episode)
export(get_locale) export(get_locale)
export(get_mo_source) export(get_mo_source)
export(ggplot_pca) export(ggplot_pca)

12
NEWS.md
View File

@ -1,9 +1,8 @@
# AMR 1.4.0.9045 # AMR 1.4.0.9049
## <small>Last updated: 25 December 2020</small> ## <small>Last updated: 27 December 2020</small>
### New ### New
* Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package: * Functions `get_episode()` and `is_new_episode()` to determine (patient) episodes which are not necessarily based on microorganisms. The `get_episode()` function returns the index number of the episode per group, while the `is_new_episode()` function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode. They also support `dplyr`s grouping (i.e. using `group_by()`):
```r ```r
library(dplyr) library(dplyr)
example_isolates %>% example_isolates %>%
@ -15,6 +14,7 @@
* Functions `random_mic()`, `random_disk()` and `random_rsi()` for random number generation. They take microorganism names and antibiotic names as input to make generation more realistic. * Functions `random_mic()`, `random_disk()` and `random_rsi()` for random number generation. They take microorganism names and antibiotic names as input to make generation more realistic.
### Changed ### Changed
* New argument `ampc_cephalosporin_resistance` in `eucast_rules()` to correct for AmpC de-repressed cephalosporin-resistant mutants
* Interpretation of antimicrobial resistance - `as.rsi()`: * Interpretation of antimicrobial resistance - `as.rsi()`:
* Reference data used for `as.rsi()` can now be set by the user, using the `reference_data` argument. This allows for using own interpretation guidelines. The user-set data must have the same structure as `rsi_translation`. * Reference data used for `as.rsi()` can now be set by the user, using the `reference_data` argument. This allows for using own interpretation guidelines. The user-set data must have the same structure as `rsi_translation`.
* Better determination of disk zones and MIC values when running `as.rsi()` on a data.frame * Better determination of disk zones and MIC values when running `as.rsi()` on a data.frame
@ -23,7 +23,6 @@
* If using `as.rsi()` on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this * If using `as.rsi()` on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this
* Fix for using `as.rsi()` on a `data.frame` that only contains one column for antibiotic interpretations * Fix for using `as.rsi()` on a `data.frame` that only contains one column for antibiotic interpretations
* Some functions are now context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the data argument does not need to be set anymore. This is the case for the new functions `mo_is_gram_negative()`, `mo_is_gram_positive()`, `mo_is_intrinsic_resistant()` and for the existing functions `first_isolate()`, `key_antibiotics()`, `mdro()`, `brmo()`, `mrgn()`, `mdr_tb()`, `mdr_cmi2012()`, `eucast_exceptional_phenotypes()`. This was already the case for antibiotic selection functions (such as using `penicillins()` in `dplyr::select()`). * Some functions are now context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the data argument does not need to be set anymore. This is the case for the new functions `mo_is_gram_negative()`, `mo_is_gram_positive()`, `mo_is_intrinsic_resistant()` and for the existing functions `first_isolate()`, `key_antibiotics()`, `mdro()`, `brmo()`, `mrgn()`, `mdr_tb()`, `mdr_cmi2012()`, `eucast_exceptional_phenotypes()`. This was already the case for antibiotic selection functions (such as using `penicillins()` in `dplyr::select()`).
```r ```r
# to select first isolates that are Gram-negative # to select first isolates that are Gram-negative
# and view results of cephalosporins and aminoglycosides: # and view results of cephalosporins and aminoglycosides:
@ -52,7 +51,8 @@
### Other ### Other
* All messages and warnings thrown by this package now break sentences on whole words * All messages and warnings thrown by this package now break sentences on whole words
* More extensive unit tests * More extensive unit tests
* Internal calls to `options()` were all removed in favour of a new internal environment `mo_env` * Internal calls to `options()` were all removed in favour of a new internal environment `pkg_env`
* Added Dr. Rogier Schade as contributor
# AMR 1.4.0 # AMR 1.4.0

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -536,22 +536,39 @@ get_current_data <- function(arg_name, call) {
call = call - 4)) call = call - 4))
} }
get_root_env_address <- function() { unique_call_id <- function() {
sub("<environment: (.*)>", "\\1", utils::capture.output(sys.frames()[[1]])) # combination of environment ID (like "0x7fed4ee8c848")
# and highest system call
c(envir = gsub("<environment: (.*)>", "\\1", utils::capture.output(sys.frames()[[1]])),
call = paste0(deparse(sys.calls()[[1]]), collapse = ""))
} }
remember_thrown_message <- function(fn) { remember_thrown_message <- function(fn) {
assign(x = paste0("address_", fn), # this is to prevent that messages/notes will be printed for every dplyr group
value = get_root_env_address(), # e.g. this would show a msg 4 times: example_isolates %>% group_by(hospital_id) %>% filter(mo_is_gram_negative())
envir = mo_env) assign(x = paste0("uniquecall_", fn),
value = unique_call_id(),
envir = pkg_env)
} }
message_not_thrown_before <- function(fn) { message_not_thrown_before <- function(fn) {
is.null(mo_env[[paste0("address_", fn)]]) || !identical(mo_env[[paste0("address_", fn)]], get_root_env_address()) is.null(pkg_env[[paste0("uniquecall_", fn)]]) || !identical(pkg_env[[paste0("uniquecall_", fn)]], unique_call_id())
}
reset_all_thrown_messages <- function() {
# for unit tests, where the environment and highest system call do not change
pkg_env_contents <- ls(envir = pkg_env)
rm(list = pkg_env_contents[pkg_env_contents %like% "^uniquecall_"],
envir = pkg_env)
} }
has_colour <- function() { has_colour <- function() {
# this is a base R version of crayon::has_color # this is a base R version of crayon::has_color, but disables colours on emacs
if (Sys.getenv("EMACS") != "" || Sys.getenv("INSIDE_EMACS") != "") {
# disable on emacs, only supports 8 colours
return(FALSE)
}
enabled <- getOption("crayon.enabled") enabled <- getOption("crayon.enabled")
if (!is.null(enabled)) { if (!is.null(enabled)) {
return(isTRUE(enabled)) return(isTRUE(enabled))
@ -581,20 +598,6 @@ has_colour <- function() {
} }
return(FALSE) return(FALSE)
} }
emacs_version <- function() {
ver <- Sys.getenv("INSIDE_EMACS")
if (ver == "") {
return(NA_integer_)
}
ver <- gsub("'", "", ver)
ver <- strsplit(ver, ",", fixed = TRUE)[[1]]
ver <- strsplit(ver, ".", fixed = TRUE)[[1]]
as.numeric(ver)
}
if ((Sys.getenv("EMACS") != "" || Sys.getenv("INSIDE_EMACS") != "") &&
!is.na(emacs_version()[1]) && emacs_version()[1] >= 23) {
return(TRUE)
}
if ("COLORTERM" %in% names(Sys.getenv())) { if ("COLORTERM" %in% names(Sys.getenv())) {
return(TRUE) return(TRUE)
} }
@ -656,6 +659,15 @@ font_grey_bg <- function(..., collapse = " ") {
font_green_bg <- function(..., collapse = " ") { font_green_bg <- function(..., collapse = " ") {
try_colour(..., before = "\033[42m", after = "\033[49m", collapse = collapse) try_colour(..., before = "\033[42m", after = "\033[49m", collapse = collapse)
} }
font_rsi_R_bg <- function(..., collapse = " ") {
try_colour(..., before = "\033[48;5;202m", after = "\033[49m", collapse = collapse)
}
font_rsi_S_bg <- function(..., collapse = " ") {
try_colour(..., before = "\033[48;5;76m", after = "\033[49m", collapse = collapse)
}
font_rsi_I_bg <- function(..., collapse = " ") {
try_colour(..., before = "\033[48;5;148m", after = "\033[49m", collapse = collapse)
}
font_red_bg <- function(..., collapse = " ") { font_red_bg <- function(..., collapse = " ") {
try_colour(..., before = "\033[41m", after = "\033[49m", collapse = collapse) try_colour(..., before = "\033[41m", after = "\033[49m", collapse = collapse)
} }

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

2
R/ab.R
View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -25,26 +25,34 @@
#' Determine (new) episodes for patients #' Determine (new) episodes for patients
#' #'
#' This function determines which items in a vector can be considered (the start of) a new episode, based on the argument `episode_days`. This can be used to determine clinical episodes for any epidemiological analysis. #' These functions determine which items in a vector can be considered (the start of) a new episode, based on the argument `episode_days`. This can be used to determine clinical episodes for any epidemiological analysis. The [get_episode()] function returns the index number of the episode per group, while the [is_new_episode()] function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode.
#' @inheritSection lifecycle Stable lifecycle #' @inheritSection lifecycle Stable lifecycle
#' @param x vector of dates (class `Date` or `POSIXt`) #' @param x vector of dates (class `Date` or `POSIXt`)
#' @param episode_days length of the required episode in days, defaults to 365. Every element in the input will return `TRUE` after this number of days has passed since the last included date, independent of calendar years. Please see *Details*. #' @param episode_days length of the required episode in days, please see *Details*
#' @param ... arguments passed on to [as.Date()] #' @param ... arguments passed on to [as.Date()]
#' @details #' @details
#' Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least `episode_days` days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least `episode_days` days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored. #' Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least `episode_days` days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least `episode_days` days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored.
#' #'
#' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but more efficient for data sets containing microorganism codes or names. #' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but is more efficient for data sets containing microorganism codes or names.
#' #'
#' The `dplyr` package is not required for this function to work, but this function works conveniently inside `dplyr` verbs such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()]. #' The `dplyr` package is not required for these functions to work, but these functions support [variable grouping][dplyr::group_by()] and work conveniently inside `dplyr` verbs such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
#' @return a [logical] vector #' @return
#' * [get_episode()]: a [double] vector
#' * [is_new_episode()]: a [logical] vector
#' @seealso [first_isolate()]
#' @rdname get_episode
#' @export #' @export
#' @inheritSection AMR Read more on our website! #' @inheritSection AMR Read more on our website!
#' @examples #' @examples
#' # `example_isolates` is a dataset available in the AMR package. #' # `example_isolates` is a dataset available in the AMR package.
#' # See ?example_isolates. #' # See ?example_isolates.
#' #'
#' is_new_episode(example_isolates$date) #' get_episode(example_isolates$date, episode_days = 60)
#' is_new_episode(example_isolates$date, episode_days = 60) #' is_new_episode(example_isolates$date, episode_days = 60)
#'
#' # filter on results from the third 60-day episode only, using base R
#' example_isolates[which(get_episode(example_isolates$date, 60) == 3), ]
#'
#' \donttest{ #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' # is_new_episode() can also be used in dplyr verbs to determine patient #' # is_new_episode() can also be used in dplyr verbs to determine patient
@ -54,7 +62,15 @@
#' size = 2000, #' size = 2000,
#' replace = TRUE)) %>% #' replace = TRUE)) %>%
#' group_by(condition) %>% #' group_by(condition) %>%
#' mutate(new_episode = is_new_episode(date)) #' mutate(new_episode = is_new_episode(date, 365))
#'
#' example_isolates %>%
#' group_by(hospital_id, patient_id) %>%
#' transmute(date,
#' patient_id,
#' new_index = get_episode(date, 60),
#' new_logical = is_new_episode(date, 60))
#'
#' #'
#' example_isolates %>% #' example_isolates %>%
#' group_by(hospital_id) %>% #' group_by(hospital_id) %>%
@ -71,7 +87,7 @@
#' #'
#' y <- example_isolates %>% #' y <- example_isolates %>%
#' group_by(patient_id, mo) %>% #' group_by(patient_id, mo) %>%
#' filter(is_new_episode(date)) #' filter(is_new_episode(date, 365))
#' #'
#' identical(x$patient_id, y$patient_id) #' identical(x$patient_id, y$patient_id)
#' #'
@ -79,21 +95,52 @@
#' # since you can now group on anything that seems relevant: #' # since you can now group on anything that seems relevant:
#' example_isolates %>% #' example_isolates %>%
#' group_by(patient_id, mo, hospital_id, ward_icu) %>% #' group_by(patient_id, mo, hospital_id, ward_icu) %>%
#' mutate(flag_episode = is_new_episode(date)) #' mutate(flag_episode = is_new_episode(date, 365))
#' } #' }
#' } #' }
is_new_episode <- function(x, episode_days = 365, ...) { get_episode <- function(x, episode_days, ...) {
meet_criteria(x, allow_class = c("Date", "POSIXt")) meet_criteria(x, allow_class = c("Date", "POSIXt"))
meet_criteria(episode_days, allow_class = c("numeric", "double", "integer"), has_length = 1) meet_criteria(episode_days, allow_class = c("numeric", "double", "integer"), has_length = 1)
exec_episode(type = "sequential",
x = x,
episode_days = episode_days,
... = ...)
}
#' @rdname get_episode
#' @export
is_new_episode <- function(x, episode_days, ...) {
meet_criteria(x, allow_class = c("Date", "POSIXt"))
meet_criteria(episode_days, allow_class = c("numeric", "double", "integer"), has_length = 1)
exec_episode(type = "logical",
x = x,
episode_days = episode_days,
... = ...)
}
exec_episode <- function(type, x, episode_days, ...) {
x <- as.double(as.Date(x, ...)) # as.Date() for POSIX classes x <- as.double(as.Date(x, ...)) # as.Date() for POSIX classes
if (length(x) == 1) { if (length(x) == 1) {
if (type == "logical") {
return(TRUE) return(TRUE)
} else if (type == "sequential") {
return(1)
}
} else if (length(x) == 2) { } else if (length(x) == 2) {
if (max(x) - min(x) >= episode_days) { if (max(x) - min(x) >= episode_days) {
if (type == "logical") {
return(c(TRUE, TRUE)) return(c(TRUE, TRUE))
} else if (type == "sequential") {
return(c(1, 2))
}
} else { } else {
if (type == "logical") {
return(c(TRUE, FALSE)) return(c(TRUE, FALSE))
} else if (type == "sequential") {
return(c(1, 1))
}
} }
} }
@ -107,13 +154,22 @@ is_new_episode <- function(x, episode_days = 365, ...) {
for (i in 2:length(x)) { for (i in 2:length(x)) {
if (isTRUE((x[i] - start) >= episode_days)) { if (isTRUE((x[i] - start) >= episode_days)) {
ind <- ind + 1 ind <- ind + 1
if (type == "logical") {
indices[ind] <- i indices[ind] <- i
}
start <- x[i] start <- x[i]
} }
if (type == "sequential") {
indices[i] <- ind
} }
}
if (type == "logical") {
result <- rep(FALSE, length(x)) result <- rep(FALSE, length(x))
result[indices] <- TRUE result[indices] <- TRUE
result result
} else if (type == "sequential") {
indices
}
} }
df <- data.frame(x = x, df <- data.frame(x = x,

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -64,6 +64,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
#' @param verbose a [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time. #' @param verbose a [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.
#' @param version_breakpoints the version number to use for the EUCAST Clinical Breakpoints guideline. Currently supported: `r paste0(names(EUCAST_VERSION_BREAKPOINTS), collapse = ", ")`. #' @param version_breakpoints the version number to use for the EUCAST Clinical Breakpoints guideline. Currently supported: `r paste0(names(EUCAST_VERSION_BREAKPOINTS), collapse = ", ")`.
#' @param version_expertrules the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Currently supported: `r paste0(names(EUCAST_VERSION_EXPERT_RULES), collapse = ", ")`. #' @param version_expertrules the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Currently supported: `r paste0(names(EUCAST_VERSION_EXPERT_RULES), collapse = ", ")`.
#' @param ampc_cephalosporin_resistance a character value that should be applied for AmpC de-repressed cephalosporin-resistant mutants, defaults to `NA`. Currently only works when `version_expertrules` is `3.2`; '*EUCAST Expert Rules v3.2 on Enterobacterales*' states that susceptible (S) results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these agents. A value of `NA` for this argument will remove results for these agents, while e.g. a value of `"R"` will make the results for these agents resistant. Use `NULL` to not alter the results for AmpC de-repressed cephalosporin-resistant mutants. \cr For *EUCAST Expert Rules* v3.2, this rule applies to: *`r gsub("|", "*, *", gsub("[)(^)]", "", eucast_rules_file[which(eucast_rules_file$reference.version == 3.2 & eucast_rules_file$reference.rule %like% "ampc"), "this_value"][1]), fixed = TRUE)`*.
#' @param ... column name of an antibiotic, please see section *Antibiotics* below #' @param ... column name of an antibiotic, please see section *Antibiotics* below
#' @inheritParams first_isolate #' @inheritParams first_isolate
#' @details #' @details
@ -149,6 +150,7 @@ eucast_rules <- function(x,
verbose = FALSE, verbose = FALSE,
version_breakpoints = 10.0, version_breakpoints = 10.0,
version_expertrules = 3.2, version_expertrules = 3.2,
ampc_cephalosporin_resistance = NA,
...) { ...) {
meet_criteria(x, allow_class = "data.frame") meet_criteria(x, allow_class = "data.frame")
meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE) meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE)
@ -157,6 +159,7 @@ eucast_rules <- function(x,
meet_criteria(verbose, allow_class = "logical", has_length = 1) meet_criteria(verbose, allow_class = "logical", has_length = 1)
meet_criteria(version_breakpoints, allow_class = "numeric", has_length = 1) meet_criteria(version_breakpoints, allow_class = "numeric", has_length = 1)
meet_criteria(version_expertrules, allow_class = "numeric", has_length = 1) meet_criteria(version_expertrules, allow_class = "numeric", has_length = 1)
meet_criteria(ampc_cephalosporin_resistance, allow_class = c("rsi", "character"), has_length = 1, allow_NA = TRUE, allow_NULL = TRUE, is_in = c("R", "S", "I"))
x_deparsed <- deparse(substitute(x)) x_deparsed <- deparse(substitute(x))
if (length(x_deparsed) > 1 || !all(x_deparsed %like% "[a-z]+")) { if (length(x_deparsed) > 1 || !all(x_deparsed %like% "[a-z]+")) {
@ -731,7 +734,7 @@ eucast_rules <- function(x,
# Official EUCAST rules --------------------------------------------------- # Official EUCAST rules ---------------------------------------------------
eucast_notification_shown <- FALSE eucast_notification_shown <- FALSE
if (!is.null(list(...)$eucast_rules_df)) { if (!is.null(list(...)$eucast_rules_df)) {
# this allows: eucast_rules(x, eucast_rules_df = AMR:::eucast_rules_file %pm>% filter(is.na(have_these_values))) # this allows: eucast_rules(x, eucast_rules_df = AMR:::eucast_rules_file %>% filter(is.na(have_these_values)))
eucast_rules_df <- list(...)$eucast_rules_df eucast_rules_df <- list(...)$eucast_rules_df
} else { } else {
# otherwise internal data file, created in data-raw/internals.R # otherwise internal data file, created in data-raw/internals.R
@ -749,6 +752,13 @@ eucast_rules <- function(x,
!reference.rule_group %like% "expert" | !reference.rule_group %like% "expert" |
(reference.rule_group %like% "expert" & reference.version == version_expertrules)) (reference.rule_group %like% "expert" & reference.version == version_expertrules))
} }
# filter out AmpC de-repressed cephalosporin-resistant mutants ----
if (is.null(ampc_cephalosporin_resistance)) {
eucast_rules_df <- subset(eucast_rules_df,
!reference.rule %like% "ampc")
} else {
eucast_rules_df[which(eucast_rules_df$reference.rule %like% "ampc"), "to_value"] <- as.character(ampc_cephalosporin_resistance)
}
for (i in seq_len(nrow(eucast_rules_df))) { for (i in seq_len(nrow(eucast_rules_df))) {
@ -946,7 +956,7 @@ eucast_rules <- function(x,
by = c(".rowid" = "rowid")) %pm>% by = c(".rowid" = "rowid")) %pm>%
pm_select(-`.rowid`) %pm>% pm_select(-`.rowid`) %pm>%
pm_select(row, pm_everything()) %pm>% pm_select(row, pm_everything()) %pm>%
pm_filter(!is.na(new)) %pm>% pm_filter(!is.na(new) | is.na(new) & !is.na(old)) %pm>%
pm_arrange(row, rule_group, rule_name, col) pm_arrange(row, rule_group, rule_name, col)
rownames(verbose_info) <- NULL rownames(verbose_info) <- NULL
} }
@ -1007,6 +1017,7 @@ eucast_rules <- function(x,
if (total_n_changed > 0) { if (total_n_changed > 0) {
changed_summary <- verbose_info %pm>% changed_summary <- verbose_info %pm>%
pm_filter(!is.na(old)) %pm>% pm_filter(!is.na(old)) %pm>%
pm_mutate(new = ifelse(is.na(new), "NA", new)) %pm>%
pm_count(old, new, name = "n") pm_count(old, new, name = "n")
cat(paste(" -", cat(paste(" -",
paste0(formatnr(changed_summary$n), " test result", ifelse(changed_summary$n > 1, "s", ""), " changed from ", paste0(formatnr(changed_summary$n), " test result", ifelse(changed_summary$n > 1, "s", ""), " changed from ",
@ -1134,7 +1145,7 @@ edit_rsi <- function(x,
stringsAsFactors = FALSE) stringsAsFactors = FALSE)
colnames(verbose_new) <- c("rowid", "col", "mo_fullname", "old", "new", colnames(verbose_new) <- c("rowid", "col", "mo_fullname", "old", "new",
"rule", "rule_group", "rule_name", "rule_source") "rule", "rule_group", "rule_name", "rule_source")
verbose_new <- verbose_new %pm>% pm_filter(old != new | is.na(old)) verbose_new <- verbose_new %pm>% pm_filter(old != new | is.na(old) | is.na(new) & !is.na(old))
# save changes to data set 'verbose_info' # save changes to data set 'verbose_info'
track_changes$verbose_info <- rbind(track_changes$verbose_info, track_changes$verbose_info <- rbind(track_changes$verbose_info,
verbose_new, verbose_new,

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -60,6 +60,7 @@ globalVariables(c(".rowid",
"old_name", "old_name",
"pattern", "pattern",
"R", "R",
"reference.rule",
"reference.rule_group", "reference.rule_group",
"reference.version", "reference.version",
"rsi_translation", "rsi_translation",

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

60
R/mo.R
View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -361,11 +361,11 @@ exec_as.mo <- function(x,
# keep track of time - give some hints to improve speed if it takes a long time # keep track of time - give some hints to improve speed if it takes a long time
start_time <- Sys.time() start_time <- Sys.time()
mo_env$mo_failures <- NULL pkg_env$mo_failures <- NULL
mo_env$mo_uncertainties <- NULL pkg_env$mo_uncertainties <- NULL
mo_env$mo_renamed <- NULL pkg_env$mo_renamed <- NULL
} }
mo_env$mo_renamed_last_run <- NULL pkg_env$mo_renamed_last_run <- NULL
failures <- character(0) failures <- character(0)
uncertainty_level <- translate_allow_uncertain(allow_uncertain) uncertainty_level <- translate_allow_uncertain(allow_uncertain)
@ -598,7 +598,7 @@ exec_as.mo <- function(x,
} else { } else {
x[i] <- lookup(fullname == found["fullname_new"], haystack = MO_lookup) x[i] <- lookup(fullname == found["fullname_new"], haystack = MO_lookup)
} }
mo_env$mo_renamed_last_run <- found["fullname"] pkg_env$mo_renamed_last_run <- found["fullname"]
was_renamed(name_old = found["fullname"], was_renamed(name_old = found["fullname"],
name_new = lookup(fullname == found["fullname_new"], "fullname", haystack = MO_lookup), name_new = lookup(fullname == found["fullname_new"], "fullname", haystack = MO_lookup),
ref_old = found["ref"], ref_old = found["ref"],
@ -973,7 +973,7 @@ exec_as.mo <- function(x,
} else { } else {
x[i] <- lookup(fullname == found["fullname_new"], haystack = MO_lookup) x[i] <- lookup(fullname == found["fullname_new"], haystack = MO_lookup)
} }
mo_env$mo_renamed_last_run <- found["fullname"] pkg_env$mo_renamed_last_run <- found["fullname"]
was_renamed(name_old = found["fullname"], was_renamed(name_old = found["fullname"],
name_new = lookup(fullname == found["fullname_new"], "fullname", haystack = MO_lookup), name_new = lookup(fullname == found["fullname_new"], "fullname", haystack = MO_lookup),
ref_old = found["ref"], ref_old = found["ref"],
@ -1025,7 +1025,7 @@ exec_as.mo <- function(x,
ref_old = found["ref"], ref_old = found["ref"],
ref_new = lookup(fullname == found["fullname_new"], "ref", haystack = MO_lookup), ref_new = lookup(fullname == found["fullname_new"], "ref", haystack = MO_lookup),
mo = lookup(fullname == found["fullname_new"], "mo", haystack = MO_lookup)) mo = lookup(fullname == found["fullname_new"], "mo", haystack = MO_lookup))
mo_env$mo_renamed_last_run <- found["fullname"] pkg_env$mo_renamed_last_run <- found["fullname"]
uncertainties <<- rbind(uncertainties, uncertainties <<- rbind(uncertainties,
format_uncertainty_as_df(uncertainty_level = now_checks_for_uncertainty_level, format_uncertainty_as_df(uncertainty_level = now_checks_for_uncertainty_level,
input = a.x_backup, input = a.x_backup,
@ -1396,7 +1396,7 @@ exec_as.mo <- function(x,
# handling failures ---- # handling failures ----
failures <- failures[!failures %in% c(NA, NULL, NaN)] failures <- failures[!failures %in% c(NA, NULL, NaN)]
if (length(failures) > 0 & initial_search == TRUE) { if (length(failures) > 0 & initial_search == TRUE) {
mo_env$mo_failures <- sort(unique(failures)) pkg_env$mo_failures <- sort(unique(failures))
plural <- c("value", "it", "was") plural <- c("value", "it", "was")
if (pm_n_distinct(failures) > 1) { if (pm_n_distinct(failures) > 1) {
plural <- c("values", "them", "were") plural <- c("values", "them", "were")
@ -1423,7 +1423,7 @@ exec_as.mo <- function(x,
# handling uncertainties ---- # handling uncertainties ----
if (NROW(uncertainties) > 0 & initial_search == TRUE) { if (NROW(uncertainties) > 0 & initial_search == TRUE) {
uncertainties <- as.list(pm_distinct(uncertainties, input, .keep_all = TRUE)) uncertainties <- as.list(pm_distinct(uncertainties, input, .keep_all = TRUE))
mo_env$mo_uncertainties <- uncertainties pkg_env$mo_uncertainties <- uncertainties
plural <- c("", "it", "was") plural <- c("", "it", "was")
if (length(uncertainties$input) > 1) { if (length(uncertainties$input) > 1) {
@ -1559,13 +1559,13 @@ was_renamed <- function(name_old, name_new, ref_old = "", ref_new = "", mo = "")
new_ref = ref_new, new_ref = ref_new,
mo = mo, mo = mo,
stringsAsFactors = FALSE) stringsAsFactors = FALSE)
already_set <- mo_env$mo_renamed already_set <- pkg_env$mo_renamed
if (!is.null(already_set)) { if (!is.null(already_set)) {
mo_env$mo_renamed = rbind(already_set, pkg_env$mo_renamed = rbind(already_set,
newly_set, newly_set,
stringsAsFactors = FALSE) stringsAsFactors = FALSE)
} else { } else {
mo_env$mo_renamed <- newly_set pkg_env$mo_renamed <- newly_set
} }
} }
@ -1573,9 +1573,9 @@ format_uncertainty_as_df <- function(uncertainty_level,
input, input,
result_mo, result_mo,
candidates = NULL) { candidates = NULL) {
if (!is.null(mo_env$mo_renamed_last_run)) { if (!is.null(pkg_env$mo_renamed_last_run)) {
fullname <- mo_env$mo_renamed_last_run fullname <- pkg_env$mo_renamed_last_run
mo_env$mo_renamed_last_run <- NULL pkg_env$mo_renamed_last_run <- NULL
renamed_to <- MO_lookup[match(result_mo, MO_lookup$mo), "fullname", drop = TRUE][1] renamed_to <- MO_lookup[match(result_mo, MO_lookup$mo), "fullname", drop = TRUE][1]
} else { } else {
fullname <- MO_lookup[match(result_mo, MO_lookup$mo), "fullname", drop = TRUE][1] fullname <- MO_lookup[match(result_mo, MO_lookup$mo), "fullname", drop = TRUE][1]
@ -1764,16 +1764,16 @@ unique.mo <- function(x, incomparables = FALSE, ...) {
#' @rdname as.mo #' @rdname as.mo
#' @export #' @export
mo_failures <- function() { mo_failures <- function() {
mo_env$mo_failures pkg_env$mo_failures
} }
#' @rdname as.mo #' @rdname as.mo
#' @export #' @export
mo_uncertainties <- function() { mo_uncertainties <- function() {
if (is.null(mo_env$mo_uncertainties)) { if (is.null(pkg_env$mo_uncertainties)) {
return(NULL) return(NULL)
} }
set_clean_class(as.data.frame(mo_env$mo_uncertainties, set_clean_class(as.data.frame(pkg_env$mo_uncertainties,
stringsAsFactors = FALSE), stringsAsFactors = FALSE),
new_class = c("mo_uncertainties", "data.frame")) new_class = c("mo_uncertainties", "data.frame"))
} }
@ -1842,7 +1842,7 @@ print.mo_uncertainties <- function(x, ...) {
#' @rdname as.mo #' @rdname as.mo
#' @export #' @export
mo_renamed <- function() { mo_renamed <- function() {
items <- mo_env$mo_renamed items <- pkg_env$mo_renamed
if (is.null(items)) { if (is.null(items)) {
items <- data.frame(stringsAsFactors = FALSE) items <- data.frame(stringsAsFactors = FALSE)
} else { } else {
@ -1906,20 +1906,20 @@ translate_allow_uncertain <- function(allow_uncertain) {
} }
get_mo_failures_uncertainties_renamed <- function() { get_mo_failures_uncertainties_renamed <- function() {
remember <- list(failures = mo_env$mo_failures, remember <- list(failures = pkg_env$mo_failures,
uncertainties = mo_env$mo_uncertainties, uncertainties = pkg_env$mo_uncertainties,
renamed = mo_env$mo_renamed) renamed = pkg_env$mo_renamed)
# empty them, otherwise mo_shortname("Chlamydophila psittaci") will give 3 notes # empty them, otherwise mo_shortname("Chlamydophila psittaci") will give 3 notes
mo_env$mo_failures <- NULL pkg_env$mo_failures <- NULL
mo_env$mo_uncertainties <- NULL pkg_env$mo_uncertainties <- NULL
mo_env$mo_renamed <- NULL pkg_env$mo_renamed <- NULL
remember remember
} }
load_mo_failures_uncertainties_renamed <- function(metadata) { load_mo_failures_uncertainties_renamed <- function(metadata) {
mo_env$mo_failures <- metadata$failures pkg_env$mo_failures <- metadata$failures
mo_env$mo_uncertainties <- metadata$uncertainties pkg_env$mo_uncertainties <- metadata$uncertainties
mo_env$mo_renamed <- metadata$renamed pkg_env$mo_renamed <- metadata$renamed
} }
trimws2 <- function(x) { trimws2 <- function(x) {
@ -2007,4 +2007,4 @@ repair_reference_df <- function(reference_df) {
reference_df reference_df
} }
mo_env <- new.env(hash = FALSE) pkg_env <- new.env(hash = FALSE)

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -163,7 +163,7 @@
mo_name <- function(x, language = get_locale(), ...) { mo_name <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_name")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -180,7 +180,7 @@ mo_fullname <- mo_name
mo_shortname <- function(x, language = get_locale(), ...) { mo_shortname <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_shortname")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -218,7 +218,7 @@ mo_shortname <- function(x, language = get_locale(), ...) {
mo_subspecies <- function(x, language = get_locale(), ...) { mo_subspecies <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_subspecies")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -231,7 +231,7 @@ mo_subspecies <- function(x, language = get_locale(), ...) {
mo_species <- function(x, language = get_locale(), ...) { mo_species <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_species")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -244,7 +244,7 @@ mo_species <- function(x, language = get_locale(), ...) {
mo_genus <- function(x, language = get_locale(), ...) { mo_genus <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_genus")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -257,7 +257,7 @@ mo_genus <- function(x, language = get_locale(), ...) {
mo_family <- function(x, language = get_locale(), ...) { mo_family <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_family")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -270,7 +270,7 @@ mo_family <- function(x, language = get_locale(), ...) {
mo_order <- function(x, language = get_locale(), ...) { mo_order <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_order")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -283,7 +283,7 @@ mo_order <- function(x, language = get_locale(), ...) {
mo_class <- function(x, language = get_locale(), ...) { mo_class <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_class")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -296,7 +296,7 @@ mo_class <- function(x, language = get_locale(), ...) {
mo_phylum <- function(x, language = get_locale(), ...) { mo_phylum <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_phylum")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -309,7 +309,7 @@ mo_phylum <- function(x, language = get_locale(), ...) {
mo_kingdom <- function(x, language = get_locale(), ...) { mo_kingdom <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_kingdom")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -326,7 +326,7 @@ mo_domain <- mo_kingdom
mo_type <- function(x, language = get_locale(), ...) { mo_type <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_type")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -339,7 +339,7 @@ mo_type <- function(x, language = get_locale(), ...) {
mo_gramstain <- function(x, language = get_locale(), ...) { mo_gramstain <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_gramstain")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -377,7 +377,7 @@ mo_gramstain <- function(x, language = get_locale(), ...) {
mo_is_gram_negative <- function(x, language = get_locale(), ...) { mo_is_gram_negative <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_is_gram_negative")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -396,7 +396,7 @@ mo_is_gram_negative <- function(x, language = get_locale(), ...) {
mo_is_gram_positive <- function(x, language = get_locale(), ...) { mo_is_gram_positive <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_is_gram_positive")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -450,7 +450,7 @@ mo_is_intrinsic_resistant <- function(x, ab, language = get_locale(), ...) {
mo_snomed <- function(x, language = get_locale(), ...) { mo_snomed <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_snomed")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -463,7 +463,7 @@ mo_snomed <- function(x, language = get_locale(), ...) {
mo_ref <- function(x, language = get_locale(), ...) { mo_ref <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_ref")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -476,7 +476,7 @@ mo_ref <- function(x, language = get_locale(), ...) {
mo_authors <- function(x, language = get_locale(), ...) { mo_authors <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_authors")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -492,7 +492,7 @@ mo_authors <- function(x, language = get_locale(), ...) {
mo_year <- function(x, language = get_locale(), ...) { mo_year <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_year")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -508,7 +508,7 @@ mo_year <- function(x, language = get_locale(), ...) {
mo_rank <- function(x, language = get_locale(), ...) { mo_rank <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_rank")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -521,7 +521,7 @@ mo_rank <- function(x, language = get_locale(), ...) {
mo_taxonomy <- function(x, language = get_locale(), ...) { mo_taxonomy <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_taxonomy")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -547,7 +547,7 @@ mo_taxonomy <- function(x, language = get_locale(), ...) {
mo_synonyms <- function(x, language = get_locale(), ...) { mo_synonyms <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_synonyms")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -580,7 +580,7 @@ mo_synonyms <- function(x, language = get_locale(), ...) {
mo_info <- function(x, language = get_locale(), ...) { mo_info <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_info")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
@ -610,7 +610,7 @@ mo_info <- function(x, language = get_locale(), ...) {
mo_url <- function(x, open = FALSE, language = get_locale(), ...) { mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_url")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(open, allow_class = "logical", has_length = 1) meet_criteria(open, allow_class = "logical", has_length = 1)
@ -647,7 +647,7 @@ mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
mo_property <- function(x, property = "fullname", language = get_locale(), ...) { mo_property <- function(x, property = "fullname", language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox")) # this supports using in dplyr verbs: ... %>% filter(mo_is_intrinsic_resistant(ab = "amox"))
x <- find_mo_col("mo_is_intrinsic_resistant") x <- find_mo_col("mo_property")
} }
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(microorganisms)) meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(microorganisms))

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -132,7 +132,7 @@ set_mo_source <- function(path, destination = getOption("AMR_mo_source", "~/mo_s
stop_ifnot(interactive(), "this function can only be used in interactive mode, since it must ask for the user's permission to write a file to their home folder.") stop_ifnot(interactive(), "this function can only be used in interactive mode, since it must ask for the user's permission to write a file to their home folder.")
if (is.null(path) || path %in% c(FALSE, "")) { if (is.null(path) || path %in% c(FALSE, "")) {
mo_env$mo_source <- NULL pkg_env$mo_source <- NULL
if (file.exists(mo_source_destination)) { if (file.exists(mo_source_destination)) {
unlink(mo_source_destination) unlink(mo_source_destination)
message_("Removed mo_source file '", font_bold(mo_source_destination), "'", message_("Removed mo_source file '", font_bold(mo_source_destination), "'",
@ -214,7 +214,7 @@ set_mo_source <- function(path, destination = getOption("AMR_mo_source", "~/mo_s
attr(df, "mo_source_destination") <- mo_source_destination attr(df, "mo_source_destination") <- mo_source_destination
attr(df, "mo_source_timestamp") <- file.mtime(path) attr(df, "mo_source_timestamp") <- file.mtime(path)
saveRDS(df, mo_source_destination) saveRDS(df, mo_source_destination)
mo_env$mo_source <- df pkg_env$mo_source <- df
message_(action, " mo_source file '", font_bold(mo_source_destination), message_(action, " mo_source file '", font_bold(mo_source_destination),
"' (", formatted_filesize(mo_source_destination), "' (", formatted_filesize(mo_source_destination),
") from '", font_bold(path), ") from '", font_bold(path),
@ -232,17 +232,17 @@ get_mo_source <- function(destination = getOption("AMR_mo_source", "~/mo_source.
} }
return(NULL) return(NULL)
} }
if (is.null(mo_env$mo_source)) { if (is.null(pkg_env$mo_source)) {
mo_env$mo_source <- readRDS(path.expand(destination)) pkg_env$mo_source <- readRDS(path.expand(destination))
} }
old_time <- attributes(mo_env$mo_source)$mo_source_timestamp old_time <- attributes(pkg_env$mo_source)$mo_source_timestamp
new_time <- file.mtime(attributes(mo_env$mo_source)$mo_source_location) new_time <- file.mtime(attributes(pkg_env$mo_source)$mo_source_location)
if (interactive() && !identical(old_time, new_time)) { if (interactive() && !identical(old_time, new_time)) {
# source file was updated, also update reference # source file was updated, also update reference
set_mo_source(attributes(mo_env$mo_source)$mo_source_location) set_mo_source(attributes(pkg_env$mo_source)$mo_source_location)
} }
mo_env$mo_source pkg_env$mo_source
} }
check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_on_error = TRUE) { check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_on_error = TRUE) {
@ -251,7 +251,7 @@ check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_o
if (paste(deparse(substitute(x)), collapse = "") == "get_mo_source()") { if (paste(deparse(substitute(x)), collapse = "") == "get_mo_source()") {
return(TRUE) return(TRUE)
} }
if (is.null(mo_env$mo_source) && (identical(x, get_mo_source()))) { if (is.null(pkg_env$mo_source) && (identical(x, get_mo_source()))) {
return(TRUE) return(TRUE)
} }
if (is.null(x)) { if (is.null(x)) {

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -844,9 +844,9 @@ exec_as.rsi <- function(method,
pillar_shaft.rsi <- function(x, ...) { pillar_shaft.rsi <- function(x, ...) {
out <- trimws(format(x)) out <- trimws(format(x))
out[is.na(x)] <- font_grey(" NA") out[is.na(x)] <- font_grey(" NA")
out[x == "S"] <- font_green_bg(font_white(" S ")) out[x == "R"] <- font_rsi_R_bg(font_black(" R "))
out[x == "I"] <- font_yellow_bg(font_black(" I ")) out[x == "S"] <- font_rsi_S_bg(font_black(" S "))
out[x == "R"] <- font_red_bg(font_white(" R ")) out[x == "I"] <- font_rsi_I_bg(font_black(" I "))
create_pillar_column(out, align = "left", width = 5) create_pillar_column(out, align = "left", width = 5)
} }

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -147,12 +147,10 @@ rsi_calc <- function(...,
} }
if (print_warning == TRUE) { if (print_warning == TRUE) {
# since rsi_calc() is always called from a count() or proportion() function, we use -1: if (message_not_thrown_before("rsi_calc")) {
cll <- gsub("[^a-zA-Z0-9_]+", "_", paste(deparse(sys.calls()[[length(sys.calls()) - 1]]), collapse = ""))
if (message_not_thrown_before(cll)) {
warning_("Increase speed by transforming to class <rsi> on beforehand: your_data %>% mutate_if(is.rsi.eligible, as.rsi)", warning_("Increase speed by transforming to class <rsi> on beforehand: your_data %>% mutate_if(is.rsi.eligible, as.rsi)",
call = FALSE) call = FALSE)
remember_thrown_message(cll) remember_thrown_message("rsi_calc")
} }
} }

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

Binary file not shown.

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -217,4 +217,4 @@ template:
assets: "pkgdown/logos" # use logos in this folder assets: "pkgdown/logos" # use logos in this folder
params: params:
noindex: false noindex: false
template: "flatly" bootswatch: "flatly"

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -1,3 +1 @@
* Edited the unit tests, so they will run under 10 minutes on CRAN (using testthat::skip_on_cran() on some tests).
* Since version 0.3.0 (2018-08-14), CHECK returns a NOTE for having a data directory over 3 MB. This is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. * Since version 0.3.0 (2018-08-14), CHECK returns a NOTE for having a data directory over 3 MB. This is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package.

View File

@ -300,3 +300,6 @@ genus_species is Moraxella catarrhalis NAL S fluoroquinolones S Expert Rules on
genus_species is Moraxella catarrhalis NAL R fluoroquinolones R Expert Rules on Moraxella catarrhalis Expert Rules 3.2 genus_species is Moraxella catarrhalis NAL R fluoroquinolones R Expert Rules on Moraxella catarrhalis Expert Rules 3.2
genus is Campylobacter ERY S CLR, AZM S Expert Rules on Campylobacter Expert Rules 3.2 genus is Campylobacter ERY S CLR, AZM S Expert Rules on Campylobacter Expert Rules 3.2
genus_species is Campylobacter ERY R CLR, AZM R Expert Rules on Campylobacter Expert Rules 3.2 genus_species is Campylobacter ERY R CLR, AZM R Expert Rules on Campylobacter Expert Rules 3.2
fullname like ^(Enterobacter|Klebsiella aerogenes|Citrobacter freundii|Hafnia alvei|Serratia|Morganella morganii|Providencia) CTX S CTX, CRO, CAZ Expert Rules on Enterobacterales (AmpC de-repressed cephalosporins) Expert Rules 3.2 This is rule 3 and 4 of EUCAST Expert Rules v3.2 on Enterobacterales, result will be set with the 'ampc_derepressed_cephalosporins' argument
fullname like ^(Enterobacter|Klebsiella aerogenes|Citrobacter freundii|Hafnia alvei|Serratia|Morganella morganii|Providencia) CRO S CTX, CRO, CAZ Expert Rules on Enterobacterales (AmpC de-repressed cephalosporins) Expert Rules 3.2 This is rule 3 and 4 of EUCAST Expert Rules v3.2 on Enterobacterales, result will be set with the 'ampc_derepressed_cephalosporins' argument
fullname like ^(Enterobacter|Klebsiella aerogenes|Citrobacter freundii|Hafnia alvei|Serratia|Morganella morganii|Providencia) CAZ S CTX, CRO, CAZ Expert Rules on Enterobacterales (AmpC de-repressed cephalosporins) Expert Rules 3.2 This is rule 3 and 4 of EUCAST Expert Rules v3.2 on Enterobacterales, result will be set with the 'ampc_derepressed_cephalosporins' argument

Can't render this file because it contains an unexpected character in line 6 and column 96.

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -6,7 +6,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a> <a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>
@ -193,7 +193,7 @@
<h1 data-toc-skip>How to conduct AMR analysis</h1> <h1 data-toc-skip>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">24 December 2020</h4> <h4 class="date">26 December 2020</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div> <div class="hidden name"><code>AMR.Rmd</code></div>
@ -202,7 +202,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 24 December 2020.</p> <p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 26 December 2020.</p>
<div id="introduction" class="section level1"> <div id="introduction" class="section level1">
<h1 class="hasAnchor"> <h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1> <a href="#introduction" class="anchor"></a>Introduction</h1>
@ -233,21 +233,21 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2020-12-24</td> <td align="center">2020-12-26</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2020-12-24</td> <td align="center">2020-12-26</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2020-12-24</td> <td align="center">2020-12-26</td>
<td align="center">efgh</td> <td align="center">efgh</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
@ -352,31 +352,9 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2012-10-07</td> <td align="center">2011-10-28</td>
<td align="center">D7</td> <td align="center">I1</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2016-11-19</td>
<td align="center">V9</td>
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2015-03-30</td>
<td align="center">D9</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Staphylococcus aureus</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
@ -385,38 +363,60 @@
<td align="center">M</td> <td align="center">M</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2012-06-28</td> <td align="center">2011-06-05</td>
<td align="center">Z4</td> <td align="center">G5</td>
<td align="center">Hospital B</td> <td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2014-03-04</td>
<td align="center">M4</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2014-08-18</td>
<td align="center">D2</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
</tr> </tr>
<tr class="odd">
<td align="center">2014-05-12</td>
<td align="center">X7</td>
<td align="center">Hospital D</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-02-23</td>
<td align="center">K5</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2017-09-20</td>
<td align="center">T5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2017-02-10</td>
<td align="center">Y6</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>Now, lets start the cleaning and the analysis!</p> <p>Now, lets start the cleaning and the analysis!</p>
@ -449,16 +449,16 @@ Longest: 1</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">M</td> <td align="left">M</td>
<td align="right">10,392</td> <td align="right">10,426</td>
<td align="right">51.96%</td> <td align="right">52.13%</td>
<td align="right">10,392</td> <td align="right">10,426</td>
<td align="right">51.96%</td> <td align="right">52.13%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">F</td> <td align="left">F</td>
<td align="right">9,608</td> <td align="right">9,574</td>
<td align="right">48.04%</td> <td align="right">47.87%</td>
<td align="right">20,000</td> <td align="right">20,000</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
@ -515,7 +515,7 @@ Longest: 1</p>
<div id="first-weighted-isolates" class="section level2"> <div id="first-weighted-isolates" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2> <a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient M9, sorted on date:</p> <p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient F3, sorted on date:</p>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -531,19 +531,19 @@ Longest: 1</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-01-25</td> <td align="center">2010-01-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-02-01</td> <td align="center">2010-03-13</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -553,21 +553,21 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-02-22</td> <td align="center">2010-04-21</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-08-12</td> <td align="center">2010-06-24</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -575,19 +575,19 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2010-08-17</td> <td align="center">2010-08-02</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2010-09-18</td> <td align="center">2010-08-14</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -597,19 +597,19 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-07-05</td> <td align="center">2010-10-06</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-07-19</td> <td align="center">2010-10-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">R</td> <td align="center">R</td>
@ -619,19 +619,8 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2011-07-20</td> <td align="center">2010-11-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-09-04</td>
<td align="center">M9</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">I</td> <td align="center">I</td>
@ -639,6 +628,17 @@ Longest: 1</p>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-02-21</td>
<td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">TRUE</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>Only 2 isolates are marked as first according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p> <p>Only 2 isolates are marked as first according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
@ -665,20 +665,20 @@ Longest: 1</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-01-25</td> <td align="center">2010-01-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-02-01</td> <td align="center">2010-03-13</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -689,68 +689,68 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-02-22</td> <td align="center">2010-04-21</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-08-12</td> <td align="center">2010-06-24</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2010-08-17</td> <td align="center">2010-08-02</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2010-09-18</td> <td align="center">2010-08-14</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-07-05</td> <td align="center">2010-10-06</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-07-19</td> <td align="center">2010-10-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">R</td> <td align="center">R</td>
@ -761,36 +761,36 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2011-07-20</td> <td align="center">2010-11-17</td>
<td align="center">M9</td> <td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-09-04</td>
<td align="center">M9</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">I</td> <td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">10</td>
<td align="center">2011-02-21</td>
<td align="center">F3</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Instead of 2, now 8 isolates are flagged. In total, 78.4% of all isolates are marked first weighted - 50.0% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p> <p>Instead of 2, now 6 isolates are flagged. In total, 78.5% of all isolates are marked first weighted - 50.1% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres a shortcut for this new algorithm too:</p> <p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres a shortcut for this new algorithm too:</p>
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span> <code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span><span class="op">(</span><span class="op">)</span></code></pre></div> <span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>So we end up with 15,683 isolates for analysis.</p> <p>So we end up with 15,695 isolates for analysis.</p>
<p>We can remove unneeded columns:</p> <p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span> <code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -834,13 +834,29 @@ Longest: 1</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="center">2012-10-07</td> <td align="center">2011-10-28</td>
<td align="center">D7</td> <td align="center">I1</td>
<td align="center">Hospital B</td> <td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2011-06-05</td>
<td align="center">G5</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
<td align="center">Gram-negative</td> <td align="center">Gram-negative</td>
@ -848,63 +864,15 @@ Longest: 1</p>
<td align="center">coli</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2016-11-19</td>
<td align="center">V9</td>
<td align="center">Hospital A</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="center">2015-03-30</td> <td align="center">2014-05-12</td>
<td align="center">D9</td> <td align="center">X7</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">5</td>
<td align="center">2014-03-04</td>
<td align="center">M4</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">7</td>
<td align="center">2011-02-08</td>
<td align="center">S3</td>
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td> <td align="center">B_STRPT_PNMN</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram-positive</td> <td align="center">Gram-positive</td>
@ -913,16 +881,48 @@ Longest: 1</p>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">8</td> <td align="left">4</td>
<td align="center">2015-12-31</td> <td align="center">2011-02-23</td>
<td align="center">I5</td> <td align="center">K5</td>
<td align="center">Hospital D</td> <td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_STPHY_AURS</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="center">2017-09-20</td>
<td align="center">T5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2017-12-17</td>
<td align="center">Z3</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td> <td align="center">Gram-negative</td>
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">coli</td> <td align="center">coli</td>
@ -949,8 +949,8 @@ Longest: 1</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></code></pre></div> <code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></code></pre></div>
<p><strong>Frequency table</strong></p> <p><strong>Frequency table</strong></p>
<p>Class: character<br> <p>Class: character<br>
Length: 15,683<br> Length: 15,695<br>
Available: 15,683 (100%, NA: 0 = 0%)<br> Available: 15,695 (100%, NA: 0 = 0%)<br>
Unique: 4</p> Unique: 4</p>
<p>Shortest: 16<br> <p>Shortest: 16<br>
Longest: 24</p> Longest: 24</p>
@ -967,33 +967,33 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Escherichia coli</td> <td align="left">Escherichia coli</td>
<td align="right">7,815</td> <td align="right">7,828</td>
<td align="right">49.83%</td> <td align="right">49.88%</td>
<td align="right">7,815</td> <td align="right">7,828</td>
<td align="right">49.83%</td> <td align="right">49.88%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Staphylococcus aureus</td> <td align="left">Staphylococcus aureus</td>
<td align="right">4,001</td> <td align="right">3,977</td>
<td align="right">25.51%</td> <td align="right">25.34%</td>
<td align="right">11,816</td> <td align="right">11,805</td>
<td align="right">75.34%</td> <td align="right">75.22%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td> <td align="left">Streptococcus pneumoniae</td>
<td align="right">2,330</td> <td align="right">2,320</td>
<td align="right">14.86%</td> <td align="right">14.78%</td>
<td align="right">14,146</td> <td align="right">14,125</td>
<td align="right">90.20%</td> <td align="right">90.00%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td> <td align="left">Klebsiella pneumoniae</td>
<td align="right">1,537</td> <td align="right">1,570</td>
<td align="right">9.80%</td> <td align="right">10.00%</td>
<td align="right">15,683</td> <td align="right">15,695</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
</tbody> </tbody>
@ -1020,50 +1020,50 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">AMX</td> <td align="center">AMX</td>
<td align="center">3744</td> <td align="center">3731</td>
<td align="center">257</td> <td align="center">275</td>
<td align="center">3814</td> <td align="center">3822</td>
<td align="center">7815</td> <td align="center">7828</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">AMC</td> <td align="center">AMC</td>
<td align="center">6185</td> <td align="center">6146</td>
<td align="center">294</td> <td align="center">297</td>
<td align="center">1336</td> <td align="center">1385</td>
<td align="center">7815</td> <td align="center">7828</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">5934</td> <td align="center">5918</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1881</td> <td align="center">1910</td>
<td align="center">7815</td> <td align="center">7828</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">GEN</td> <td align="center">GEN</td>
<td align="center">7005</td> <td align="center">7087</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">810</td> <td align="center">741</td>
<td align="center">7815</td> <td align="center">7828</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">AMX</td> <td align="center">AMX</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1537</td> <td align="center">1570</td>
<td align="center">1537</td> <td align="center">1570</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">AMC</td> <td align="center">AMC</td>
<td align="center">1225</td> <td align="center">1231</td>
<td align="center">45</td> <td align="center">57</td>
<td align="center">267</td> <td align="center">282</td>
<td align="center">1537</td> <td align="center">1570</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1086,34 +1086,34 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">5934</td> <td align="center">5918</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1881</td> <td align="center">1910</td>
<td align="center">7815</td> <td align="center">7828</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">1189</td> <td align="center">1191</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">348</td> <td align="center">379</td>
<td align="center">1537</td> <td align="center">1570</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">S. aureus</td> <td align="center">S. aureus</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">3064</td> <td align="center">3045</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">937</td> <td align="center">932</td>
<td align="center">4001</td> <td align="center">3977</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">S. pneumoniae</td> <td align="center">S. pneumoniae</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">1780</td> <td align="center">1785</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">550</td> <td align="center">535</td>
<td align="center">2330</td> <td align="center">2320</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1126,7 +1126,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p> <p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span> <code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>
<span class="co"># [1] 0.5342728</span></code></pre></div> <span class="co"># [1] 0.536604</span></code></pre></div>
<p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p> <p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -1141,19 +1141,19 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.5253802</td> <td align="center">0.5429950</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.5367779</td> <td align="center">0.5429998</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.5470814</td> <td align="center">0.5283993</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.5334627</td> <td align="center">0.5222153</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1173,23 +1173,23 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.5253802</td> <td align="center">0.5429950</td>
<td align="center">4669</td> <td align="center">4768</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.5367779</td> <td align="center">0.5429998</td>
<td align="center">5574</td> <td align="center">5407</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.5470814</td> <td align="center">0.5283993</td>
<td align="center">2347</td> <td align="center">2324</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.5334627</td> <td align="center">0.5222153</td>
<td align="center">3093</td> <td align="center">3196</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1211,27 +1211,27 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">0.8290467</td> <td align="center">0.8230710</td>
<td align="center">0.8963532</td> <td align="center">0.9053398</td>
<td align="center">0.9843890</td> <td align="center">0.9872253</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Klebsiella</td> <td align="center">Klebsiella</td>
<td align="center">0.8262850</td> <td align="center">0.8203822</td>
<td align="center">0.9095641</td> <td align="center">0.9076433</td>
<td align="center">0.9837345</td> <td align="center">0.9847134</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">0.8307923</td> <td align="center">0.8287654</td>
<td align="center">0.9122719</td> <td align="center">0.9192859</td>
<td align="center">0.9872532</td> <td align="center">0.9894393</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Streptococcus</td> <td align="center">Streptococcus</td>
<td align="center">0.5351931</td> <td align="center">0.5379310</td>
<td align="center">0.0000000</td> <td align="center">0.0000000</td>
<td align="center">0.5351931</td> <td align="center">0.5379310</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>
@ -311,17 +311,17 @@ Unique: 2</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span> <code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span>
<span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span> <span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
<span class="co"># 1 S S R I R S</span> <span class="co"># 1 R I R S I S</span>
<span class="co"># 2 I S R I I R</span> <span class="co"># 2 I S I S S R</span>
<span class="co"># 3 R R R S I R</span> <span class="co"># 3 I I I R I R</span>
<span class="co"># 4 I I R R S S</span> <span class="co"># 4 S S I S R I</span>
<span class="co"># 5 I R I S S R</span> <span class="co"># 5 I R S R S R</span>
<span class="co"># 6 I R I I S I</span> <span class="co"># 6 I I I R S I</span>
<span class="co"># kanamycin</span> <span class="co"># kanamycin</span>
<span class="co"># 1 R</span> <span class="co"># 1 S</span>
<span class="co"># 2 S</span> <span class="co"># 2 I</span>
<span class="co"># 3 I</span> <span class="co"># 3 I</span>
<span class="co"># 4 I</span> <span class="co"># 4 S</span>
<span class="co"># 5 I</span> <span class="co"># 5 I</span>
<span class="co"># 6 R</span></code></pre></div> <span class="co"># 6 R</span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p> <p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
@ -354,40 +354,40 @@ Unique: 5</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Mono-resistant</td> <td align="left">Mono-resistant</td>
<td align="right">3214</td> <td align="right">3219</td>
<td align="right">64.28%</td> <td align="right">64.38%</td>
<td align="right">3214</td> <td align="right">3219</td>
<td align="right">64.28%</td> <td align="right">64.38%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Negative</td> <td align="left">Negative</td>
<td align="right">997</td> <td align="right">982</td>
<td align="right">19.94%</td> <td align="right">19.64%</td>
<td align="right">4211</td> <td align="right">4201</td>
<td align="right">84.22%</td> <td align="right">84.02%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Multi-drug-resistant</td> <td align="left">Multi-drug-resistant</td>
<td align="right">442</td> <td align="right">434</td>
<td align="right">8.84%</td> <td align="right">8.68%</td>
<td align="right">4653</td> <td align="right">4635</td>
<td align="right">93.06%</td> <td align="right">92.70%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Poly-resistant</td> <td align="left">Poly-resistant</td>
<td align="right">239</td> <td align="right">251</td>
<td align="right">4.78%</td> <td align="right">5.02%</td>
<td align="right">4892</td> <td align="right">4886</td>
<td align="right">97.84%</td> <td align="right">97.72%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">5</td> <td align="left">5</td>
<td align="left">Extensively drug-resistant</td> <td align="left">Extensively drug-resistant</td>
<td align="right">108</td> <td align="right">114</td>
<td align="right">2.16%</td> <td align="right">2.28%</td>
<td align="right">5000</td> <td align="right">5000</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>
@ -193,7 +193,7 @@
<h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1> <h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">24 December 2020</h4> <h4 class="date">26 December 2020</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="hidden name"><code>SPSS.Rmd</code></div> <div class="hidden name"><code>SPSS.Rmd</code></div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>
@ -227,34 +227,20 @@
times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span> times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span>
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># as.mo("sau") 9.9 12.0 15.0 13.0 13.0 42.0</span> <span class="co"># as.mo("sau") 9.9 11 19.0 12.0 13.0 47.0 10</span>
<span class="co"># as.mo("stau") 100.0 100.0 130.0 120.0 140.0 190.0</span> <span class="co"># as.mo("stau") 100.0 110 130.0 130.0 140.0 150.0 10</span>
<span class="co"># as.mo("STAU") 110.0 110.0 130.0 130.0 140.0 150.0</span> <span class="co"># as.mo("STAU") 110.0 110 130.0 140.0 140.0 150.0 10</span>
<span class="co"># as.mo("staaur") 9.8 12.0 26.0 13.0 41.0 60.0</span> <span class="co"># as.mo("staaur") 11.0 11 15.0 12.0 13.0 40.0 10</span>
<span class="co"># as.mo("STAAUR") 11.0 11.0 15.0 13.0 13.0 41.0</span> <span class="co"># as.mo("STAAUR") 12.0 12 21.0 13.0 40.0 46.0 10</span>
<span class="co"># as.mo("S. aureus") 26.0 28.0 50.0 58.0 63.0 75.0</span> <span class="co"># as.mo("S. aureus") 26.0 31 45.0 34.0 60.0 86.0 10</span>
<span class="co"># as.mo("S aureus") 26.0 27.0 46.0 51.0 60.0 67.0</span> <span class="co"># as.mo("S aureus") 26.0 29 36.0 31.0 33.0 58.0 10</span>
<span class="co"># as.mo("Staphylococcus aureus") 1.9 2.2 2.5 2.5 2.8 3.1</span> <span class="co"># as.mo("Staphylococcus aureus") 1.6 2 2.3 2.3 2.7 2.8 10</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 870.0 880.0 1100.0 910.0 1000.0 2400.0</span> <span class="co"># as.mo("Staphylococcus aureus (MRSA)") 880.0 900 910.0 910.0 920.0 950.0 10</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 360.0 370.0 400.0 380.0 420.0 540.0</span> <span class="co"># as.mo("Sthafilokkockus aaureuz") 370.0 370 380.0 380.0 380.0 400.0 10</span>
<span class="co"># as.mo("MRSA") 9.7 11.0 17.0 12.0 13.0 66.0</span> <span class="co"># as.mo("MRSA") 9.9 11 18.0 13.0 14.0 47.0 10</span>
<span class="co"># as.mo("VISA") 19.0 19.0 36.0 35.0 53.0 56.0</span> <span class="co"># as.mo("VISA") 17.0 19 29.0 21.0 48.0 50.0 10</span>
<span class="co"># as.mo("VRSA") 17.0 20.0 20.0 21.0 21.0 23.0</span> <span class="co"># as.mo("VRSA") 16.0 19 29.0 20.0 47.0 55.0 10</span></code></pre></div>
<span class="co"># neval</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span>
<span class="co"># 10</span></code></pre></div>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-4-1.png" width="562.5"></p> <p><img src="benchmarks_files/figure-html/unnamed-chunk-4-1.png" width="562.5"></p>
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations can take up to 500-1000 times as much time.</p> <p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations can take up to 500-1000 times as much time.</p>
<p>To improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p> <p>To improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
@ -284,8 +270,8 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># mo_name(x) 134 167 201 179 207 310 10</span></code></pre></div> <span class="co"># mo_name(x) 136 169 210 198 247 317 10</span></code></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.179 seconds. You only lose time on your unique input values.</p> <p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.198 seconds. You only lose time on your unique input values.</p>
</div> </div>
<div id="precalculated-results" class="section level3"> <div id="precalculated-results" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -299,10 +285,10 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 7.59 7.93 8.24 8.09 8.66 9.06 10</span> <span class="co"># A 7.21 7.32 7.92 7.69 8.49 9.43 10</span>
<span class="co"># B 23.60 23.70 29.20 24.30 27.10 66.10 10</span> <span class="co"># B 22.60 23.50 28.90 24.70 26.10 69.20 10</span>
<span class="co"># C 1.84 2.13 2.22 2.19 2.35 2.62 10</span></code></pre></div> <span class="co"># C 1.87 1.92 2.10 2.08 2.27 2.34 10</span></code></pre></div>
<p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0022 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p> <p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0021 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">run_it</span> <span class="op">&lt;-</span> <span class="fu">microbenchmark</span><span class="op">(</span>A <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_species</a></span><span class="op">(</span><span class="st">"aureus"</span><span class="op">)</span>, <code class="sourceCode R"><span class="va">run_it</span> <span class="op">&lt;-</span> <span class="fu">microbenchmark</span><span class="op">(</span>A <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_species</a></span><span class="op">(</span><span class="st">"aureus"</span><span class="op">)</span>,
B <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"Staphylococcus"</span><span class="op">)</span>, B <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"Staphylococcus"</span><span class="op">)</span>,
@ -316,14 +302,14 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 1.69 1.77 1.82 1.83 1.86 1.92 10</span> <span class="co"># A 1.34 1.59 1.66 1.65 1.74 2.18 10</span>
<span class="co"># B 1.78 1.79 1.89 1.91 1.95 2.06 10</span> <span class="co"># B 1.34 1.63 1.73 1.72 1.85 2.31 10</span>
<span class="co"># C 1.74 1.79 1.88 1.87 1.94 2.06 10</span> <span class="co"># C 1.41 1.61 1.65 1.65 1.72 1.83 10</span>
<span class="co"># D 1.75 1.77 1.94 1.95 1.99 2.41 10</span> <span class="co"># D 1.59 1.63 1.77 1.77 1.89 2.03 10</span>
<span class="co"># E 1.70 1.75 1.84 1.81 1.87 2.08 10</span> <span class="co"># E 1.33 1.60 1.68 1.65 1.73 2.08 10</span>
<span class="co"># F 1.66 1.70 1.76 1.74 1.80 1.89 10</span> <span class="co"># F 1.31 1.34 1.56 1.52 1.71 2.11 10</span>
<span class="co"># G 1.68 1.70 1.82 1.75 1.93 2.09 10</span> <span class="co"># G 1.34 1.60 1.75 1.64 1.76 2.74 10</span>
<span class="co"># H 1.66 1.69 1.75 1.74 1.80 1.92 10</span></code></pre></div> <span class="co"># H 1.32 1.38 1.57 1.63 1.71 1.78 10</span></code></pre></div>
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> anyway, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p> <p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> anyway, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
</div> </div>
<div id="results-in-other-languages" class="section level3"> <div id="results-in-other-languages" class="section level3">
@ -351,13 +337,13 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">4</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">4</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># en 15.91 16.98 21.87 17.54 18.34 168.50 100</span> <span class="co"># en 15.73 16.35 20.85 16.74 17.71 56.56 100</span>
<span class="co"># de 18.98 20.14 26.30 20.74 22.64 66.68 100</span> <span class="co"># de 18.96 19.62 22.32 19.86 20.46 59.58 100</span>
<span class="co"># nl 31.02 32.71 37.56 33.84 35.81 82.77 100</span> <span class="co"># nl 31.06 31.91 37.31 32.78 34.57 75.58 100</span>
<span class="co"># es 19.13 20.06 22.96 20.54 21.42 65.26 100</span> <span class="co"># es 18.92 19.59 23.43 19.92 20.42 62.72 100</span>
<span class="co"># it 18.90 19.84 24.26 20.59 22.80 60.30 100</span> <span class="co"># it 18.80 19.36 22.59 19.74 20.54 62.72 100</span>
<span class="co"># fr 18.89 19.92 23.46 20.49 21.72 62.85 100</span> <span class="co"># fr 18.88 19.53 23.89 19.85 20.91 61.56 100</span>
<span class="co"># pt 18.90 19.99 23.80 20.70 22.17 61.42 100</span></code></pre></div> <span class="co"># pt 18.89 19.51 21.46 19.87 20.29 59.12 100</span></code></pre></div>
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p> <p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>
@ -303,6 +303,10 @@
<p><strong>Sofia Ny</strong>. Contributor. <p><strong>Sofia Ny</strong>. Contributor.
</p> </p>
</li> </li>
<li>
<p><strong>Rogier P. Schade</strong>. Contributor.
</p>
</li>
<li> <li>
<p><strong>Dennis Souverein</strong>. Contributor. <p><strong>Dennis Souverein</strong>. Contributor.
</p> </p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -7,7 +7,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #

View File

@ -7,7 +7,7 @@
# https://github.com/msberends/AMR # # https://github.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# (c) 2018-2020 Berends MS, Luz CF et al. # # (c) 2018-2021 Berends MS, Luz CF et al. #
# Developed at the University of Groningen, the Netherlands, in # # Developed at the University of Groningen, the Netherlands, in #
# collaboration with non-profit organisations Certe Medical # # collaboration with non-profit organisations Certe Medical #
# Diagnostics & Advice, and University Medical Center Groningen. # # Diagnostics & Advice, and University Medical Center Groningen. #
@ -90,6 +90,7 @@ $(document).ready(function() {
x = x.replace("Judith", "Dr. Judith"); x = x.replace("Judith", "Dr. Judith");
x = x.replace("Gwen", "Dr. Gwen"); x = x.replace("Gwen", "Dr. Gwen");
x = x.replace("Anthony", "Dr. Anthony"); x = x.replace("Anthony", "Dr. Anthony");
x = x.replace("Rogier", "Dr. Rogier");
} }
return(x); return(x);
} }

View File

@ -12,7 +12,7 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css">
<script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
@ -43,7 +43,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>
@ -210,7 +210,7 @@ Since you are one of our users, we would like to know how you use the package an
<p>This package is <a href="https://en.wikipedia.org/wiki/Dependency_hell">fully independent of any other R package</a> and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl">Certe Medical Diagnostics and Advice</a> and <a href="https://www.umcg.nl">University Medical Center Groningen</a>. This R package is <a href="./news">actively maintained</a> and is free software (see <a href="#copyright">Copyright</a>).</p> <p>This package is <a href="https://en.wikipedia.org/wiki/Dependency_hell">fully independent of any other R package</a> and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl">Certe Medical Diagnostics and Advice</a> and <a href="https://www.umcg.nl">University Medical Center Groningen</a>. This R package is <a href="./news">actively maintained</a> and is free software (see <a href="#copyright">Copyright</a>).</p>
<div class="main-content" style="display: inline-block;"> <div class="main-content" style="display: inline-block;">
<p> <p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <strong>Used in 135 countries</strong><br> Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge and to see the country names. <a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <strong>Used in 138 countries</strong><br> Since its first public release in early 2018, this package has been downloaded from 138 countries. Click the map to enlarge and to see the country names.
</p> </p>
</div> </div>
<div id="with-amr-for-r-theres-always-a-knowledgeable-microbiologist-by-your-side" class="section level5"> <div id="with-amr-for-r-theres-always-a-knowledgeable-microbiologist-by-your-side" class="section level5">
@ -327,7 +327,7 @@ Since you are one of our users, we would like to know how you use the package an
<li>Applying EUCAST expert rules (<a href="./reference/eucast_rules.html">manual</a>)</li> <li>Applying EUCAST expert rules (<a href="./reference/eucast_rules.html">manual</a>)</li>
<li>Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code (<a href="./reference/mo_property.html">manual</a>)</li> <li>Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code (<a href="./reference/mo_property.html">manual</a>)</li>
<li>Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code (<a href="./reference/ab_property.html">manual</a>)</li> <li>Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code (<a href="./reference/ab_property.html">manual</a>)</li>
<li>Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI (<a href="https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt">link</a>)</li> <li>Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI (<a href="./articles/datasets.html">link</a>)</li>
<li>Principal component analysis for AMR (<a href="./articles/PCA.html">tutorial</a>)</li> <li>Principal component analysis for AMR (<a href="./articles/PCA.html">tutorial</a>)</li>
</ul> </ul>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9045</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9049</span>
</span> </span>
</div> </div>
@ -236,26 +236,26 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small> <small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div> </div>
<div id="amr-1409045" class="section level1"> <div id="amr-1409049" class="section level1">
<h1 class="page-header" data-toc-text="1.4.0.9045"> <h1 class="page-header" data-toc-text="1.4.0.9049">
<a href="#amr-1409045" class="anchor"></a>AMR 1.4.0.9045<small> Unreleased </small> <a href="#amr-1409049" class="anchor"></a>AMR 1.4.0.9049<small> Unreleased </small>
</h1> </h1>
<div id="last-updated-25-december-2020" class="section level2"> <div id="last-updated-27-december-2020" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-25-december-2020" class="anchor"></a><small>Last updated: 25 December 2020</small> <a href="#last-updated-27-december-2020" class="anchor"></a><small>Last updated: 27 December 2020</small>
</h2> </h2>
<div id="new" class="section level3"> <div id="new" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#new" class="anchor"></a>New</h3> <a href="#new" class="anchor"></a>New</h3>
<ul> <ul>
<li> <li>
<p>Function <code><a href="../reference/is_new_episode.html">is_new_episode()</a></code> to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code>, <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code> of the <code>dplyr</code> package:</p> <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">group_by()</a></code>):</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"> <code class="sourceCode R">
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op">)</span> <span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op">)</span>
<span class="va">example_isolates</span> <span class="op">%&gt;%</span> <span class="va">example_isolates</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">patient_id</span>, <span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">patient_id</span>, <span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/is_new_episode.html">is_new_episode</a></span><span class="op">(</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span><span class="op">)</span></code></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/get_episode.html">is_new_episode</a></span><span class="op">(</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>Functions <code><a href="../reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><a href="../reference/mo_property.html">mo_is_gram_positive()</a></code> as wrappers around <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>. They always return <code>TRUE</code> or <code>FALSE</code> (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>), thus always return <code>FALSE</code> for species outside the taxonomic kingdom of Bacteria.</p></li> <li><p>Functions <code><a href="../reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><a href="../reference/mo_property.html">mo_is_gram_positive()</a></code> as wrappers around <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>. They always return <code>TRUE</code> or <code>FALSE</code> (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>), thus always return <code>FALSE</code> for species outside the taxonomic kingdom of Bacteria.</p></li>
<li><p>Function <code><a href="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> to test for intrinsic resistance, based on <a href="https://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2</a> from 2020.</p></li> <li><p>Function <code><a href="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> to test for intrinsic resistance, based on <a href="https://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2</a> from 2020.</p></li>
@ -266,6 +266,7 @@
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#changed" class="anchor"></a>Changed</h3> <a href="#changed" class="anchor"></a>Changed</h3>
<ul> <ul>
<li><p>New argument <code>ampc_cephalosporin_resistance</code> in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> to correct for AmpC de-repressed cephalosporin-resistant mutants</p></li>
<li> <li>
<p>Interpretation of antimicrobial resistance - <code><a href="../reference/as.rsi.html">as.rsi()</a></code>:</p> <p>Interpretation of antimicrobial resistance - <code><a href="../reference/as.rsi.html">as.rsi()</a></code>:</p>
<ul> <ul>
@ -313,8 +314,9 @@
<ul> <ul>
<li>All messages and warnings thrown by this package now break sentences on whole words</li> <li>All messages and warnings thrown by this package now break sentences on whole words</li>
<li>More extensive unit tests</li> <li>More extensive unit tests</li>
<li>Internal calls to <code><a href="https://rdrr.io/r/base/options.html">options()</a></code> were all removed in favour of a new internal environment <code>mo_env</code> <li>Internal calls to <code><a href="https://rdrr.io/r/base/options.html">options()</a></code> were all removed in favour of a new internal environment <code>pkg_env</code>
</li> </li>
<li>Added Dr. Rogier Schade as contributor</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html datasets: datasets.html
resistance_predict: resistance_predict.html resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html welcome_to_AMR: welcome_to_AMR.html
last_built: 2020-12-24T23:05Z last_built: 2020-12-27T14:06Z
urls: urls:
reference: https://msberends.github.io/AMR//reference reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles article: https://msberends.github.io/AMR//articles

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

View File

@ -19,8 +19,8 @@
<!-- jquery --> <!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
@ -82,7 +82,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9044</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9046</span>
</span> </span>
</div> </div>

Some files were not shown because too many files have changed in this diff Show More