mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 07:10:50 +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)
|
||||
|
||||
Reference in new issue
Block a user