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

(v1.6.0.9063) prepare new release

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-05-24 09:00:11 +02:00
parent 06302d296a
commit a13fd98e8b
64 changed files with 157 additions and 107 deletions

View File

@ -141,7 +141,7 @@ jobs:
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }} R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
R_RUN_TINYTEST: true R_RUN_TINYTEST: true
run: | run: |
R CMD check --no-manual AMR R CMD check --no-manual --run-donttest --run-dontrun AMR
shell: bash shell: bash
- name: Show unit tests output - name: Show unit tests output

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 1.6.0.9062 Version: 1.6.0.9063
Date: 2021-05-24 Date: 2021-05-24
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Authors@R: c( Authors@R: c(

View File

@ -1,4 +1,4 @@
# `AMR` 1.6.0.9062 # `AMR` 1.6.0.9063
## <small>Last updated: 24 May 2021</small> ## <small>Last updated: 24 May 2021</small>
### Breaking change ### Breaking change

3
R/ab.R
View File

@ -82,7 +82,7 @@
#' # they use as.ab() internally: #' # they use as.ab() internally:
#' ab_name("J01FA01") # "Erythromycin" #' ab_name("J01FA01") # "Erythromycin"
#' ab_name("eryt") # "Erythromycin" #' ab_name("eryt") # "Erythromycin"
#' #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' #'
#' # you can quickly rename <rsi> columns using dplyr >= 1.0.0: #' # you can quickly rename <rsi> columns using dplyr >= 1.0.0:
@ -90,6 +90,7 @@
#' rename_with(as.ab, where(is.rsi)) #' rename_with(as.ab, where(is.rsi))
#' #'
#' } #' }
#' }
as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) { as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
meet_criteria(x, allow_class = c("character", "numeric", "integer", "factor"), allow_NA = TRUE) meet_criteria(x, allow_class = c("character", "numeric", "integer", "factor"), allow_NA = TRUE)
meet_criteria(flag_multiple_results, allow_class = "logical", has_length = 1) meet_criteria(flag_multiple_results, allow_class = "logical", has_length = 1)

View File

@ -70,7 +70,7 @@
#' #'
#' #'
#' # dplyr ------------------------------------------------------------------- #' # dplyr -------------------------------------------------------------------
#' #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' #'
#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): #' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
@ -119,6 +119,7 @@
#' example_isolates %>% filter(carbapenems() == "R") #' example_isolates %>% filter(carbapenems() == "R")
#' example_isolates %>% filter(across(carbapenems(), ~.x == "R")) #' example_isolates %>% filter(across(carbapenems(), ~.x == "R"))
#' } #' }
#' }
ab_class <- function(ab_class, ab_class <- function(ab_class,
only_rsi_columns = FALSE) { only_rsi_columns = FALSE) {
ab_selector(ab_class, function_name = "ab_class", only_rsi_columns = only_rsi_columns) ab_selector(ab_class, function_name = "ab_class", only_rsi_columns = only_rsi_columns)

View File

@ -88,13 +88,13 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
# add decimal parts of year # add decimal parts of year
mod <- n_days_x_rest / n_days_reference_year mod <- n_days_x_rest / n_days_reference_year
# negative mods are cases where `x_in_reference_year` > `reference` - so 'add' a year # negative mods are cases where `x_in_reference_year` > `reference` - so 'add' a year
mod[mod < 0] <- mod[mod < 0] + 1 mod[!is.na(mod) & mod < 0] <- mod[!is.na(mod) & mod < 0] + 1
# and finally add to ages # and finally add to ages
ages <- ages + mod ages <- ages + mod
} }
if (any(ages < 0, na.rm = TRUE)) { if (any(ages < 0, na.rm = TRUE)) {
ages[ages < 0] <- NA ages[!is.na(ages) & ages < 0] <- NA
warning_("NAs introduced for ages below 0.", call = TRUE) warning_("NAs introduced for ages below 0.", call = TRUE)
} }
if (any(ages > 120, na.rm = TRUE)) { if (any(ages > 120, na.rm = TRUE)) {

View File

@ -64,7 +64,7 @@
#' @inheritSection AMR Read more on Our Website! #' @inheritSection AMR Read more on Our Website!
#' @source <https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/> #' @source <https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/>
#' @examples #' @examples
#' \donttest{ #' \dontrun{
#' # oral DDD (Defined Daily Dose) of amoxicillin #' # oral DDD (Defined Daily Dose) of amoxicillin
#' atc_online_property("J01CA04", "DDD", "O") #' atc_online_property("J01CA04", "DDD", "O")
#' #'

View File

@ -35,13 +35,14 @@
#' @export #' @export
#' @examples #' @examples
#' availability(example_isolates) #' availability(example_isolates)
#' #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' example_isolates %>% #' example_isolates %>%
#' filter(mo == as.mo("E. coli")) %>% #' filter(mo == as.mo("E. coli")) %>%
#' select_if(is.rsi) %>% #' select_if(is.rsi) %>%
#' availability() #' availability()
#' } #' }
#' }
availability <- function(tbl, width = NULL) { availability <- function(tbl, width = NULL) {
meet_criteria(tbl, allow_class = "data.frame") meet_criteria(tbl, allow_class = "data.frame")
meet_criteria(width, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE) meet_criteria(width, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)

View File

@ -72,7 +72,7 @@
#' count_susceptible(example_isolates$AMX) #' count_susceptible(example_isolates$AMX)
#' susceptibility(example_isolates$AMX) * n_rsi(example_isolates$AMX) #' susceptibility(example_isolates$AMX) * n_rsi(example_isolates$AMX)
#' #'
#' #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' example_isolates %>% #' example_isolates %>%
#' group_by(hospital_id) %>% #' group_by(hospital_id) %>%
@ -106,6 +106,7 @@
#' group_by(hospital_id) %>% #' group_by(hospital_id) %>%
#' count_df(translate = FALSE) #' count_df(translate = FALSE)
#' } #' }
#' }
count_resistant <- function(..., only_all_tested = FALSE) { count_resistant <- function(..., only_all_tested = FALSE) {
rsi_calc(..., rsi_calc(...,
ab_result = "R", ab_result = "R",

View File

@ -269,12 +269,14 @@
#' @inheritSection AMR Reference Data Publicly Available #' @inheritSection AMR Reference Data Publicly Available
#' @inheritSection AMR Read more on Our Website! #' @inheritSection AMR Read more on Our Website!
#' @examples #' @examples
#' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' intrinsic_resistant %>% #' intrinsic_resistant %>%
#' filter(antibiotic == "Vancomycin", microorganism %like% "Enterococcus") %>% #' filter(antibiotic == "Vancomycin", microorganism %like% "Enterococcus") %>%
#' pull(microorganism) #' pull(microorganism)
#' # [1] "Enterococcus casseliflavus" "Enterococcus gallinarum" #' # [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
#' } #' }
#' }
"intrinsic_resistant" "intrinsic_resistant"
#' Data Set with Treatment Dosages as Defined by EUCAST #' Data Set with Treatment Dosages as Defined by EUCAST

View File

@ -65,6 +65,7 @@
#' # See ?example_isolates. #' # See ?example_isolates.
#' #'
#' # See ?pca for more info about Principal Component Analysis (PCA). #' # See ?pca for more info about Principal Component Analysis (PCA).
#' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' pca_model <- example_isolates %>% #' pca_model <- example_isolates %>%
#' filter(mo_genus(mo) == "Staphylococcus") %>% #' filter(mo_genus(mo) == "Staphylococcus") %>%
@ -84,6 +85,7 @@
#' labs(title = "Title here") #' labs(title = "Title here")
#' } #' }
#' } #' }
#' }
ggplot_pca <- function(x, ggplot_pca <- function(x,
choices = 1:2, choices = 1:2,
scale = 1, scale = 1,

View File

@ -67,6 +67,7 @@
#' @export #' @export
#' @inheritSection AMR Read more on Our Website! #' @inheritSection AMR Read more on Our Website!
#' @examples #' @examples
#' \donttest{
#' if (require("ggplot2") & require("dplyr")) { #' if (require("ggplot2") & require("dplyr")) {
#' #'
#' # get antimicrobial results for drugs against a UTI: #' # get antimicrobial results for drugs against a UTI:
@ -116,7 +117,6 @@
#' scale_rsi_colours(Value4 = "S", Value5 = "I", Value6 = "R") #' scale_rsi_colours(Value4 = "S", Value5 = "I", Value6 = "R")
#' } #' }
#' #'
#' \donttest{
#' # resistance of ciprofloxacine per age group #' # resistance of ciprofloxacine per age group
#' example_isolates %>% #' example_isolates %>%
#' mutate(first_isolate = first_isolate(.)) %>% #' mutate(first_isolate = first_isolate(.)) %>%

View File

@ -45,12 +45,13 @@
#' #'
#' # since ggplot2 supports no markdown (yet), use #' # since ggplot2 supports no markdown (yet), use
#' # italicise_taxonomy() and the `ggtext` pkg for titles: #' # italicise_taxonomy() and the `ggtext` pkg for titles:
#' #' \donttest{
#' if (require("ggplot2") && require("ggtext")) { #' if (require("ggplot2") && require("ggtext")) {
#' ggplot(example_isolates$AMC, #' ggplot(example_isolates$AMC,
#' title = italicise_taxonomy("Amoxi/clav in E. coli")) + #' title = italicise_taxonomy("Amoxi/clav in E. coli")) +
#' theme(plot.title = ggtext::element_markdown()) #' theme(plot.title = ggtext::element_markdown())
#' } #' }
#' }
italicise_taxonomy <- function(string, type = c("markdown", "ansi")) { italicise_taxonomy <- function(string, type = c("markdown", "ansi")) {
if (missing(type)) { if (missing(type)) {
type <- "markdown" type <- "markdown"

View File

@ -152,6 +152,7 @@
#' mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE #' mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE
#' #'
#' # gram stains and intrinsic resistance can also be used as a filter in dplyr verbs #' # gram stains and intrinsic resistance can also be used as a filter in dplyr verbs
#' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' example_isolates %>% #' example_isolates %>%
#' filter(mo_is_gram_positive()) #' filter(mo_is_gram_positive())
@ -167,6 +168,7 @@
#' # SNOMED codes, and URL to the online database #' # SNOMED codes, and URL to the online database
#' mo_info("E. coli") #' mo_info("E. coli")
#' } #' }
#' }
mo_name <- function(x, language = get_locale(), ...) { mo_name <- function(x, language = get_locale(), ...) {
if (missing(x)) { if (missing(x)) {
# this tries to find the data and an <mo> column # this tries to find the data and an <mo> column

View File

@ -42,7 +42,6 @@
#' # See ?example_isolates. #' # See ?example_isolates.
#' #'
#' \donttest{ #' \donttest{
#'
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' # calculate the resistance per group first #' # calculate the resistance per group first
#' resistance_data <- example_isolates %>% #' resistance_data <- example_isolates %>%

View File

@ -61,11 +61,13 @@
#' plot(some_mic_values, mo = "S. aureus", ab = "ampicillin") #' plot(some_mic_values, mo = "S. aureus", ab = "ampicillin")
#' plot(some_disk_values, mo = "Escherichia coli", ab = "cipro") #' plot(some_disk_values, mo = "Escherichia coli", ab = "cipro")
#' #'
#' \donttest{
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' ggplot(some_mic_values) #' ggplot(some_mic_values)
#' ggplot(some_disk_values, mo = "Escherichia coli", ab = "cipro") #' ggplot(some_disk_values, mo = "Escherichia coli", ab = "cipro")
#' ggplot(some_rsi_values) #' ggplot(some_rsi_values)
#' } #' }
#' }
NULL NULL
#' @method plot mic #' @method plot mic

View File

@ -103,6 +103,7 @@
#' proportion_IR(example_isolates$AMX) #' proportion_IR(example_isolates$AMX)
#' proportion_R(example_isolates$AMX) #' proportion_R(example_isolates$AMX)
#' #'
#' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' example_isolates %>% #' example_isolates %>%
#' group_by(hospital_id) %>% #' group_by(hospital_id) %>%
@ -161,6 +162,7 @@
#' group_by(hospital_id) %>% #' group_by(hospital_id) %>%
#' proportion_df(translate = FALSE) #' proportion_df(translate = FALSE)
#' } #' }
#' }
resistance <- function(..., resistance <- function(...,
minimum = 30, minimum = 30,
as_percent = FALSE, as_percent = FALSE,

View File

@ -70,6 +70,7 @@
#' year_min = 2010, #' year_min = 2010,
#' model = "binomial") #' model = "binomial")
#' plot(x) #' plot(x)
#' \donttest{
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' ggplot_rsi_predict(x) #' ggplot_rsi_predict(x)
#' } #' }
@ -114,6 +115,7 @@
#' x = "Year") + #' x = "Year") +
#' theme_minimal(base_size = 13) #' theme_minimal(base_size = 13)
#' } #' }
#' }
resistance_predict <- function(x, resistance_predict <- function(x,
col_ab, col_ab,
col_date = NULL, col_date = NULL,

View File

@ -101,12 +101,12 @@
#' @inheritSection AMR Read more on Our Website! #' @inheritSection AMR Read more on Our Website!
#' @examples #' @examples
#' summary(example_isolates) # see all R/SI results at a glance #' summary(example_isolates) # see all R/SI results at a glance
#' #' \donttest{
#' if (require("skimr")) { #' if (require("skimr")) {
#' # class <rsi> supported in skim() too: #' # class <rsi> supported in skim() too:
#' skim(example_isolates) #' skim(example_isolates)
#' } #' }
#' #' }
#' # For INTERPRETING disk diffusion and MIC values ----------------------- #' # For INTERPRETING disk diffusion and MIC values -----------------------
#' #'
#' # a whole data set, even with combined MIC values and disk zones #' # a whole data set, even with combined MIC values and disk zones

View File

@ -1 +1,3 @@
* This package has been archived on 22 May 2021 because of errors in the dplyr package, causing the skimr package to fail: <https://github.com/tidyverse/dplyr/issues/5881>. This AMR package contains a fix around this error. Nonetheless, an automated email sent to the maintainer with a warning that the AMR package would be archived would have saved us this archiving. Perhaps an idea for future development of CRAN?
* This package has a tarball size of over 7 MB and an installation size of over 5 MB, which will return a NOTE on R CMD CHECK. The package size is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software 4 weeks ago. We will add the paper as a vignette in the next version. Please allow this exception in package size for CRAN. We already compressed all data sets using `compression = "xz"` to make them as small as possible. * This package has a tarball size of over 7 MB and an installation size of over 5 MB, which will return a NOTE on R CMD CHECK. The package size is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software 4 weeks ago. We will add the paper as a vignette in the next version. Please allow this exception in package size for CRAN. We already compressed all data sets using `compression = "xz"` to make them as small as possible.

Binary file not shown.

View File

@ -24,7 +24,7 @@
# ==================================================================== # # ==================================================================== #
# some old R instances have trouble installing tinytest, so we ship it too # some old R instances have trouble installing tinytest, so we ship it too
install.packages("data-raw/tinytest_1.2.4.patched.tar.gz") install.packages("data-raw/tinytest_1.2.4.10.tar.gz")
install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE) install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE)
pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?"))) pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?")))

Binary file not shown.

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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>

View File

@ -39,7 +39,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>

View File

@ -42,7 +42,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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -236,9 +236,9 @@
<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-1609062" class="section level1"> <div id="amr-1609063" class="section level1">
<h1 class="page-header" data-toc-text="1.6.0.9062"> <h1 class="page-header" data-toc-text="1.6.0.9063">
<a href="#amr-1609062" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.6.0.9062</h1> <a href="#amr-1609063" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.6.0.9063</h1>
<div id="last-updated-24-may-2021" class="section level2"> <div id="last-updated-24-may-2021" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-24-may-2021" class="anchor"></a><small>Last updated: 24 May 2021</small> <a href="#last-updated-24-may-2021" class="anchor"></a><small>Last updated: 24 May 2021</small>
@ -288,7 +288,7 @@
</ul> </ul>
</li> </li>
<li>Function <code><a href="../reference/antibiotic_class_selectors.html">betalactams()</a></code> as additional antbiotic column selector and function <code><a href="../reference/AMR-deprecated.html">filter_betalactams()</a></code> as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.</li> <li>Function <code><a href="../reference/antibiotic_class_selectors.html">betalactams()</a></code> as additional antbiotic column selector and function <code><a href="../reference/AMR-deprecated.html">filter_betalactams()</a></code> as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.</li>
<li>A <code>ggplot()</code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code> <li>A <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>
</li> </li>
</ul> </ul>
</div> </div>
@ -387,7 +387,7 @@
<span class="co">#&gt; Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div> <span class="co">#&gt; Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div>
</li> </li>
<li><p>Support for custom MDRO guidelines, using the new <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><a href="../reference/mdro.html">mdro()</a></code> for additional info</p></li> <li><p>Support for custom MDRO guidelines, using the new <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><a href="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p><code>ggplot()</code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li> <li><p><code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li>
<li> <li>
<p>Function <code><a href="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p> <p>Function <code><a href="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
@ -444,7 +444,7 @@
<li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li> <li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li> <li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li>
<li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li> <li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code>ggplot()</code> on any vector of MIC and disk diffusion values</li> <li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> on any vector of MIC and disk diffusion values</li>
</ul> </ul>
</li> </li>
<li>Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the <code>microorganisms</code> data set</li> <li>Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the <code>microorganisms</code> data set</li>
@ -461,7 +461,7 @@
<code><a href="../reference/as.rsi.html">is.rsi.eligible()</a></code> now detects if the column name resembles an antibiotic name or code and now returns <code>TRUE</code> immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li> <code><a href="../reference/as.rsi.html">is.rsi.eligible()</a></code> now detects if the column name resembles an antibiotic name or code and now returns <code>TRUE</code> immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li>
<li>Functions <code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> now support less than a day as value for argument <code>episode_days</code> (e.g., to include one patient/test per hour)</li> <li>Functions <code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> now support less than a day as value for argument <code>episode_days</code> (e.g., to include one patient/test per hour)</li>
<li>Argument <code>ampc_cephalosporin_resistance</code> in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li> <li>Argument <code>ampc_cephalosporin_resistance</code> in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
<li>Functions <code><a href="https://rdrr.io/r/base/print.html">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">dplyr::group_by()</a></code> <li>Functions <code><a href="https://docs.ropensci.org/skimr/reference/print.html">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">dplyr::group_by()</a></code>
</li> </li>
<li>Improved speed and reliability of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li> <li>Improved speed and reliability of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
<li>Fix for <code><a href="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li> <li>Fix for <code><a href="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li>

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: 2021-05-23T22:05Z last_built: 2021-05-24T06:56Z
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

@ -83,7 +83,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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -342,7 +342,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='co'># dplyr -------------------------------------------------------------------</span> <span class='co'># dplyr -------------------------------------------------------------------</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):</span> <span class='co'># this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):</span>
@ -391,6 +391,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<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'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</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'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</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='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span>, <span class='op'>~</span><span class='va'>.x</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</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='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span>, <span class='op'>~</span><span class='va'>.x</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -347,7 +347,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<span class='co'># they use as.ab() internally:</span> <span class='co'># they use as.ab() internally:</span>
<span class='fu'><a href='ab_property.html'>ab_name</a></span><span class='op'>(</span><span class='st'>"J01FA01"</span><span class='op'>)</span> <span class='co'># "Erythromycin"</span> <span class='fu'><a href='ab_property.html'>ab_name</a></span><span class='op'>(</span><span class='st'>"J01FA01"</span><span class='op'>)</span> <span class='co'># "Erythromycin"</span>
<span class='fu'><a href='ab_property.html'>ab_name</a></span><span class='op'>(</span><span class='st'>"eryt"</span><span class='op'>)</span> <span class='co'># "Erythromycin"</span> <span class='fu'><a href='ab_property.html'>ab_name</a></span><span class='op'>(</span><span class='st'>"eryt"</span><span class='op'>)</span> <span class='co'># "Erythromycin"</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># you can quickly rename &lt;rsi&gt; columns using dplyr &gt;= 1.0.0:</span> <span class='co'># you can quickly rename &lt;rsi&gt; columns using dplyr &gt;= 1.0.0:</span>
@ -355,6 +355,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/rename.html'>rename_with</a></span><span class='op'>(</span><span class='va'>as.ab</span>, <span class='fu'>where</span><span class='op'>(</span><span class='va'>is.rsi</span><span class='op'>)</span><span class='op'>)</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/rename.html'>rename_with</a></span><span class='op'>(</span><span class='va'>as.ab</span>, <span class='fu'>where</span><span class='op'>(</span><span class='va'>is.rsi</span><span class='op'>)</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -419,12 +419,12 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span> <span class='co'># see all R/SI results at a glance</span> <pre class="examples"><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span> <span class='co'># see all R/SI results at a glance</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://docs.ropensci.org/skimr/'>"skimr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://docs.ropensci.org/skimr/'>"skimr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># class &lt;rsi&gt; supported in skim() too:</span> <span class='co'># class &lt;rsi&gt; supported in skim() too:</span>
<span class='fu'><a href='https://docs.ropensci.org/skimr/reference/skim.html'>skim</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span> <span class='fu'><a href='https://docs.ropensci.org/skimr/reference/skim.html'>skim</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
<span class='co'># For INTERPRETING disk diffusion and MIC values -----------------------</span> <span class='co'># For INTERPRETING disk diffusion and MIC values -----------------------</span>
<span class='co'># a whole data set, even with combined MIC values and disk zones</span> <span class='co'># a whole data set, even with combined MIC values and disk zones</span>

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -327,7 +327,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p> <p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># \donttest{</span> <pre class="examples"><span class='kw'>if</span> <span class='op'>(</span><span class='cn'>FALSE</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># oral DDD (Defined Daily Dose) of amoxicillin</span> <span class='co'># oral DDD (Defined Daily Dose) of amoxicillin</span>
<span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span><span class='op'>)</span> <span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span><span class='op'>)</span>
@ -335,7 +335,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span><span class='op'>)</span> <span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span><span class='op'>)</span>
<span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, property <span class='op'>=</span> <span class='st'>"groups"</span><span class='op'>)</span> <span class='co'># search hierarchical groups of amoxicillin</span> <span class='fu'>atc_online_property</span><span class='op'>(</span><span class='st'>"J01CA04"</span>, property <span class='op'>=</span> <span class='st'>"groups"</span><span class='op'>)</span> <span class='co'># search hierarchical groups of amoxicillin</span>
<span class='co'># }</span> <span class='op'>}</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9011</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</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>
@ -278,13 +278,14 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='fu'>availability</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span> <pre class="examples"><span class='fu'>availability</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</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='va'>mo</span> <span class='op'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"E. coli"</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'>mo</span> <span class='op'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"E. coli"</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_all.html'>select_if</a></span><span class='op'>(</span><span class='va'>is.rsi</span><span class='op'>)</span> <span class='op'>%&gt;%</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/select_all.html'>select_if</a></span><span class='op'>(</span><span class='va'>is.rsi</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'>availability</span><span class='op'>(</span><span class='op'>)</span> <span class='fu'>availability</span><span class='op'>(</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

View File

@ -83,7 +83,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
</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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -399,7 +399,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class='fu'>count_susceptible</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='fu'>count_susceptible</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span>
<span class='fu'><a href='proportion.html'>susceptibility</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='op'>*</span> <span class='fu'>n_rsi</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='fu'><a href='proportion.html'>susceptibility</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='op'>*</span> <span class='fu'>n_rsi</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</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'>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>
@ -433,6 +433,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<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'>count_df</span><span class='op'>(</span>translate <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> <span class='fu'>count_df</span><span class='op'>(</span>translate <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -397,6 +397,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='co'># See ?example_isolates.</span> <span class='co'># See ?example_isolates.</span>
<span class='co'># See ?pca for more info about Principal Component Analysis (PCA).</span> <span class='co'># See ?pca for more info about Principal Component Analysis (PCA).</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='va'>pca_model</span> <span class='op'>&lt;-</span> <span class='va'>example_isolates</span> <span class='op'>%&gt;%</span> <span class='va'>pca_model</span> <span class='op'>&lt;-</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='mo_property.html'>mo_genus</a></span><span class='op'>(</span><span class='va'>mo</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"Staphylococcus"</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='mo_property.html'>mo_genus</a></span><span class='op'>(</span><span class='va'>mo</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"Staphylococcus"</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
@ -416,6 +417,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span><span class='op'>(</span>title <span class='op'>=</span> <span class='st'>"Title here"</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span><span class='op'>(</span>title <span class='op'>=</span> <span class='st'>"Title here"</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -429,7 +429,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p> <p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span> <span class='op'>&amp;</span> <span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <pre class="examples"><span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span> <span class='op'>&amp;</span> <span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># get antimicrobial results for drugs against a UTI:</span> <span class='co'># get antimicrobial results for drugs against a UTI:</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</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'>AMX</span>, <span class='va'>NIT</span>, <span class='va'>FOS</span>, <span class='va'>TMP</span>, <span class='va'>CIP</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>+</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</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'>AMX</span>, <span class='va'>NIT</span>, <span class='va'>FOS</span>, <span class='va'>TMP</span>, <span class='va'>CIP</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>+</span>
@ -478,7 +479,6 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='fu'>scale_rsi_colours</span><span class='op'>(</span>Value4 <span class='op'>=</span> <span class='st'>"S"</span>, Value5 <span class='op'>=</span> <span class='st'>"I"</span>, Value6 <span class='op'>=</span> <span class='st'>"R"</span><span class='op'>)</span> <span class='fu'>scale_rsi_colours</span><span class='op'>(</span>Value4 <span class='op'>=</span> <span class='st'>"S"</span>, Value5 <span class='op'>=</span> <span class='st'>"I"</span>, Value6 <span class='op'>=</span> <span class='st'>"R"</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># \donttest{</span>
<span class='co'># resistance of ciprofloxacine per age group</span> <span class='co'># resistance of ciprofloxacine per age group</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/mutate.html'>mutate</a></span><span class='op'>(</span>first_isolate <span class='op'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span><span class='op'>(</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>first_isolate <span class='op'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span><span class='op'>(</span><span class='va'>.</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>%&gt;%</span>

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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>

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.6.0.9011</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</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>
@ -268,12 +268,14 @@
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p> <p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <pre class="examples"><span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</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'># [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"</span> <span class='co'># [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -284,12 +284,13 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>maturing<
<span class='co'># since ggplot2 supports no markdown (yet), use</span> <span class='co'># since ggplot2 supports no markdown (yet), use</span>
<span class='co'># italicise_taxonomy() and the `ggtext` pkg for titles:</span> <span class='co'># italicise_taxonomy() and the `ggtext` pkg for titles:</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span> <span class='op'>&amp;&amp;</span> <span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://wilkelab.org/ggtext/'>"ggtext"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span> <span class='op'>&amp;&amp;</span> <span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://wilkelab.org/ggtext/'>"ggtext"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMC</span>, <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMC</span>,
title <span class='op'>=</span> <span class='fu'>italicise_taxonomy</span><span class='op'>(</span><span class='st'>"Amoxi/clav in E. coli"</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>+</span> title <span class='op'>=</span> <span class='fu'>italicise_taxonomy</span><span class='op'>(</span><span class='st'>"Amoxi/clav in E. coli"</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>+</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/theme.html'>theme</a></span><span class='op'>(</span>plot.title <span class='op'>=</span> <span class='fu'>ggtext</span><span class='fu'>::</span><span class='fu'><a href='https://wilkelab.org/ggtext/reference/element_markdown.html'>element_markdown</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/theme.html'>theme</a></span><span class='op'>(</span>plot.title <span class='op'>=</span> <span class='fu'>ggtext</span><span class='fu'>::</span><span class='fu'><a href='https://wilkelab.org/ggtext/reference/element_markdown.html'>element_markdown</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -497,6 +497,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<span class='fu'>mo_is_yeast</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'>"Candida"</span>, <span class='st'>"E. coli"</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># TRUE, FALSE</span> <span class='fu'>mo_is_yeast</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'>"Candida"</span>, <span class='st'>"E. coli"</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># TRUE, FALSE</span>
<span class='co'># gram stains and intrinsic resistance can also be used as a filter in dplyr verbs</span> <span class='co'># gram stains and intrinsic resistance can also be used as a filter in dplyr verbs</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</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'>mo_is_gram_positive</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'>mo_is_gram_positive</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>
@ -512,6 +513,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<span class='co'># SNOMED codes, and URL to the online database</span> <span class='co'># SNOMED codes, and URL to the online database</span>
<span class='fu'>mo_info</span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='fu'>mo_info</span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span>
<span class='co'># }</span> <span class='co'># }</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -329,7 +329,6 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='co'># See ?example_isolates.</span> <span class='co'># See ?example_isolates.</span>
<span class='co'># \donttest{</span> <span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># calculate the resistance per group first </span> <span class='co'># calculate the resistance per group first </span>
<span class='va'>resistance_data</span> <span class='op'>&lt;-</span> <span class='va'>example_isolates</span> <span class='op'>%&gt;%</span> <span class='va'>resistance_data</span> <span class='op'>&lt;-</span> <span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -408,11 +408,13 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<span class='fu'>plot</span><span class='op'>(</span><span class='va'>some_mic_values</span>, mo <span class='op'>=</span> <span class='st'>"S. aureus"</span>, ab <span class='op'>=</span> <span class='st'>"ampicillin"</span><span class='op'>)</span> <span class='fu'>plot</span><span class='op'>(</span><span class='va'>some_mic_values</span>, mo <span class='op'>=</span> <span class='st'>"S. aureus"</span>, ab <span class='op'>=</span> <span class='st'>"ampicillin"</span><span class='op'>)</span>
<span class='fu'>plot</span><span class='op'>(</span><span class='va'>some_disk_values</span>, mo <span class='op'>=</span> <span class='st'>"Escherichia coli"</span>, ab <span class='op'>=</span> <span class='st'>"cipro"</span><span class='op'>)</span> <span class='fu'>plot</span><span class='op'>(</span><span class='va'>some_disk_values</span>, mo <span class='op'>=</span> <span class='st'>"Escherichia coli"</span>, ab <span class='op'>=</span> <span class='st'>"cipro"</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_mic_values</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_mic_values</span><span class='op'>)</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_disk_values</span>, mo <span class='op'>=</span> <span class='st'>"Escherichia coli"</span>, ab <span class='op'>=</span> <span class='st'>"cipro"</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_disk_values</span>, mo <span class='op'>=</span> <span class='st'>"Escherichia coli"</span>, ab <span class='op'>=</span> <span class='st'>"cipro"</span><span class='op'>)</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_rsi_values</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span><span class='op'>(</span><span class='va'>some_rsi_values</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

View File

@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
</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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -406,6 +406,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class='fu'>proportion_IR</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='fu'>proportion_IR</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span>
<span class='fu'>proportion_R</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span> <span class='fu'>proportion_R</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>AMX</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</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'>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>
@ -464,6 +465,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<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'>proportion_df</span><span class='op'>(</span>translate <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> <span class='fu'>proportion_df</span><span class='op'>(</span>translate <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9055</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>
@ -404,6 +404,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
year_min <span class='op'>=</span> <span class='fl'>2010</span>, year_min <span class='op'>=</span> <span class='fl'>2010</span>,
model <span class='op'>=</span> <span class='st'>"binomial"</span><span class='op'>)</span> model <span class='op'>=</span> <span class='st'>"binomial"</span><span class='op'>)</span>
<span class='fu'><a href='plot.html'>plot</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='plot.html'>plot</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> <span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://ggplot2.tidyverse.org'>"ggplot2"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='fu'>ggplot_rsi_predict</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>ggplot_rsi_predict</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
@ -448,6 +449,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
x <span class='op'>=</span> <span class='st'>"Year"</span><span class='op'>)</span> <span class='op'>+</span> x <span class='op'>=</span> <span class='st'>"Year"</span><span class='op'>)</span> <span class='op'>+</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggtheme.html'>theme_minimal</a></span><span class='op'>(</span>base_size <span class='op'>=</span> <span class='fl'>13</span><span class='op'>)</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggtheme.html'>theme_minimal</a></span><span class='op'>(</span>base_size <span class='op'>=</span> <span class='fl'>13</span><span class='op'>)</span>
<span class='op'>}</span> <span class='op'>}</span>
<span class='co'># }</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

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.6.0.9062</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9063</span>
</span> </span>
</div> </div>

View File

@ -115,7 +115,7 @@ example_isolates[any(carbapenems() == "R"), penicillins()]
# dplyr ------------------------------------------------------------------- # dplyr -------------------------------------------------------------------
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
# this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
@ -165,3 +165,4 @@ if (require("dplyr")) {
example_isolates \%>\% filter(across(carbapenems(), ~.x == "R")) example_isolates \%>\% filter(across(carbapenems(), ~.x == "R"))
} }
} }
}

View File

@ -102,13 +102,14 @@ ab_atc("seephthriaaksone") # and even this works
# they use as.ab() internally: # they use as.ab() internally:
ab_name("J01FA01") # "Erythromycin" ab_name("J01FA01") # "Erythromycin"
ab_name("eryt") # "Erythromycin" ab_name("eryt") # "Erythromycin"
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
# you can quickly rename <rsi> columns using dplyr >= 1.0.0: # you can quickly rename <rsi> columns using dplyr >= 1.0.0:
example_isolates \%>\% example_isolates \%>\%
rename_with(as.ab, where(is.rsi)) rename_with(as.ab, where(is.rsi))
}
} }
} }
\seealso{ \seealso{

View File

@ -161,12 +161,12 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
\examples{ \examples{
summary(example_isolates) # see all R/SI results at a glance summary(example_isolates) # see all R/SI results at a glance
\donttest{
if (require("skimr")) { if (require("skimr")) {
# class <rsi> supported in skim() too: # class <rsi> supported in skim() too:
skim(example_isolates) skim(example_isolates)
} }
}
# For INTERPRETING disk diffusion and MIC values ----------------------- # For INTERPRETING disk diffusion and MIC values -----------------------
# a whole data set, even with combined MIC values and disk zones # a whole data set, even with combined MIC values and disk zones

View File

@ -80,7 +80,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
} }
\examples{ \examples{
\donttest{ \dontrun{
# oral DDD (Defined Daily Dose) of amoxicillin # oral DDD (Defined Daily Dose) of amoxicillin
atc_online_property("J01CA04", "DDD", "O") atc_online_property("J01CA04", "DDD", "O")

View File

@ -35,7 +35,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
\examples{ \examples{
availability(example_isolates) availability(example_isolates)
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
example_isolates \%>\% example_isolates \%>\%
filter(mo == as.mo("E. coli")) \%>\% filter(mo == as.mo("E. coli")) \%>\%
@ -43,3 +43,4 @@ if (require("dplyr")) {
availability() availability()
} }
} }
}

View File

@ -157,7 +157,7 @@ n_rsi(example_isolates$AMX)
count_susceptible(example_isolates$AMX) count_susceptible(example_isolates$AMX)
susceptibility(example_isolates$AMX) * n_rsi(example_isolates$AMX) susceptibility(example_isolates$AMX) * n_rsi(example_isolates$AMX)
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
example_isolates \%>\% example_isolates \%>\%
group_by(hospital_id) \%>\% group_by(hospital_id) \%>\%
@ -192,6 +192,7 @@ if (require("dplyr")) {
count_df(translate = FALSE) count_df(translate = FALSE)
} }
} }
}
\seealso{ \seealso{
\code{\link[=proportion]{proportion_*}} to calculate microbial resistance and susceptibility. \code{\link[=proportion]{proportion_*}} to calculate microbial resistance and susceptibility.
} }

View File

@ -121,6 +121,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
# See ?example_isolates. # See ?example_isolates.
# See ?pca for more info about Principal Component Analysis (PCA). # See ?pca for more info about Principal Component Analysis (PCA).
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
pca_model <- example_isolates \%>\% pca_model <- example_isolates \%>\%
filter(mo_genus(mo) == "Staphylococcus") \%>\% filter(mo_genus(mo) == "Staphylococcus") \%>\%
@ -141,3 +142,4 @@ if (require("dplyr")) {
} }
} }
} }
}

View File

@ -154,6 +154,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
} }
\examples{ \examples{
\donttest{
if (require("ggplot2") & require("dplyr")) { if (require("ggplot2") & require("dplyr")) {
# get antimicrobial results for drugs against a UTI: # get antimicrobial results for drugs against a UTI:
@ -203,7 +204,6 @@ if (require("ggplot2") & require("dplyr")) {
scale_rsi_colours(Value4 = "S", Value5 = "I", Value6 = "R") scale_rsi_colours(Value4 = "S", Value5 = "I", Value6 = "R")
} }
\donttest{
# resistance of ciprofloxacine per age group # resistance of ciprofloxacine per age group
example_isolates \%>\% example_isolates \%>\%
mutate(first_isolate = first_isolate(.)) \%>\% mutate(first_isolate = first_isolate(.)) \%>\%

View File

@ -33,6 +33,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
} }
\examples{ \examples{
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
intrinsic_resistant \%>\% intrinsic_resistant \%>\%
filter(antibiotic == "Vancomycin", microorganism \%like\% "Enterococcus") \%>\% filter(antibiotic == "Vancomycin", microorganism \%like\% "Enterococcus") \%>\%
@ -40,4 +41,5 @@ if (require("dplyr")) {
# [1] "Enterococcus casseliflavus" "Enterococcus gallinarum" # [1] "Enterococcus casseliflavus" "Enterococcus gallinarum"
} }
} }
}
\keyword{datasets} \keyword{datasets}

View File

@ -43,10 +43,11 @@ cat(italicise_taxonomy("An overview of S. aureus isolates", type = "ansi"))
# since ggplot2 supports no markdown (yet), use # since ggplot2 supports no markdown (yet), use
# italicise_taxonomy() and the `ggtext` pkg for titles: # italicise_taxonomy() and the `ggtext` pkg for titles:
\donttest{
if (require("ggplot2") && require("ggtext")) { if (require("ggplot2") && require("ggtext")) {
ggplot(example_isolates$AMC, ggplot(example_isolates$AMC,
title = italicise_taxonomy("Amoxi/clav in E. coli")) + title = italicise_taxonomy("Amoxi/clav in E. coli")) +
theme(plot.title = ggtext::element_markdown()) theme(plot.title = ggtext::element_markdown())
} }
} }
}

View File

@ -280,6 +280,7 @@ mo_fullname("S. pyogenes",
mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE mo_is_yeast(c("Candida", "E. coli")) # TRUE, FALSE
# gram stains and intrinsic resistance can also be used as a filter in dplyr verbs # gram stains and intrinsic resistance can also be used as a filter in dplyr verbs
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
example_isolates \%>\% example_isolates \%>\%
filter(mo_is_gram_positive()) filter(mo_is_gram_positive())
@ -296,6 +297,7 @@ mo_taxonomy("E. coli")
mo_info("E. coli") mo_info("E. coli")
} }
} }
}
\seealso{ \seealso{
\link{microorganisms} \link{microorganisms}
} }

View File

@ -77,7 +77,6 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
# See ?example_isolates. # See ?example_isolates.
\donttest{ \donttest{
if (require("dplyr")) { if (require("dplyr")) {
# calculate the resistance per group first # calculate the resistance per group first
resistance_data <- example_isolates \%>\% resistance_data <- example_isolates \%>\%

View File

@ -149,9 +149,11 @@ plot(some_rsi_values)
plot(some_mic_values, mo = "S. aureus", ab = "ampicillin") plot(some_mic_values, mo = "S. aureus", ab = "ampicillin")
plot(some_disk_values, mo = "Escherichia coli", ab = "cipro") plot(some_disk_values, mo = "Escherichia coli", ab = "cipro")
\donttest{
if (require("ggplot2")) { if (require("ggplot2")) {
ggplot(some_mic_values) ggplot(some_mic_values)
ggplot(some_disk_values, mo = "Escherichia coli", ab = "cipro") ggplot(some_disk_values, mo = "Escherichia coli", ab = "cipro")
ggplot(some_rsi_values) ggplot(some_rsi_values)
} }
} }
}

View File

@ -160,6 +160,7 @@ proportion_I(example_isolates$AMX)
proportion_IR(example_isolates$AMX) proportion_IR(example_isolates$AMX)
proportion_R(example_isolates$AMX) proportion_R(example_isolates$AMX)
\donttest{
if (require("dplyr")) { if (require("dplyr")) {
example_isolates \%>\% example_isolates \%>\%
group_by(hospital_id) \%>\% group_by(hospital_id) \%>\%
@ -219,6 +220,7 @@ if (require("dplyr")) {
proportion_df(translate = FALSE) proportion_df(translate = FALSE)
} }
} }
}
\seealso{ \seealso{
\code{\link[=count]{count()}} to count resistant and susceptible isolates. \code{\link[=count]{count()}} to count resistant and susceptible isolates.
} }

View File

@ -137,6 +137,7 @@ x <- resistance_predict(example_isolates,
year_min = 2010, year_min = 2010,
model = "binomial") model = "binomial")
plot(x) plot(x)
\donttest{
if (require("ggplot2")) { if (require("ggplot2")) {
ggplot_rsi_predict(x) ggplot_rsi_predict(x)
} }
@ -182,6 +183,7 @@ if (require("dplyr") & require("ggplot2")) {
theme_minimal(base_size = 13) theme_minimal(base_size = 13)
} }
} }
}
\seealso{ \seealso{
The \code{\link[=proportion]{proportion()}} functions to calculate resistance The \code{\link[=proportion]{proportion()}} functions to calculate resistance