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

(v1.4.0.9040) LA-MRSA / CA-MRSA

This commit is contained in:
dr. M.S. (Matthijs) Berends 2020-12-16 16:18:53 +01:00
parent 203bc20eb0
commit 1faa816090
19 changed files with 366 additions and 364 deletions

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 1.4.0.9039 Version: 1.4.0.9040
Date: 2020-12-13 Date: 2020-12-16
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person(role = c("aut", "cre"), person(role = c("aut", "cre"),

View File

@ -1,5 +1,5 @@
# AMR 1.4.0.9039 # AMR 1.4.0.9040
## <small>Last updated: 13 December 2020</small> ## <small>Last updated: 16 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: * 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:
@ -39,6 +39,7 @@
* Better tibble printing for MIC values * Better tibble printing for MIC values
* Fix for plotting MIC values with `plot()` * Fix for plotting MIC values with `plot()`
* Added `plot()` generic to class `<disk>` * Added `plot()` generic to class `<disk>`
* LA-MRSA and CA-MRSA are now recognised as an abbreviation for *Staphylococcus aureus*, meaning that e.g. `mo_genus("LA-MRSA")` will return `"Staphylococcus"` and `mo_is_gram_positive("LA-MRSA")` will return `TRUE`.
### 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

View File

@ -66,6 +66,7 @@
#' Post Office Box 30001 \cr #' Post Office Box 30001 \cr
#' 9700 RB Groningen \cr #' 9700 RB Groningen \cr
#' The Netherlands #' The Netherlands
#' <https://msberends.github.io/AMR/>
#' #'
#' If you have found a bug, please file a new issue at: \cr #' If you have found a bug, please file a new issue at: \cr
#' <https://github.com/msberends/AMR/issues> #' <https://github.com/msberends/AMR/issues>
@ -73,7 +74,7 @@
#' @rdname AMR #' @rdname AMR
NULL NULL
#' Plotting for classes `rsi` and `disk` #' Plotting for classes `rsi`, `mic` and `disk`
#' #'
#' Functions to print classes of the `AMR` package. #' Functions to print classes of the `AMR` package.
#' @inheritSection lifecycle Stable lifecycle #' @inheritSection lifecycle Stable lifecycle

View File

@ -636,14 +636,18 @@ eucast_rules <- function(x,
ab_name_base <- ab_name(cols_ab[ab_enzyme[i, ]$base_ab], language = NULL, tolower = TRUE) ab_name_base <- ab_name(cols_ab[ab_enzyme[i, ]$base_ab], language = NULL, tolower = TRUE)
ab_name_enzyme <- ab_name(cols_ab[ab_enzyme[i, ]$ab], language = NULL, tolower = TRUE) ab_name_enzyme <- ab_name(cols_ab[ab_enzyme[i, ]$ab], language = NULL, tolower = TRUE)
# Set base to R where base + enzyme inhibitor is R # Set base to R where base + enzyme inhibitor is R ----
rule_current <- paste0("Set ", ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = R where ", rule_current <- paste0("Set ", ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = R where ",
ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = R") ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = R")
cat(word_wrap(rule_current)) if (info == TRUE) {
cat(word_wrap(rule_current))
cat("\n")
}
run_changes <- edit_rsi(x = x, run_changes <- edit_rsi(x = x,
col_mo = col_mo, col_mo = col_mo,
to = "R", to = "R",
rule = c(rule_current, "Other rules", "", paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)), rule = c(rule_current, "Other rules", "",
paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$ab]]) == "R"), rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$ab]]) == "R"),
cols = cols_ab[ab_enzyme[i, ]$base_ab], cols = cols_ab[ab_enzyme[i, ]$base_ab],
last_verbose_info = verbose_info, last_verbose_info = verbose_info,
@ -664,16 +668,18 @@ eucast_rules <- function(x,
n_changed <- 0 n_changed <- 0
} }
# Set base + enzyme inhibitor to S where base is S # Set base + enzyme inhibitor to S where base is S ----
rule_current <- paste0("Set ", ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = S where ", rule_current <- paste0("Set ", ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = S where ",
ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = S") ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = S")
if (info == TRUE) { if (info == TRUE) {
cat(word_wrap(rule_current)) cat(word_wrap(rule_current))
cat("\n")
} }
run_changes <- edit_rsi(x = x, run_changes <- edit_rsi(x = x,
col_mo = col_mo, col_mo = col_mo,
to = "S", to = "S",
rule = c(rule_current, "Other rules", "", paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)), rule = c(rule_current, "Other rules", "",
paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$base_ab]]) == "S"), rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$base_ab]]) == "S"),
cols = cols_ab[ab_enzyme[i, ]$ab], cols = cols_ab[ab_enzyme[i, ]$ab],
last_verbose_info = verbose_info, last_verbose_info = verbose_info,

10
R/mo.R
View File

@ -677,17 +677,17 @@ exec_as.mo <- function(x,
# translate known trivial abbreviations to genus + species ---- # translate known trivial abbreviations to genus + species ----
if (toupper(x_backup_without_spp[i]) %in% c("MRSA", "MSSA", "VISA", "VRSA", "BORSA") if (toupper(x_backup_without_spp[i]) %in% c("MRSA", "MSSA", "VISA", "VRSA", "BORSA")
| x_backup_without_spp[i] %like_case% " (mrsa|mssa|visa|vrsa) ") { | x_backup_without_spp[i] %like_case% "(^| )(mrsa|mssa|visa|vrsa|borsa|la-?mrsa|ca-?mrsa)( |$)") {
x[i] <- lookup(fullname == "Staphylococcus aureus", uncertainty = -1) x[i] <- lookup(fullname == "Staphylococcus aureus", uncertainty = -1)
next next
} }
if (toupper(x_backup_without_spp[i]) %in% c("MRSE", "MSSE") if (toupper(x_backup_without_spp[i]) %in% c("MRSE", "MSSE")
| x_backup_without_spp[i] %like_case% " (mrse|msse) ") { | x_backup_without_spp[i] %like_case% "(^| )(mrse|msse)( |$)") {
x[i] <- lookup(fullname == "Staphylococcus epidermidis", uncertainty = -1) x[i] <- lookup(fullname == "Staphylococcus epidermidis", uncertainty = -1)
next next
} }
if (toupper(x_backup_without_spp[i]) == "VRE" if (toupper(x_backup_without_spp[i]) == "VRE"
| x_backup_without_spp[i] %like_case% " vre " | x_backup_without_spp[i] %like_case% "(^| )vre "
| x_backup_without_spp[i] %like_case% "(enterococci|enterokok|enterococo)[a-z]*?$") { | x_backup_without_spp[i] %like_case% "(enterococci|enterokok|enterococo)[a-z]*?$") {
x[i] <- lookup(genus == "Enterococcus", uncertainty = -1) x[i] <- lookup(genus == "Enterococcus", uncertainty = -1)
next next
@ -711,7 +711,7 @@ exec_as.mo <- function(x,
next next
} }
if (toupper(x_backup_without_spp[i]) == "MRPA" if (toupper(x_backup_without_spp[i]) == "MRPA"
| x_backup_without_spp[i] %like_case% " mrpa ") { | x_backup_without_spp[i] %like_case% "(^| )mrpa( |$)") {
# multi resistant P. aeruginosa # multi resistant P. aeruginosa
x[i] <- lookup(fullname == "Pseudomonas aeruginosa", uncertainty = -1) x[i] <- lookup(fullname == "Pseudomonas aeruginosa", uncertainty = -1)
next next
@ -722,7 +722,7 @@ exec_as.mo <- function(x,
next next
} }
if (toupper(x_backup_without_spp[i]) %in% c("PISP", "PRSP", "VISP", "VRSP") if (toupper(x_backup_without_spp[i]) %in% c("PISP", "PRSP", "VISP", "VRSP")
| x_backup_without_spp[i] %like_case% " (pisp|prsp|visp|vrsp) ") { | x_backup_without_spp[i] %like_case% "(^| )(pisp|prsp|visp|vrsp)( |$)") {
# peni I, peni R, vanco I, vanco R: S. pneumoniae # peni I, peni R, vanco I, vanco R: S. pneumoniae
x[i] <- lookup(fullname == "Streptococcus pneumoniae", uncertainty = -1) x[i] <- lookup(fullname == "Streptococcus pneumoniae", uncertainty = -1)
next next

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="index.html"> <a href="index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="articles/AMR.html"> <a href="articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="articles/resistance_predict.html"> <a href="articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="articles/PCA.html"> <a href="articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="articles/MDR.html"> <a href="articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="articles/WHONET.html"> <a href="articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="articles/SPSS.html"> <a href="articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="articles/EUCAST.html"> <a href="articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="reference/mo_property.html"> <a href="reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="reference/ab_property.html"> <a href="reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="articles/benchmarks.html"> <a href="articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="reference/index.html"> <a href="reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="authors.html"> <a href="authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="news/index.html"> <a href="news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="survey.html"> <a href="survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="index.html"> <a href="index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="articles/AMR.html"> <a href="articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="articles/resistance_predict.html"> <a href="articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="articles/PCA.html"> <a href="articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="articles/MDR.html"> <a href="articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="articles/WHONET.html"> <a href="articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="articles/SPSS.html"> <a href="articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="articles/EUCAST.html"> <a href="articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="reference/mo_property.html"> <a href="reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="reference/ab_property.html"> <a href="reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="articles/benchmarks.html"> <a href="articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="reference/index.html"> <a href="reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="authors.html"> <a href="authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="news/index.html"> <a href="news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="survey.html"> <a href="survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="../index.html"> <a href="../index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="../articles/AMR.html"> <a href="../articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/resistance_predict.html"> <a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/datasets.html"> <a href="../articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/PCA.html"> <a href="../articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/MDR.html"> <a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/WHONET.html"> <a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/SPSS.html"> <a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/EUCAST.html"> <a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/mo_property.html"> <a href="../reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/ab_property.html"> <a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/benchmarks.html"> <a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="../reference/index.html"> <a href="../reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="../authors.html"> <a href="../authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="../news/index.html"> <a href="../news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="../survey.html"> <a href="../survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="index.html"> <a href="index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="articles/AMR.html"> <a href="articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="articles/resistance_predict.html"> <a href="articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="articles/PCA.html"> <a href="articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="articles/MDR.html"> <a href="articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="articles/WHONET.html"> <a href="articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="articles/SPSS.html"> <a href="articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="articles/EUCAST.html"> <a href="articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="reference/mo_property.html"> <a href="reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="reference/ab_property.html"> <a href="reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="articles/benchmarks.html"> <a href="articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="reference/index.html"> <a href="reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="authors.html"> <a href="authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="news/index.html"> <a href="news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="survey.html"> <a href="survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -51,14 +51,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="index.html"> <a href="index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -67,77 +67,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="articles/AMR.html"> <a href="articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="articles/resistance_predict.html"> <a href="articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="articles/PCA.html"> <a href="articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="articles/MDR.html"> <a href="articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="articles/WHONET.html"> <a href="articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="articles/SPSS.html"> <a href="articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="articles/EUCAST.html"> <a href="articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="reference/mo_property.html"> <a href="reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="reference/ab_property.html"> <a href="reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="articles/benchmarks.html"> <a href="articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -146,21 +146,21 @@
</li> </li>
<li> <li>
<a href="reference/index.html"> <a href="reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="authors.html"> <a href="authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="news/index.html"> <a href="news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -169,14 +169,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="survey.html"> <a href="survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>
@ -216,8 +216,8 @@ Since you are one of our users, we would like to know how you use the package an
<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">
<h5 class="hasAnchor"> <h5 class="hasAnchor">
<a href="#with-amr-for-r-theres-always-a-knowledgeable-microbiologist-by-your-side" class="anchor"></a>With <code>AMR</code> (for R), theres always a knowledgeable microbiologist by your side!</h5> <a href="#with-amr-for-r-theres-always-a-knowledgeable-microbiologist-by-your-side" class="anchor"></a>With <code>AMR</code> (for R), theres always a knowledgeable microbiologist by your side!</h5>
<div class="sourceCode" id="cb1"><pre class="downlit"> <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<span class="co"># AMR works great with dplyr, but it's not required or neccesary</span> <code class="sourceCode R"><span class="co"># AMR works great with dplyr, but it's not required or neccesary</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span> <span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">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>
@ -229,7 +229,7 @@ Since you are one of our users, we would like to know how you use the package an
<span class="co">#&gt; NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant()</span> <span class="co">#&gt; NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant()</span>
<span class="co">#&gt; Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), </span> <span class="co">#&gt; Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), </span>
<span class="co">#&gt; 'KAN' (kanamycin), 'TOB' (tobramycin)</span> <span class="co">#&gt; 'KAN' (kanamycin), 'TOB' (tobramycin)</span>
<span class="co">#&gt; Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem)</span></pre></div> <span class="co">#&gt; Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem)</span></code></pre></div>
<p>With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (<code><a href="reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><a href="reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>) and a column selection on two antibiotic groups (<code><a href="reference/antibiotic_class_selectors.html">aminoglycosides()</a></code> and <code><a href="reference/antibiotic_class_selectors.html">carbapenems()</a></code>), the reference data about <a href="./reference/microorganisms.html">all microorganisms</a> and <a href="./reference/antibiotics.html">all antibiotics</a> in the <code>AMR</code> package make sure you get what you meant:</p> <p>With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (<code><a href="reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><a href="reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>) and a column selection on two antibiotic groups (<code><a href="reference/antibiotic_class_selectors.html">aminoglycosides()</a></code> and <code><a href="reference/antibiotic_class_selectors.html">carbapenems()</a></code>), the reference data about <a href="./reference/microorganisms.html">all microorganisms</a> and <a href="./reference/antibiotics.html">all antibiotics</a> in the <code>AMR</code> package make sure you get what you meant:</p>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
@ -298,32 +298,6 @@ Since you are one of our users, we would like to know how you use the package an
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="home-buttons">
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="sc">&lt;</span>a href<span class="ot">=</span><span class="st">"articles/datasets.html"</span><span class="sc">&gt;</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div style<span class="ot">=</span><span class="st">"background-color: #128f7635;"</span><span class="sc">&gt;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div class<span class="ot">=</span><span class="st">"fa fa-database"</span><span class="sc">&gt;</span><span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>span<span class="sc">&gt;</span>Download our data sets<span class="sc">&lt;</span><span class="er">/</span>span<span class="sc">&gt;</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;/</span>a<span class="sc">&gt;</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;</span>a href<span class="ot">=</span><span class="st">"articles/AMR.html"</span><span class="sc">&gt;</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div style<span class="ot">=</span><span class="st">"background-color: #138F3865;"</span><span class="sc">&gt;</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div class<span class="ot">=</span><span class="st">"fa fa-chalkboard-teacher"</span><span class="sc">&gt;</span><span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>span<span class="sc">&gt;</span>Start learning AMR analysis<span class="sc">&lt;</span><span class="er">/</span>span<span class="sc">&gt;</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;/</span>a<span class="sc">&gt;</span></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;</span>a href<span class="ot">=</span><span class="st">"reference/as.rsi.html"</span><span class="sc">&gt;</span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div style<span class="ot">=</span><span class="st">"background-color: #128f7650;"</span><span class="sc">&gt;</span></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div class<span class="ot">=</span><span class="st">"fa fa-language"</span><span class="sc">&gt;</span><span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>span<span class="sc">&gt;</span>Interpret MIC<span class="sc">/</span>disk values to R<span class="sc">/</span>SI<span class="sc">&lt;</span><span class="er">/</span>span<span class="sc">&gt;</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;/</span>a<span class="sc">&gt;</span></span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;</span>a href<span class="ot">=</span><span class="st">"articles/MDR.html"</span><span class="sc">&gt;</span></span>
<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div style<span class="ot">=</span><span class="st">"background-color: #138F3835;"</span><span class="sc">&gt;</span></span>
<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>div class<span class="ot">=</span><span class="st">"fa fa-skull-crossbones"</span><span class="sc">&gt;</span><span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span>span<span class="sc">&gt;</span>Determine multi<span class="sc">-</span>drug <span class="fu">resistance</span> (MDR)<span class="sc">&lt;</span><span class="er">/</span>span<span class="sc">&gt;</span></span>
<span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;/</span>div<span class="sc">&gt;</span></span>
<span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a><span class="er">&lt;/</span>a<span class="sc">&gt;</span></span></code></pre></div>
</div>
</div> </div>
<div id="partners" class="section level4"> <div id="partners" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
@ -365,8 +339,8 @@ Since you are one of our users, we would like to know how you use the package an
<a href="#latest-released-version" class="anchor"></a>Latest released version</h4> <a href="#latest-released-version" class="anchor"></a>Latest released version</h4>
<p><img src="https://www.r-pkg.org/badges/version-ago/AMR"><img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR"></p> <p><img src="https://www.r-pkg.org/badges/version-ago/AMR"><img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR"></p>
<p>This package is available <a href="https://cran.r-project.org/package=AMR">here on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R from CRAN by using the command:</p> <p>This package is available <a href="https://cran.r-project.org/package=AMR">here on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R from CRAN by using the command:</p>
<div class="sourceCode" id="cb3"><pre class="downlit"> <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></pre></div> <code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></code></pre></div>
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> &gt; <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p> <p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> &gt; <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p> <p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
</div> </div>
@ -374,9 +348,9 @@ Since you are one of our users, we would like to know how you use the package an
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#latest-development-version" class="anchor"></a>Latest development version</h4> <a href="#latest-development-version" class="anchor"></a>Latest development version</h4>
<p>The latest and unpublished development version can be installed from GitHub using:</p> <p>The latest and unpublished development version can be installed from GitHub using:</p>
<div class="sourceCode" id="cb4"><pre class="downlit"> <div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span> <code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span>
<span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></pre></div> <span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></code></pre></div>
</div> </div>
</div> </div>
<div id="get-started" class="section level3"> <div id="get-started" class="section level3">

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="../index.html"> <a href="../index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="../articles/AMR.html"> <a href="../articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/resistance_predict.html"> <a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/datasets.html"> <a href="../articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/PCA.html"> <a href="../articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/MDR.html"> <a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/WHONET.html"> <a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/SPSS.html"> <a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/EUCAST.html"> <a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/mo_property.html"> <a href="../reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/ab_property.html"> <a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/benchmarks.html"> <a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="../reference/index.html"> <a href="../reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="../authors.html"> <a href="../authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="../news/index.html"> <a href="../news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="../survey.html"> <a href="../survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>
@ -236,13 +236,13 @@
<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-1409039" class="section level1"> <div id="amr-1409040" class="section level1">
<h1 class="page-header" data-toc-text="1.4.0.9039"> <h1 class="page-header" data-toc-text="1.4.0.9040">
<a href="#amr-1409039" class="anchor"></a>AMR 1.4.0.9039<small> Unreleased </small> <a href="#amr-1409040" class="anchor"></a>AMR 1.4.0.9040<small> Unreleased </small>
</h1> </h1>
<div id="last-updated-13-december-2020" class="section level2"> <div id="last-updated-16-december-2020" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-13-december-2020" class="anchor"></a><small>Last updated: 13 December 2020</small> <a href="#last-updated-16-december-2020" class="anchor"></a><small>Last updated: 16 December 2020</small>
</h2> </h2>
<div id="new" class="section level3"> <div id="new" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -250,11 +250,12 @@
<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>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>
<div class="sourceCode" id="cb1"><pre class="downlit"> <div class="sourceCode" id="cb1"><pre class="downlit 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></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/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>
</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>
@ -268,14 +269,15 @@
<li><p>Reference data used for <code><a href="../reference/as.rsi.html">as.rsi()</a></code> can now be set by the user, using the <code>reference_data</code> parameter. This allows for using own interpretation guidelines. The user-set data must have the same structure as <code>rsi_translation</code>.</p></li> <li><p>Reference data used for <code><a href="../reference/as.rsi.html">as.rsi()</a></code> can now be set by the user, using the <code>reference_data</code> parameter. This allows for using own interpretation guidelines. The user-set data must have the same structure as <code>rsi_translation</code>.</p></li>
<li> <li>
<p>Some functions are now context-aware when used inside <code>dplyr</code> verbs, such as <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code>, <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>. This means that then the data parameter does not need to be set anymore. This is the case for the new functions <code><a href="../reference/mo_property.html">mo_is_gram_negative()</a></code>, <code><a href="../reference/mo_property.html">mo_is_gram_positive()</a></code>, <code><a href="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> and for the existing functions <code><a href="../reference/first_isolate.html">first_isolate()</a></code>, <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code>, <code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/mdro.html">brmo()</a></code>, <code><a href="../reference/mdro.html">mrgn()</a></code>, <code><a href="../reference/mdro.html">mdr_tb()</a></code>, <code><a href="../reference/mdro.html">mdr_cmi2012()</a></code>, <code><a href="../reference/mdro.html">eucast_exceptional_phenotypes()</a></code>. This was already the case for antibiotic selection functions (such as using <code><a href="../reference/antibiotic_class_selectors.html">penicillins()</a></code> in <code><a href="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code>).</p> <p>Some functions are now context-aware when used inside <code>dplyr</code> verbs, such as <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code>, <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>. This means that then the data parameter does not need to be set anymore. This is the case for the new functions <code><a href="../reference/mo_property.html">mo_is_gram_negative()</a></code>, <code><a href="../reference/mo_property.html">mo_is_gram_positive()</a></code>, <code><a href="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> and for the existing functions <code><a href="../reference/first_isolate.html">first_isolate()</a></code>, <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code>, <code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/mdro.html">brmo()</a></code>, <code><a href="../reference/mdro.html">mrgn()</a></code>, <code><a href="../reference/mdro.html">mdr_tb()</a></code>, <code><a href="../reference/mdro.html">mdr_cmi2012()</a></code>, <code><a href="../reference/mdro.html">eucast_exceptional_phenotypes()</a></code>. This was already the case for antibiotic selection functions (such as using <code><a href="../reference/antibiotic_class_selectors.html">penicillins()</a></code> in <code><a href="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code>).</p>
<div class="sourceCode" id="cb2"><pre class="downlit"> <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># to select first isolates that are Gram-negative </span> <span class="co"># to select first isolates that are Gram-negative </span>
<span class="co"># and view results of cephalosporins and aminoglycosides:</span> <span class="co"># and view results of cephalosporins and aminoglycosides:</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="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/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="../reference/mo_property.html">mo_is_gram_negative</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <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/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="../reference/mo_property.html">mo_is_gram_negative</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">mo</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">cephalosporins</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">mo</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">cephalosporins</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://tibble.tidyverse.org/reference/as_tibble.html">as_tibble</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://tibble.tidyverse.org/reference/as_tibble.html">as_tibble</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>For all function parameters in the code, it is now defined what the exact type of user input should be (inspired by the <a href="https://github.com/moodymudskipper/typed"><code>typed</code></a> package). If the user input for a certain function does not meet the requirements for a specific parameter (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 400 arguments were defined.</p></li> <li><p>For all function parameters in the code, it is now defined what the exact type of user input should be (inspired by the <a href="https://github.com/moodymudskipper/typed"><code>typed</code></a> package). If the user input for a certain function does not meet the requirements for a specific parameter (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 400 arguments were defined.</p></li>
<li><p>Deprecated function <code><a href="../reference/AMR-deprecated.html">p_symbol()</a></code> that not really fits the scope of this package. It will be removed in a future version. See <a href="https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R">here</a> for the source code to preserve it.</p></li> <li><p>Deprecated function <code><a href="../reference/AMR-deprecated.html">p_symbol()</a></code> that not really fits the scope of this package. It will be removed in a future version. See <a href="https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R">here</a> for the source code to preserve it.</p></li>
@ -291,6 +293,7 @@
<li><p>Better tibble printing for MIC values</p></li> <li><p>Better tibble printing for MIC values</p></li>
<li><p>Fix for plotting MIC values with <code><a href="../reference/plot.html">plot()</a></code></p></li> <li><p>Fix for plotting MIC values with <code><a href="../reference/plot.html">plot()</a></code></p></li>
<li><p>Added <code><a href="../reference/plot.html">plot()</a></code> generic to class <code>&lt;disk&gt;</code></p></li> <li><p>Added <code><a href="../reference/plot.html">plot()</a></code> generic to class <code>&lt;disk&gt;</code></p></li>
<li><p>LA-MRSA and CA-MRSA are now recognised as an abbreviation for <em>Staphylococcus aureus</em>, meaning that e.g. <code><a href="../reference/mo_property.html">mo_genus("LA-MRSA")</a></code> will return <code>"Staphylococcus"</code> and <code><a href="../reference/mo_property.html">mo_is_gram_positive("LA-MRSA")</a></code> will return <code>TRUE</code>.</p></li>
</ul> </ul>
</div> </div>
<div id="other" class="section level3"> <div id="other" class="section level3">
@ -317,13 +320,14 @@
<li> <li>
<p>Data set <code>intrinsic_resistant</code>. This data set contains all bug-drug combinations where the bug is intrinsic resistant to the drug according to the latest EUCAST insights. It contains just two columns: <code>microorganism</code> and <code>antibiotic</code>.</p> <p>Data set <code>intrinsic_resistant</code>. This data set contains all bug-drug combinations where the bug is intrinsic resistant to the drug according to the latest EUCAST insights. It contains just two columns: <code>microorganism</code> and <code>antibiotic</code>.</p>
<p>Curious about which enterococci are actually intrinsic resistant to vancomycin?</p> <p>Curious about which enterococci are actually intrinsic resistant to vancomycin?</p>
<div class="sourceCode" id="cb3"><pre class="downlit"> <div class="sourceCode" id="cb3"><pre class="downlit 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://msberends.github.io/AMR/">AMR</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://msberends.github.io/AMR/">AMR</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="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">intrinsic_resistant</span> <span class="op">%&gt;%</span> <span class="va">intrinsic_resistant</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="va">antibiotic</span> <span class="op">==</span> <span class="st">"Vancomycin"</span>, <span class="va">microorganism</span> <span class="op">%like%</span> <span class="st">"Enterococcus"</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="va">antibiotic</span> <span class="op">==</span> <span class="st">"Vancomycin"</span>, <span class="va">microorganism</span> <span class="op">%like%</span> <span class="st">"Enterococcus"</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op">(</span><span class="va">microorganism</span><span class="op">)</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op">(</span><span class="va">microorganism</span><span class="op">)</span>
<span class="co">#&gt; [1] "Enterococcus casseliflavus" "Enterococcus gallinarum" </span></pre></div> <span class="co">#&gt; [1] "Enterococcus casseliflavus" "Enterococcus gallinarum" </span></code></pre></div>
</li> </li>
<li><p>Support for veterinary ATC codes</p></li> <li><p>Support for veterinary ATC codes</p></li>
<li><p>Support for skimming classes <code>&lt;rsi&gt;</code>, <code>&lt;mic&gt;</code>, <code>&lt;disk&gt;</code> and <code>&lt;mo&gt;</code> with the <code>skimr</code> package</p></li> <li><p>Support for skimming classes <code>&lt;rsi&gt;</code>, <code>&lt;mic&gt;</code>, <code>&lt;disk&gt;</code> and <code>&lt;mo&gt;</code> with the <code>skimr</code> package</p></li>
@ -339,14 +343,15 @@
<ul> <ul>
<li> <li>
<p>Support for using <code>dplyr</code>s <code><a href="https://dplyr.tidyverse.org/reference/across.html">across()</a></code> to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.</p> <p>Support for using <code>dplyr</code>s <code><a href="https://dplyr.tidyverse.org/reference/across.html">across()</a></code> to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.</p>
<div class="sourceCode" id="cb4"><pre class="downlit"> <div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># until dplyr 1.0.0</span> <span class="co"># until dplyr 1.0.0</span>
<span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_if</a></span><span class="op">(</span><span class="va">is.mic</span>, <span class="va">as.rsi</span><span class="op">)</span> <span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_if</a></span><span class="op">(</span><span class="va">is.mic</span>, <span class="va">as.rsi</span><span class="op">)</span>
<span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_if</a></span><span class="op">(</span><span class="va">is.disk</span>, <span class="va">as.rsi</span><span class="op">)</span> <span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_if</a></span><span class="op">(</span><span class="va">is.disk</span>, <span class="va">as.rsi</span><span class="op">)</span>
<span class="co"># since dplyr 1.0.0</span> <span class="co"># since dplyr 1.0.0</span>
<span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span>, <span class="va">as.rsi</span><span class="op">)</span><span class="op">)</span> <span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span>, <span class="va">as.rsi</span><span class="op">)</span><span class="op">)</span>
<span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.disk</span><span class="op">)</span>, <span class="va">as.rsi</span><span class="op">)</span><span class="op">)</span></pre></div> <span class="va">your_data</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.disk</span><span class="op">)</span>, <span class="va">as.rsi</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>Cleaning columns in a data.frame now allows you to specify those columns with tidy selection, e.g. <code><a href="../reference/as.rsi.html">as.rsi(df, col1:col9)</a></code></p></li> <li><p>Cleaning columns in a data.frame now allows you to specify those columns with tidy selection, e.g. <code><a href="../reference/as.rsi.html">as.rsi(df, col1:col9)</a></code></p></li>
<li><p>Big speed improvement for interpreting MIC values and disk zone diameters. When interpreting 5,000 MIC values of two antibiotics (10,000 values in total), our benchmarks showed a total run time going from 80.7-85.1 seconds to 1.8-2.0 seconds.</p></li> <li><p>Big speed improvement for interpreting MIC values and disk zone diameters. When interpreting 5,000 MIC values of two antibiotics (10,000 values in total), our benchmarks showed a total run time going from 80.7-85.1 seconds to 1.8-2.0 seconds.</p></li>
@ -356,10 +361,11 @@
</li> </li>
<li> <li>
<p>Added intelligent data cleaning to <code><a href="../reference/as.disk.html">as.disk()</a></code>, so numbers can also be extracted from text and decimal numbers will always be rounded up:</p> <p>Added intelligent data cleaning to <code><a href="../reference/as.disk.html">as.disk()</a></code>, so numbers can also be extracted from text and decimal numbers will always be rounded up:</p>
<div class="sourceCode" id="cb5"><pre class="downlit"> <div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/as.disk.html">as.disk</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"disk zone: 23.4 mm"</span>, <span class="fl">23.4</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="../reference/as.disk.html">as.disk</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"disk zone: 23.4 mm"</span>, <span class="fl">23.4</span><span class="op">)</span><span class="op">)</span>
<span class="co">#&gt; Class &lt;disk&gt;</span> <span class="co">#&gt; Class &lt;disk&gt;</span>
<span class="co">#&gt; [1] 24 24</span></pre></div> <span class="co">#&gt; [1] 24 24</span></code></pre></div>
</li> </li>
<li> <li>
<p>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:</p> <p>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:</p>
@ -416,13 +422,14 @@
<li><p>Function <code><a href="../reference/ab_from_text.html">ab_from_text()</a></code> to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses <code><a href="../reference/as.ab.html">as.ab()</a></code> internally</p></li> <li><p>Function <code><a href="../reference/ab_from_text.html">ab_from_text()</a></code> to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses <code><a href="../reference/as.ab.html">as.ab()</a></code> internally</p></li>
<li> <li>
<p><a href="https://tidyselect.r-lib.org/reference/language.html">Tidyverse selection helpers</a> for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like <code><a href="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code> and <code><a href="https://tidyr.tidyverse.org/reference/pivot_longer.html">tidyr::pivot_longer()</a></code>:</p> <p><a href="https://tidyselect.r-lib.org/reference/language.html">Tidyverse selection helpers</a> for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like <code><a href="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code> and <code><a href="https://tidyr.tidyverse.org/reference/pivot_longer.html">tidyr::pivot_longer()</a></code>:</p>
<div class="sourceCode" id="cb6"><pre class="downlit"> <div class="sourceCode" id="cb6"><pre class="downlit 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="co"># Columns 'IPM' and 'MEM' are in the example_isolates data set</span> <span class="co"># Columns 'IPM' and 'MEM' are in the example_isolates data set</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/select.html">select</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>
<span class="co">#&gt; Selecting carbapenems: `IPM` (imipenem), `MEM` (meropenem)</span></pre></div> <span class="co">#&gt; Selecting carbapenems: `IPM` (imipenem), `MEM` (meropenem)</span></code></pre></div>
</li> </li>
<li><p>Added <code><a href="../reference/mo_property.html">mo_domain()</a></code> as an alias to <code><a href="../reference/mo_property.html">mo_kingdom()</a></code></p></li> <li><p>Added <code><a href="../reference/mo_property.html">mo_domain()</a></code> as an alias to <code><a href="../reference/mo_property.html">mo_kingdom()</a></code></p></li>
<li><p>Added function <code><a href="../reference/filter_ab_class.html">filter_penicillins()</a></code> to filter isolates on a specific result in any column with a name in the antimicrobial penicillins class (more specific: ATC subgroup <em>Beta-lactam antibacterials, penicillins</em>)</p></li> <li><p>Added function <code><a href="../reference/filter_ab_class.html">filter_penicillins()</a></code> to filter isolates on a specific result in any column with a name in the antimicrobial penicillins class (more specific: ATC subgroup <em>Beta-lactam antibacterials, penicillins</em>)</p></li>
@ -604,12 +611,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline</p></li> <li><p>Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline</p></li>
<li> <li>
<p>Interpretation from MIC values (and disk zones) to R/SI can now be used with <code><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at()</a></code> of the <code>dplyr</code> package:</p> <p>Interpretation from MIC values (and disk zones) to R/SI can now be used with <code><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at()</a></code> of the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb7"><pre class="downlit"> <div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">yourdata</span> <span class="op">%&gt;%</span> <span class="va">yourdata</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op">(</span><span class="va">antibiotic1</span><span class="op">:</span><span class="va">antibiotic25</span><span class="op">)</span>, <span class="va">as.rsi</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span><span class="op">)</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op">(</span><span class="va">antibiotic1</span><span class="op">:</span><span class="va">antibiotic25</span><span class="op">)</span>, <span class="va">as.rsi</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span><span class="op">)</span>
<span class="va">yourdata</span> <span class="op">%&gt;%</span> <span class="va">yourdata</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op">(</span><span class="va">antibiotic1</span><span class="op">:</span><span class="va">antibiotic25</span><span class="op">)</span>, <span class="va">as.rsi</span>, mo <span class="op">=</span> <span class="va">.</span><span class="op">$</span><span class="va">mybacteria</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op">(</span><span class="va">antibiotic1</span><span class="op">:</span><span class="va">antibiotic25</span><span class="op">)</span>, <span class="va">as.rsi</span>, mo <span class="op">=</span> <span class="va">.</span><span class="op">$</span><span class="va">mybacteria</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole</p></li> <li><p>Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole</p></li>
<li><p>Added <code>uti</code> (as abbreviation of urinary tract infections) as parameter to <code><a href="../reference/as.rsi.html">as.rsi()</a></code>, so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs</p></li> <li><p>Added <code>uti</code> (as abbreviation of urinary tract infections) as parameter to <code><a href="../reference/as.rsi.html">as.rsi()</a></code>, so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs</p></li>
@ -632,23 +640,25 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><a href="../reference/ab_property.html">ab_loinc()</a></code> to retrieve LOINC codes, or use a LOINC code for input in any <code>ab_*</code> function:</p> <p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><a href="../reference/ab_property.html">ab_loinc()</a></code> to retrieve LOINC codes, or use a LOINC code for input in any <code>ab_*</code> function:</p>
<div class="sourceCode" id="cb8"><pre class="downlit"> <div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/ab_property.html">ab_loinc</a></span><span class="op">(</span><span class="st">"ampicillin"</span><span class="op">)</span> <span class="fu"><a href="../reference/ab_property.html">ab_loinc</a></span><span class="op">(</span><span class="st">"ampicillin"</span><span class="op">)</span>
<span class="co">#&gt; [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"</span> <span class="co">#&gt; [1] "21066-6" "3355-5" "33562-0" "33919-2" "43883-8" "43884-6" "87604-5"</span>
<span class="fu"><a href="../reference/ab_property.html">ab_name</a></span><span class="op">(</span><span class="st">"21066-6"</span><span class="op">)</span> <span class="fu"><a href="../reference/ab_property.html">ab_name</a></span><span class="op">(</span><span class="st">"21066-6"</span><span class="op">)</span>
<span class="co">#&gt; [1] "Ampicillin"</span> <span class="co">#&gt; [1] "Ampicillin"</span>
<span class="fu"><a href="../reference/ab_property.html">ab_atc</a></span><span class="op">(</span><span class="st">"21066-6"</span><span class="op">)</span> <span class="fu"><a href="../reference/ab_property.html">ab_atc</a></span><span class="op">(</span><span class="st">"21066-6"</span><span class="op">)</span>
<span class="co">#&gt; [1] "J01CA01"</span></pre></div> <span class="co">#&gt; [1] "J01CA01"</span></code></pre></div>
</li> </li>
<li> <li>
<p>Support for SNOMED CT codes in the <code>microorganisms</code> data set. Use <code><a href="../reference/mo_property.html">mo_snomed()</a></code> to retrieve SNOMED codes, or use a SNOMED code for input in any <code>mo_*</code> function:</p> <p>Support for SNOMED CT codes in the <code>microorganisms</code> data set. Use <code><a href="../reference/mo_property.html">mo_snomed()</a></code> to retrieve SNOMED codes, or use a SNOMED code for input in any <code>mo_*</code> function:</p>
<div class="sourceCode" id="cb9"><pre class="downlit"> <div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/mo_property.html">mo_snomed</a></span><span class="op">(</span><span class="st">"S. aureus"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_snomed</a></span><span class="op">(</span><span class="st">"S. aureus"</span><span class="op">)</span>
<span class="co">#&gt; [1] 115329001 3092008 113961008</span> <span class="co">#&gt; [1] 115329001 3092008 113961008</span>
<span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="fl">115329001</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="fl">115329001</span><span class="op">)</span>
<span class="co">#&gt; [1] "Staphylococcus aureus"</span> <span class="co">#&gt; [1] "Staphylococcus aureus"</span>
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="fl">115329001</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="fl">115329001</span><span class="op">)</span>
<span class="co">#&gt; [1] "Gram-positive"</span></pre></div> <span class="co">#&gt; [1] "Gram-positive"</span></code></pre></div>
</li> </li>
</ul> </ul>
</li> </li>
@ -706,11 +716,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:</p> <p>If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:</p>
<div class="sourceCode" id="cb10"><pre class="downlit"> <div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_family</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacteriaceae"</span><span class="op">)</span> <span class="va">...</span></pre></div> <code class="sourceCode R">
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_family</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacteriaceae"</span><span class="op">)</span> <span class="va">...</span></code></pre></div>
<p>then please adjust this to:</p> <p>then please adjust this to:</p>
<div class="sourceCode" id="cb11"><pre class="downlit"> <div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_order</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacterales"</span><span class="op">)</span> <span class="va">...</span></pre></div> <code class="sourceCode R">
<span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_order</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacterales"</span><span class="op">)</span> <span class="va">...</span></code></pre></div>
</li> </li>
</ul> </ul>
</li> </li>
@ -722,13 +734,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Functions <code><a href="../reference/proportion.html">susceptibility()</a></code> and <code><a href="../reference/proportion.html">resistance()</a></code> as aliases of <code><a href="../reference/proportion.html">proportion_SI()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code>, respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.</p> <p>Functions <code><a href="../reference/proportion.html">susceptibility()</a></code> and <code><a href="../reference/proportion.html">resistance()</a></code> as aliases of <code><a href="../reference/proportion.html">proportion_SI()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code>, respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.</p>
<div class="sourceCode" id="cb12"><pre class="downlit"> <div class="sourceCode" id="cb12"><pre class="downlit 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>bug <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</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>bug <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op">(</span>amoxicillin <span class="op">=</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>, <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op">(</span>amoxicillin <span class="op">=</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>,
amox_clav <span class="op">=</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMC</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> amox_clav <span class="op">=</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMC</span><span class="op">)</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="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op">(</span><span class="va">amoxicillin</span><span class="op">)</span> <span class="op">|</span> <span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op">(</span><span class="va">amox_clav</span><span class="op">)</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op">(</span><span class="va">amoxicillin</span><span class="op">)</span> <span class="op">|</span> <span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op">(</span><span class="va">amox_clav</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li> </li>
<li> <li>
<p>Support for a new MDRO guideline: Magiorakos AP, Srinivasan A <em>et al.</em> “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).</p> <p>Support for a new MDRO guideline: Magiorakos AP, Srinivasan A <em>et al.</em> “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).</p>
@ -750,7 +763,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li> <li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li>
<li> <li>
<p>Added a score (a certainty percentage) to <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a>:</p> <p>Added a score (a certainty percentage) to <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a>:</p>
<div class="sourceCode" id="cb13"><pre class="downlit"> <div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Stafylococcus aureus"</span>, <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Stafylococcus aureus"</span>,
<span class="st">"staphylokok aureuz"</span><span class="op">)</span><span class="op">)</span> <span class="st">"staphylokok aureuz"</span><span class="op">)</span><span class="op">)</span>
<span class="co">#&gt; Warning: </span> <span class="co">#&gt; Warning: </span>
@ -760,7 +774,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="fu"><a href="../reference/as.mo.html">mo_uncertainties</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">mo_uncertainties</a></span><span class="op">(</span><span class="op">)</span>
<span class="co">#&gt; "Stafylococcus aureus" -&gt; Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)</span> <span class="co">#&gt; "Stafylococcus aureus" -&gt; Staphylococcus aureus (B_STPHY_AURS, score: 95.2%)</span>
<span class="co">#&gt; "staphylokok aureuz" -&gt; Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)</span></pre></div> <span class="co">#&gt; "staphylokok aureuz" -&gt; Staphylococcus aureus (B_STPHY_AURS, score: 85.7%)</span></code></pre></div>
</li> </li>
</ul> </ul>
</li> </li>
@ -808,13 +822,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Determination of first isolates now <strong>excludes</strong> all unknown microorganisms at default, i.e. microbial code <code>"UNKNOWN"</code>. They can be included with the new parameter <code>include_unknown</code>:</p> <p>Determination of first isolates now <strong>excludes</strong> all unknown microorganisms at default, i.e. microbial code <code>"UNKNOWN"</code>. They can be included with the new parameter <code>include_unknown</code>:</p>
<div class="sourceCode" id="cb14"><pre class="downlit"> <div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
<span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">...</span>, include_unknown <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div> <code class="sourceCode R">
<span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">...</span>, include_unknown <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
<p>For WHONET users, this means that all records/isolates with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of unknown microorganisms that were included or excluded.</p> <p>For WHONET users, this means that all records/isolates with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of unknown microorganisms that were included or excluded.</p>
</li> </li>
<li> <li>
<p>For code consistency, classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in <code>NA</code>:</p> <p>For code consistency, classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in <code>NA</code>:</p>
<div class="sourceCode" id="cb15"><pre class="downlit"> <div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># how it works in base R:</span> <span class="co"># how it works in base R:</span>
<span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html">factor</a></span><span class="op">(</span><span class="st">"A"</span><span class="op">)</span> <span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html">factor</a></span><span class="op">(</span><span class="st">"A"</span><span class="op">)</span>
<span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="st">"B"</span> <span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="st">"B"</span>
@ -825,7 +841,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span> <span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span>
<span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="st">"testvalue"</span> <span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="st">"testvalue"</span>
<span class="co">#&gt; Warning message:</span> <span class="co">#&gt; Warning message:</span>
<span class="co">#&gt; invalid microorganism code, NA generated</span></pre></div> <span class="co">#&gt; invalid microorganism code, NA generated</span></code></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p> <p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li> </li>
<li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li> <li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
@ -838,7 +854,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Function <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with <code><a href="../reference/mo_property.html">mo_shortname()</a></code> at default:</p> <p>Function <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with <code><a href="../reference/mo_property.html">mo_shortname()</a></code> at default:</p>
<div class="sourceCode" id="cb16"><pre class="downlit"> <div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="va">example_isolates</span><span class="op">)</span> <span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="va">example_isolates</span><span class="op">)</span>
<span class="co">#&gt; NOTE: Using column `mo` as input for `col_mo`.</span> <span class="co">#&gt; NOTE: Using column `mo` as input for `col_mo`.</span>
<span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">4</span>, <span class="op">]</span> <span class="va">x</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">4</span>, <span class="op">]</span>
@ -858,14 +875,16 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co">#&gt; 2 Gram-negative AMK 251 0 2 253</span> <span class="co">#&gt; 2 Gram-negative AMK 251 0 2 253</span>
<span class="co">#&gt; 3 Gram-negative AMP 227 0 405 632</span> <span class="co">#&gt; 3 Gram-negative AMP 227 0 405 632</span>
<span class="co">#&gt; 4 Gram-negative AMX 227 0 405 632</span> <span class="co">#&gt; 4 Gram-negative AMX 227 0 405 632</span>
<span class="co">#&gt; NOTE: Use 'format()' on this result to get a publicable/printable format.</span></pre></div> <span class="co">#&gt; NOTE: Use 'format()' on this result to get a publicable/printable format.</span></code></pre></div>
<p>You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R <code><a href="https://rdrr.io/r/base/format.html">format()</a></code> function:</p> <p>You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R <code><a href="https://rdrr.io/r/base/format.html">format()</a></code> function:</p>
<div class="sourceCode" id="cb17"><pre class="downlit"> <div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<span class="fu"><a href="https://rdrr.io/r/base/format.html">format</a></span><span class="op">(</span><span class="va">x</span>, combine_IR <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></pre></div> <code class="sourceCode R">
<span class="fu"><a href="https://rdrr.io/r/base/format.html">format</a></span><span class="op">(</span><span class="va">x</span>, combine_IR <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></code></pre></div>
</li> </li>
<li> <li>
<p>Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibility of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p> <p>Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibility of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
<div class="sourceCode" id="cb18"><pre class="downlit"> <div class="sourceCode" id="cb18"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># --------------------------------------------------------------------</span> <span class="co"># --------------------------------------------------------------------</span>
<span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span> <span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span>
<span class="co"># ----------------------- -----------------------</span> <span class="co"># ----------------------- -----------------------</span>
@ -881,17 +900,18 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># S or I &lt;NA&gt; X X - -</span> <span class="co"># S or I &lt;NA&gt; X X - -</span>
<span class="co"># R &lt;NA&gt; - - - -</span> <span class="co"># R &lt;NA&gt; - - - -</span>
<span class="co"># &lt;NA&gt; &lt;NA&gt; - - - -</span> <span class="co"># &lt;NA&gt; &lt;NA&gt; - - - -</span>
<span class="co"># --------------------------------------------------------------------</span></pre></div> <span class="co"># --------------------------------------------------------------------</span></code></pre></div>
<p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p> <p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p>
</li> </li>
<li> <li>
<p><code>tibble</code> printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code> <code>mo</code>. When using <code>tibble</code>s containing antimicrobial columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red. Microbial IDs (class <code>mo</code>) will emphasise on the genus and species, not on the kingdom.</p> <p><code>tibble</code> printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code> <code>mo</code>. When using <code>tibble</code>s containing antimicrobial columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red. Microbial IDs (class <code>mo</code>) will emphasise on the genus and species, not on the kingdom.</p>
<div class="sourceCode" id="cb19"><pre class="downlit"> <div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># (run this on your own console, as this page does not support colour printing)</span> <span class="co"># (run this on your own console, as this page does not support colour printing)</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">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/select.html">select</a></span><span class="op">(</span><span class="va">mo</span><span class="op">:</span><span class="va">AMC</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">mo</span><span class="op">:</span><span class="va">AMC</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://tibble.tidyverse.org/reference/as_tibble.html">as_tibble</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://tibble.tidyverse.org/reference/as_tibble.html">as_tibble</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</li> </li>
</ul> </ul>
</div> </div>
@ -968,7 +988,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> to immediately show resistance percentages and number of available isolates:</p> <p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> to immediately show resistance percentages and number of available isolates:</p>
<div class="sourceCode" id="cb20"><pre class="downlit"> <div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">AMX</span>, <span class="va">CIP</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">AMX</span>, <span class="va">CIP</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/proportion.html">rsi_df</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/proportion.html">rsi_df</a></span><span class="op">(</span><span class="op">)</span>
@ -976,7 +997,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># 1 Amoxicillin SI 0.4442636 546</span> <span class="co"># 1 Amoxicillin SI 0.4442636 546</span>
<span class="co"># 2 Amoxicillin R 0.5557364 683</span> <span class="co"># 2 Amoxicillin R 0.5557364 683</span>
<span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span> <span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span>
<span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></pre></div> <span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></code></pre></div>
</li> </li>
<li> <li>
<p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p> <p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p>
@ -994,13 +1015,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>UPEC (Uropathogenic <em>E. coli</em>)</li> <li>UPEC (Uropathogenic <em>E. coli</em>)</li>
</ul> </ul>
<p>All these lead to the microbial ID of <em>E. coli</em>:</p> <p>All these lead to the microbial ID of <em>E. coli</em>:</p>
<div class="sourceCode" id="cb21"><pre class="downlit"> <div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"UPEC"</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"UPEC"</span><span class="op">)</span>
<span class="co"># B_ESCHR_COL</span> <span class="co"># B_ESCHR_COL</span>
<span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="st">"UPEC"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="st">"UPEC"</span><span class="op">)</span>
<span class="co"># "Escherichia coli"</span> <span class="co"># "Escherichia coli"</span>
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"EHEC"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"EHEC"</span><span class="op">)</span>
<span class="co"># "Gram-negative"</span></pre></div> <span class="co"># "Gram-negative"</span></code></pre></div>
</li> </li>
<li><p>Function <code><a href="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><a href="../reference/ab_property.html">ab_info()</a></code>. The <code><a href="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</p></li> <li><p>Function <code><a href="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><a href="../reference/ab_property.html">ab_info()</a></code>. The <code><a href="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</p></li>
<li><p>Function <code><a href="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li> <li><p>Function <code><a href="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
@ -1098,7 +1120,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>when all values are unique it now shows a message instead of a warning</p></li> <li><p>when all values are unique it now shows a message instead of a warning</p></li>
<li> <li>
<p>support for boxplots:</p> <p>support for boxplots:</p>
<div class="sourceCode" id="cb22"><pre class="downlit"> <div class="sourceCode" id="cb22"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span>
@ -1106,7 +1129,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</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">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">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</li> </li>
</ul> </ul>
</li> </li>
@ -1192,7 +1215,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li> </li>
<li> <li>
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p> <p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
<div class="sourceCode" id="cb23"><pre class="downlit"> <div class="sourceCode" id="cb23"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span><span class="op">(</span><span class="op">)</span>
@ -1203,24 +1227,26 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="fu"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p> <p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
<div class="sourceCode" id="cb24"><pre class="downlit"> <div class="sourceCode" id="cb24"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span>result <span class="op">=</span> <span class="st">"R"</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span>result <span class="op">=</span> <span class="st">"R"</span><span class="op">)</span>
<span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span> <span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span>result <span class="op">=</span> <span class="st">"R"</span>, scope <span class="op">=</span> <span class="st">"all"</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span><span class="op">(</span>result <span class="op">=</span> <span class="st">"R"</span>, scope <span class="op">=</span> <span class="st">"all"</span><span class="op">)</span>
<span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></pre></div> <span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></code></pre></div>
</li> </li>
<li> <li>
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p> <p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
<div class="sourceCode" id="cb25"><pre class="downlit"> <div class="sourceCode" id="cb25"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">ab_property</span> <span class="op">-&gt;</span> <span class="fu">atc_property</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_property</span> <span class="op">-&gt;</span> <span class="fu">atc_property</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_name</span> <span class="op">-&gt;</span> <span class="fu">atc_name</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_name</span> <span class="op">-&gt;</span> <span class="fu">atc_name</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_official</span> <span class="op">-&gt;</span> <span class="fu">atc_official</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_official</span> <span class="op">-&gt;</span> <span class="fu">atc_official</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_trivial_nl</span> <span class="op">-&gt;</span> <span class="fu">atc_trivial_nl</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_trivial_nl</span> <span class="op">-&gt;</span> <span class="fu">atc_trivial_nl</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_certe</span> <span class="op">-&gt;</span> <span class="fu">atc_certe</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_certe</span> <span class="op">-&gt;</span> <span class="fu">atc_certe</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_umcg</span> <span class="op">-&gt;</span> <span class="fu">atc_umcg</span><span class="op">(</span><span class="op">)</span> <span class="va">ab_umcg</span> <span class="op">-&gt;</span> <span class="fu">atc_umcg</span><span class="op">(</span><span class="op">)</span>
<span class="va">ab_tradenames</span> <span class="op">-&gt;</span> <span class="fu">atc_tradenames</span><span class="op">(</span><span class="op">)</span></pre></div> <span class="va">ab_tradenames</span> <span class="op">-&gt;</span> <span class="fu">atc_tradenames</span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>These functions use <code>as.atc()</code> internally. The old <code>atc_property</code> has been renamed <code><a href="../reference/atc_online_property.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><a href="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</p> <p>These functions use <code>as.atc()</code> internally. The old <code>atc_property</code> has been renamed <code><a href="../reference/atc_online_property.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><a href="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</p>
</li> </li>
<li><p>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</p></li> <li><p>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</p></li>
@ -1233,23 +1259,26 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</p></li> <li><p>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</p></li>
<li> <li>
<p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="../reference/plot.html">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p> <p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="../reference/plot.html">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
<div class="sourceCode" id="cb26"><pre class="downlit"> <div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span><span class="va">septic_patients</span>, col_ab <span class="op">=</span> <span class="st">"amox"</span><span class="op">)</span> <span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span><span class="va">septic_patients</span>, col_ab <span class="op">=</span> <span class="st">"amox"</span><span class="op">)</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
<span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span></code></pre></div>
</li> </li>
<li> <li>
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p> <p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
<div class="sourceCode" id="cb27"><pre class="downlit"> <div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">...</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">...</span><span class="op">)</span>
<span class="co"># or</span> <span class="co"># or</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span></code></pre></div>
<p>is equal to:</p> <p>is equal to:</p>
<div class="sourceCode" id="cb28"><pre class="downlit"> <div class="sourceCode" id="cb28"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>only_firsts <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>only_firsts <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="va">...</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">only_firsts</span> <span class="op">==</span> <span class="cn">TRUE</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="va">only_firsts</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">only_firsts</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">only_firsts</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>New function <code><a href="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code></p></li> <li><p>New function <code><a href="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code></p></li>
<li><p>New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the <em>G</em>-test and more. These are also available (and even easier readable) on our website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a>.</p></li> <li><p>New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the <em>G</em>-test and more. These are also available (and even easier readable) on our website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a>.</p></li>
@ -1277,36 +1306,39 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p> <p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
<div class="sourceCode" id="cb29"><pre class="downlit"> <div class="sourceCode" id="cb29"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># mo_fullname() uses as.mo() internally</span> <span class="co"># mo_fullname() uses as.mo() internally</span>
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"Sthafilokockus aaureuz"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"Sthafilokockus aaureuz"</span><span class="op">)</span>
<span class="co">#&gt; [1] "Staphylococcus aureus"</span> <span class="co">#&gt; [1] "Staphylococcus aureus"</span>
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. klossi"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. klossi"</span><span class="op">)</span>
<span class="co">#&gt; [1] "Staphylococcus kloosii"</span></pre></div> <span class="co">#&gt; [1] "Staphylococcus kloosii"</span></code></pre></div>
</li> </li>
<li> <li>
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p> <p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
<div class="sourceCode" id="cb30"><pre class="downlit"> <div class="sourceCode" id="cb30"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># equal:</span> <span class="co"># equal:</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="fl">2</span><span class="op">)</span>
<span class="co"># also equal:</span> <span class="co"># also equal:</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="fl">0</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">...</span>, allow_uncertain <span class="op">=</span> <span class="fl">0</span><span class="op">)</span></code></pre></div>
<p>Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</p> <p>Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</p>
</li> </li>
<li><p>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em></p></li> <li><p>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em></p></li>
<li><p>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</p></li> <li><p>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</p></li>
<li> <li>
<p>Incoercible results will now be considered unknown, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p> <p>Incoercible results will now be considered unknown, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
<div class="sourceCode" id="cb31"><pre class="downlit"> <div class="sourceCode" id="cb31"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"qwerty"</span>, language <span class="op">=</span> <span class="st">"es"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"qwerty"</span>, language <span class="op">=</span> <span class="st">"es"</span><span class="op">)</span>
<span class="co"># Warning: </span> <span class="co"># Warning: </span>
<span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span> <span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span>
<span class="co">#&gt; [1] "(género desconocido)"</span></pre></div> <span class="co">#&gt; [1] "(género desconocido)"</span></code></pre></div>
</li> </li>
<li><p>Fix for vector containing only empty values</p></li> <li><p>Fix for vector containing only empty values</p></li>
<li><p>Finds better results when input is in other languages</p></li> <li><p>Finds better results when input is in other languages</p></li>
@ -1351,7 +1383,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p> <p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<div class="sourceCode" id="cb32"><pre class="downlit"> <div class="sourceCode" id="cb32"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span> <span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span>
<span class="co"># OLD WAY</span> <span class="co"># OLD WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
@ -1364,7 +1397,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># Even supports grouping variables:</span> <span class="co"># Even supports grouping variables:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</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">gender</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">gender</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li> <li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li> <li><p>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1434,11 +1467,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Fewer than 3 characters as input for <code>as.mo</code> will return NA</p></li> <li><p>Fewer than 3 characters as input for <code>as.mo</code> will return NA</p></li>
<li> <li>
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p> <p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
<div class="sourceCode" id="cb33"><pre class="downlit"> <div class="sourceCode" id="cb33"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. species"</span><span class="op">)</span> <span class="co"># B_ESCHR</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. species"</span><span class="op">)</span> <span class="co"># B_ESCHR</span>
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"E. spp."</span><span class="op">)</span> <span class="co"># "Escherichia species"</span> <span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"E. spp."</span><span class="op">)</span> <span class="co"># "Escherichia species"</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"S. spp"</span><span class="op">)</span> <span class="co"># B_STPHY</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"S. spp"</span><span class="op">)</span> <span class="co"># B_STPHY</span>
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. species"</span><span class="op">)</span> <span class="co"># "Staphylococcus species"</span></pre></div> <span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. species"</span><span class="op">)</span> <span class="co"># "Staphylococcus species"</span></code></pre></div>
</li> </li>
<li><p>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</p></li> <li><p>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</p></li>
<li><p>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</p></li> <li><p>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</p></li>
@ -1450,17 +1484,19 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li> <li>
<p>Support for grouping variables, test with:</p> <p>Support for grouping variables, test with:</p>
<div class="sourceCode" id="cb34"><pre class="downlit"> <div class="sourceCode" id="cb34"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</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">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">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li> </li>
<li> <li>
<p>Support for (un)selecting columns:</p> <p>Support for (un)selecting columns:</p>
<div class="sourceCode" id="cb35"><pre class="downlit"> <div class="sourceCode" id="cb35"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</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/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></code></pre></div>
</li> </li>
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li> <li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li>
<li><p>Now prints in markdown at default in non-interactive sessions</p></li> <li><p>Now prints in markdown at default in non-interactive sessions</p></li>
@ -1536,7 +1572,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li> </li>
</ul> </ul>
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p> <p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
<div class="sourceCode" id="cb36"><pre class="downlit"> <div class="sourceCode" id="cb36"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span>
<span class="co"># [1] "Gram negative"</span> <span class="co"># [1] "Gram negative"</span>
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span>, language <span class="op">=</span> <span class="st">"de"</span><span class="op">)</span> <span class="co"># German</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span>, language <span class="op">=</span> <span class="st">"de"</span><span class="op">)</span> <span class="co"># German</span>
@ -1544,12 +1581,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span>, language <span class="op">=</span> <span class="st">"es"</span><span class="op">)</span> <span class="co"># Spanish</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span>, language <span class="op">=</span> <span class="st">"es"</span><span class="op">)</span> <span class="co"># Spanish</span>
<span class="co"># [1] "Gram negativo"</span> <span class="co"># [1] "Gram negativo"</span>
<span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. group A"</span>, language <span class="op">=</span> <span class="st">"pt"</span><span class="op">)</span> <span class="co"># Portuguese</span> <span class="fu"><a href="../reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="st">"S. group A"</span>, language <span class="op">=</span> <span class="st">"pt"</span><span class="op">)</span> <span class="co"># Portuguese</span>
<span class="co"># [1] "Streptococcus grupo A"</span></pre></div> <span class="co"># [1] "Streptococcus grupo A"</span></code></pre></div>
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p> <p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
<div class="sourceCode" id="cb37"><pre class="downlit"> <div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"Esc blattae"</span><span class="op">)</span> <span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"Esc blattae"</span><span class="op">)</span>
<span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span> <span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span>
<span class="co"># [1] "Gram negative"</span></pre></div> <span class="co"># [1] "Gram negative"</span></code></pre></div>
</li> </li>
<li> <li>
<p>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates</p> <p>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates</p>
@ -1560,20 +1598,22 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Function <code>is.rsi.eligible</code> to check for columns that have valid antimicrobial results, but do not have the <code>rsi</code> class yet. Transform the columns of your raw data with: <code>data %&gt;% mutate_if(is.rsi.eligible, as.rsi)</code></p></li> <li><p>Function <code>is.rsi.eligible</code> to check for columns that have valid antimicrobial results, but do not have the <code>rsi</code> class yet. Transform the columns of your raw data with: <code>data %&gt;% mutate_if(is.rsi.eligible, as.rsi)</code></p></li>
<li> <li>
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p> <p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
<div class="sourceCode" id="cb38"><pre class="downlit"> <div class="sourceCode" id="cb38"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span>
<span class="co"># [1] B_ESCHR_COL</span> <span class="co"># [1] B_ESCHR_COL</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"MRSA"</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"MRSA"</span><span class="op">)</span>
<span class="co"># [1] B_STPHY_AUR</span> <span class="co"># [1] B_STPHY_AUR</span>
<span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"S group A"</span><span class="op">)</span> <span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"S group A"</span><span class="op">)</span>
<span class="co"># [1] B_STRPTC_GRA</span></pre></div> <span class="co"># [1] B_STRPTC_GRA</span></code></pre></div>
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p> <p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
<div class="sourceCode" id="cb39"><pre class="downlit"> <div class="sourceCode" id="cb39"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">thousands_of_E_colis</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html">rep</a></span><span class="op">(</span><span class="st">"E. coli"</span>, <span class="fl">25000</span><span class="op">)</span> <span class="va">thousands_of_E_colis</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html">rep</a></span><span class="op">(</span><span class="st">"E. coli"</span>, <span class="fl">25000</span><span class="op">)</span>
<span class="fu">microbenchmark</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span><span class="op">(</span><span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">thousands_of_E_colis</span><span class="op">)</span>, unit <span class="op">=</span> <span class="st">"s"</span><span class="op">)</span> <span class="fu">microbenchmark</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span><span class="op">(</span><span class="fu"><a href="../reference/as.mo.html">as.mo</a></span><span class="op">(</span><span class="va">thousands_of_E_colis</span><span class="op">)</span>, unit <span class="op">=</span> <span class="st">"s"</span><span class="op">)</span>
<span class="co"># Unit: seconds</span> <span class="co"># Unit: seconds</span>
<span class="co"># min median max neval</span> <span class="co"># min median max neval</span>
<span class="co"># 0.01817717 0.01843957 0.03878077 100</span></pre></div> <span class="co"># 0.01817717 0.01843957 0.03878077 100</span></code></pre></div>
</li> </li>
<li><p>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</p></li> <li><p>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</p></li>
<li> <li>
@ -1601,13 +1641,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li> <li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li>
<li> <li>
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p> <p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
<div class="sourceCode" id="cb40"><pre class="downlit"> <div class="sourceCode" id="cb40"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="fu">ab_official</span><span class="op">(</span><span class="st">"Bactroban"</span><span class="op">)</span> <span class="fu">ab_official</span><span class="op">(</span><span class="st">"Bactroban"</span><span class="op">)</span>
<span class="co"># [1] "Mupirocin"</span> <span class="co"># [1] "Mupirocin"</span>
<span class="fu"><a href="../reference/ab_property.html">ab_name</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="../reference/ab_property.html">ab_name</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span><span class="op">)</span><span class="op">)</span>
<span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span> <span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span>
<span class="fu"><a href="../reference/ab_property.html">ab_atc</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="../reference/ab_property.html">ab_atc</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span><span class="op">)</span><span class="op">)</span>
<span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></pre></div> <span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></code></pre></div>
</li> </li>
<li><p>For <code>first_isolate</code>, rows will be ignored when theres no species available</p></li> <li><p>For <code>first_isolate</code>, rows will be ignored when theres no species available</p></li>
<li><p>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</p></li> <li><p>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</p></li>
@ -1617,14 +1658,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Added parameters <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code></p></li> <li><p>Added parameters <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code></p></li>
<li> <li>
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p> <p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
<div class="sourceCode" id="cb41"><pre class="downlit"> <div class="sourceCode" id="cb41"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">amox</span>, <span class="va">cipr</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/count.html">count_IR</a></span><span class="op">(</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">amox</span>, <span class="va">cipr</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/count.html">count_IR</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># which is the same as:</span> <span class="co"># which is the same as:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/count.html">count_IR</a></span><span class="op">(</span><span class="va">amox</span>, <span class="va">cipr</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/count.html">count_IR</a></span><span class="op">(</span><span class="va">amox</span>, <span class="va">cipr</span><span class="op">)</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span><span class="op">)</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span>, <span class="va">gent</span><span class="op">)</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span>, <span class="va">gent</span><span class="op">)</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span>, <span class="va">gent</span>, <span class="va">pita</span><span class="op">)</span></pre></div> <span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="fu">portion_S</span><span class="op">(</span><span class="va">amcl</span>, <span class="va">gent</span>, <span class="va">pita</span><span class="op">)</span></code></pre></div>
</li> </li>
<li><p>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</p></li> <li><p>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</p></li>
<li><p>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</p></li> <li><p>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</p></li>
@ -1636,14 +1678,16 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Added longest en shortest character length in the frequency table (<code>freq</code>) header of class <code>character</code></p></li> <li><p>Added longest en shortest character length in the frequency table (<code>freq</code>) header of class <code>character</code></p></li>
<li> <li>
<p>Support for types (classes) list and matrix for <code>freq</code></p> <p>Support for types (classes) list and matrix for <code>freq</code></p>
<div class="sourceCode" id="cb42"><pre class="downlit"> <div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span> <span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
<p>For lists, subsetting is possible:</p> <p>For lists, subsetting is possible:</p>
<div class="sourceCode" id="cb43"><pre class="downlit"> <div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span> <span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div> <span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li> </li>
</ul> </ul>
</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-13T19:44Z last_built: 2020-12-16T14:24Z
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

@ -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.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -90,14 +90,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="../index.html"> <a href="../index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -106,77 +106,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="../articles/AMR.html"> <a href="../articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/resistance_predict.html"> <a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/datasets.html"> <a href="../articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/PCA.html"> <a href="../articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/MDR.html"> <a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/WHONET.html"> <a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/SPSS.html"> <a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/EUCAST.html"> <a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/mo_property.html"> <a href="../reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/ab_property.html"> <a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/benchmarks.html"> <a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -185,21 +185,21 @@
</li> </li>
<li> <li>
<a href="../reference/index.html"> <a href="../reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="../authors.html"> <a href="../authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="../news/index.html"> <a href="../news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -208,14 +208,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="../survey.html"> <a href="../survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>
@ -290,7 +290,8 @@ Department of Medical Microbiology
University Medical Center Groningen <br /> University Medical Center Groningen <br />
Post Office Box 30001 <br /> Post Office Box 30001 <br />
9700 RB Groningen <br /> 9700 RB Groningen <br />
The Netherlands</p> The Netherlands
<a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a></p>
<p>If you have found a bug, please file a new issue at: <br /> <p>If you have found a bug, please file a new issue at: <br />
<a href='https://github.com/msberends/AMR/issues'>https://github.com/msberends/AMR/issues</a></p> <a href='https://github.com/msberends/AMR/issues'>https://github.com/msberends/AMR/issues</a></p>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="../index.html"> <a href="../index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="../articles/AMR.html"> <a href="../articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/resistance_predict.html"> <a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/datasets.html"> <a href="../articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/PCA.html"> <a href="../articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/MDR.html"> <a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/WHONET.html"> <a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/SPSS.html"> <a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/EUCAST.html"> <a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/mo_property.html"> <a href="../reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/ab_property.html"> <a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/benchmarks.html"> <a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="../reference/index.html"> <a href="../reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="../authors.html"> <a href="../authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="../news/index.html"> <a href="../news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="../survey.html"> <a href="../survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>
@ -449,7 +449,7 @@
<td> <td>
<p><code><a href="plot.html">plot(<i>&lt;disk&gt;</i>)</a></code> <code><a href="plot.html">plot(<i>&lt;mic&gt;</i>)</a></code> <code><a href="plot.html">barplot(<i>&lt;mic&gt;</i>)</a></code> <code><a href="plot.html">plot(<i>&lt;rsi&gt;</i>)</a></code> <code><a href="plot.html">barplot(<i>&lt;rsi&gt;</i>)</a></code> </p> <p><code><a href="plot.html">plot(<i>&lt;disk&gt;</i>)</a></code> <code><a href="plot.html">plot(<i>&lt;mic&gt;</i>)</a></code> <code><a href="plot.html">barplot(<i>&lt;mic&gt;</i>)</a></code> <code><a href="plot.html">plot(<i>&lt;rsi&gt;</i>)</a></code> <code><a href="plot.html">barplot(<i>&lt;rsi&gt;</i>)</a></code> </p>
</td> </td>
<td><p>Plotting for classes <code>rsi</code> and <code>disk</code></p></td> <td><p>Plotting for classes <code>rsi</code>, <code>mic</code> and <code>disk</code></p></td>
</tr> </tr>
</tbody><tbody> </tbody><tbody>
<tr> <tr>

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plotting for classes rsi and disk — plot • AMR (for R)</title> <title>Plotting for classes rsi, mic and disk — plot • AMR (for R)</title>
<!-- favicons --> <!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@ -48,7 +48,7 @@
<link href="../extra.css" rel="stylesheet"> <link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script> <script src="../extra.js"></script>
<meta property="og:title" content="Plotting for classes rsi and disk — plot" /> <meta property="og:title" content="Plotting for classes rsi, mic and disk — plot" />
<meta property="og:description" content="Functions to print classes of the AMR package." /> <meta property="og:description" content="Functions to print classes of the AMR package." />
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -90,14 +90,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="../index.html"> <a href="../index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -106,77 +106,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="../articles/AMR.html"> <a href="../articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/resistance_predict.html"> <a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/datasets.html"> <a href="../articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/PCA.html"> <a href="../articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/MDR.html"> <a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/WHONET.html"> <a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/SPSS.html"> <a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/EUCAST.html"> <a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/mo_property.html"> <a href="../reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="../reference/ab_property.html"> <a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="../articles/benchmarks.html"> <a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -185,21 +185,21 @@
</li> </li>
<li> <li>
<a href="../reference/index.html"> <a href="../reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="../authors.html"> <a href="../authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="../news/index.html"> <a href="../news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -208,14 +208,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="../survey.html"> <a href="../survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>
@ -233,7 +233,7 @@
<div class="row"> <div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header"> <div class="page-header">
<h1>Plotting for classes <code>rsi</code> and <code>disk</code></h1> <h1>Plotting for classes <code>rsi</code>, <code>mic</code> and <code>disk</code></h1>
<small class="dont-index">Source: <a href='https://github.com/msberends/AMR/blob/master/R/amr.R'><code>R/amr.R</code></a>, <a href='https://github.com/msberends/AMR/blob/master/R/disk.R'><code>R/disk.R</code></a>, <a href='https://github.com/msberends/AMR/blob/master/R/mic.R'><code>R/mic.R</code></a>, and 1 more</small> <small class="dont-index">Source: <a href='https://github.com/msberends/AMR/blob/master/R/amr.R'><code>R/amr.R</code></a>, <a href='https://github.com/msberends/AMR/blob/master/R/disk.R'><code>R/disk.R</code></a>, <a href='https://github.com/msberends/AMR/blob/master/R/mic.R'><code>R/mic.R</code></a>, and 1 more</small>
<div class="hidden name"><code>plot.Rd</code></div> <div class="hidden name"><code>plot.Rd</code></div>
</div> </div>

View File

@ -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.9039</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9040</span>
</span> </span>
</div> </div>
@ -89,14 +89,14 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
<a href="index.html"> <a href="index.html">
<span class="fa fa-home"></span> <span class="fas fa-home"></span>
Home Home
</a> </a>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span> <span class="fas fa-question-circle"></span>
How to How to
@ -105,77 +105,77 @@
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li> <li>
<a href="articles/AMR.html"> <a href="articles/AMR.html">
<span class="fa fa-directions"></span> <span class="fas fa-directions"></span>
Conduct AMR analysis Conduct AMR analysis
</a> </a>
</li> </li>
<li> <li>
<a href="articles/resistance_predict.html"> <a href="articles/resistance_predict.html">
<span class="fa fa-dice"></span> <span class="fas fa-dice"></span>
Predict antimicrobial resistance Predict antimicrobial resistance
</a> </a>
</li> </li>
<li> <li>
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<span class="fa fa-database"></span> <span class="fas fa-database"></span>
Data sets for download / own use Data sets for download / own use
</a> </a>
</li> </li>
<li> <li>
<a href="articles/PCA.html"> <a href="articles/PCA.html">
<span class="fa fa-compress"></span> <span class="fas fa-compress"></span>
Conduct principal component analysis for AMR Conduct principal component analysis for AMR
</a> </a>
</li> </li>
<li> <li>
<a href="articles/MDR.html"> <a href="articles/MDR.html">
<span class="fa fa-skull-crossbones"></span> <span class="fas fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR) Determine multi-drug resistance (MDR)
</a> </a>
</li> </li>
<li> <li>
<a href="articles/WHONET.html"> <a href="articles/WHONET.html">
<span class="fa fa-globe-americas"></span> <span class="fas fa-globe-americas"></span>
Work with WHONET data Work with WHONET data
</a> </a>
</li> </li>
<li> <li>
<a href="articles/SPSS.html"> <a href="articles/SPSS.html">
<span class="fa fa-file-upload"></span> <span class="fas fa-file-upload"></span>
Import data from SPSS/SAS/Stata Import data from SPSS/SAS/Stata
</a> </a>
</li> </li>
<li> <li>
<a href="articles/EUCAST.html"> <a href="articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span> <span class="fas fa-exchange-alt"></span>
Apply EUCAST rules Apply EUCAST rules
</a> </a>
</li> </li>
<li> <li>
<a href="reference/mo_property.html"> <a href="reference/mo_property.html">
<span class="fa fa-bug"></span> <span class="fas fa-bug"></span>
Get properties of a microorganism Get properties of a microorganism
</a> </a>
</li> </li>
<li> <li>
<a href="reference/ab_property.html"> <a href="reference/ab_property.html">
<span class="fa fa-capsules"></span> <span class="fas fa-capsules"></span>
Get properties of an antibiotic Get properties of an antibiotic
</a> </a>
</li> </li>
<li> <li>
<a href="articles/benchmarks.html"> <a href="articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span> <span class="fas fa-shipping-fast"></span>
Other: benchmarks Other: benchmarks
</a> </a>
@ -184,21 +184,21 @@
</li> </li>
<li> <li>
<a href="reference/index.html"> <a href="reference/index.html">
<span class="fa fa-book-open"></span> <span class="fas fa-book-open"></span>
Manual Manual
</a> </a>
</li> </li>
<li> <li>
<a href="authors.html"> <a href="authors.html">
<span class="fa fa-users"></span> <span class="fas fa-users"></span>
Authors Authors
</a> </a>
</li> </li>
<li> <li>
<a href="news/index.html"> <a href="news/index.html">
<span class="far fa far fa-newspaper"></span> <span class="far fa-newspaper"></span>
Changelog Changelog
</a> </a>
@ -207,14 +207,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="https://github.com/msberends/AMR"> <a href="https://github.com/msberends/AMR">
<span class="fab fa fab fa-github"></span> <span class="fab fa-github"></span>
Source Code Source Code
</a> </a>
</li> </li>
<li> <li>
<a href="survey.html"> <a href="survey.html">
<span class="fa fa-clipboard-list"></span> <span class="fas fa-clipboard-list"></span>
Survey Survey
</a> </a>

View File

@ -42,6 +42,7 @@ example_isolates %>%
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_negative()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant: With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_negative()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant:
| mo | AMK | GEN | KAN | TOB | IPM | MEM | | mo | AMK | GEN | KAN | TOB | IPM | MEM |
|:------------------------------|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:| |:------------------------------|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
|*Pseudomonas aeruginosa* | | I | R | S | S | | |*Pseudomonas aeruginosa* | | I | R | S | S | |
@ -51,33 +52,6 @@ With only having defined a row filter on Gram-negative bacteria with intrinsic r
|*Stenotrophomonas maltophilia* | R | R | R | R | R | R | |*Stenotrophomonas maltophilia* | R | R | R | R | R | R |
|*Pseudomonas aeruginosa* | S | S | R | S | | S | |*Pseudomonas aeruginosa* | S | S | R | S | | S |
<div class="home-buttons">
<a href="articles/datasets.html">
<div style="background-color: #128f7635;">
<div class="fa fa-database"></div>
<span>Download our data sets</span>
</div>
</a>
<a href="articles/AMR.html">
<div style="background-color: #138F3865;">
<div class="fa fa-chalkboard-teacher"></div>
<span>Start learning AMR analysis</span>
</div>
</a>
<a href="reference/as.rsi.html">
<div style="background-color: #128f7650;">
<div class="fa fa-language"></div>
<span>Interpret MIC/disk values to R/SI</span>
</div>
</a>
<a href="articles/MDR.html">
<div style="background-color: #138F3835;">
<div class="fa fa-skull-crossbones"></div>
<span>Determine multi-drug resistance (MDR)</span>
</div>
</a>
</div>
#### Partners #### Partners
The development of this package is part of, related to, or made possible by: The development of this package is part of, related to, or made possible by:

View File

@ -55,6 +55,7 @@ University Medical Center Groningen \cr
Post Office Box 30001 \cr Post Office Box 30001 \cr
9700 RB Groningen \cr 9700 RB Groningen \cr
The Netherlands The Netherlands
\url{https://msberends.github.io/AMR/}
If you have found a bug, please file a new issue at: \cr If you have found a bug, please file a new issue at: \cr
\url{https://github.com/msberends/AMR/issues} \url{https://github.com/msberends/AMR/issues}

View File

@ -7,7 +7,7 @@
\alias{barplot.mic} \alias{barplot.mic}
\alias{plot.rsi} \alias{plot.rsi}
\alias{barplot.rsi} \alias{barplot.rsi}
\title{Plotting for classes \code{rsi} and \code{disk}} \title{Plotting for classes \code{rsi}, \code{mic} and \code{disk}}
\usage{ \usage{
\method{plot}{disk}( \method{plot}{disk}(
x, x,