mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 04:20:53 +01:00
(v3.0.1.9121) styler
This commit is contained in:
1 parent
c8cb36ddcf
commit
0293d296aa
14 files changed
+1191
-993
No files matched your search
+10
-6
@@ -73,7 +73,6 @@
|
||||
#' # Though they are primarily intended to use for selections and filters.
|
||||
#' # Examples sections below are split into 'dplyr', 'base R', and 'data.table':
|
||||
#'
|
||||
#' \donttest{
|
||||
#' \dontrun{
|
||||
#' # dplyr -------------------------------------------------------------------
|
||||
#'
|
||||
@@ -94,8 +93,10 @@
|
||||
#' # get AMR for all aminoglycosides e.g., per ward:
|
||||
#' example_isolates %>%
|
||||
#' group_by(ward) %>%
|
||||
#' summarise(across(aminoglycosides(),
|
||||
#' resistance))
|
||||
#' summarise(across(
|
||||
#' aminoglycosides(),
|
||||
#' resistance
|
||||
#' ))
|
||||
#'
|
||||
#' # You can combine selectors with '&' to be more specific:
|
||||
#' example_isolates %>%
|
||||
@@ -105,8 +106,10 @@
|
||||
#' example_isolates %>%
|
||||
#' filter(mo_genus() %in% c("Escherichia", "Klebsiella")) %>%
|
||||
#' group_by(ward) %>%
|
||||
#' summarise_at(not_intrinsic_resistant(),
|
||||
#' resistance)
|
||||
#' summarise_at(
|
||||
#' not_intrinsic_resistant(),
|
||||
#' resistance
|
||||
#' )
|
||||
#'
|
||||
#' # get susceptibility for antimicrobials whose name contains "trim":
|
||||
#' example_isolates %>%
|
||||
@@ -159,8 +162,9 @@
|
||||
#' y <- example_isolates %>% filter(carbapenems() == "R")
|
||||
#' z <- example_isolates %>% filter(if_all(carbapenems(), ~ .x == "R"))
|
||||
#' identical(x, y) && identical(y, z)
|
||||
#'
|
||||
#' }
|
||||
#'
|
||||
#' \donttest{
|
||||
#' # base R ------------------------------------------------------------------
|
||||
#'
|
||||
#' # select columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
|
||||
+2
-1
@@ -207,7 +207,8 @@
|
||||
#' top_n_microorganisms(n = 10) %>%
|
||||
#' group_by(
|
||||
#' age_group = age_groups(age, c(25, 50, 75)),
|
||||
#' gender) %>%
|
||||
#' gender
|
||||
#' ) %>%
|
||||
#' wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
|
||||
#' }
|
||||
#'
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user