(v3.0.1.9121) styler

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-12 11:42:06 +02:00
1 parent c8cb36ddcf
commit 0293d296aa
14 files changed
+1191 -993

No files matched your search

+10 -6
View File
@@ -308,7 +308,6 @@ carbapenems()
# 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 -------------------------------------------------------------------
@@ -329,8 +328,10 @@ example_isolates \%>\% select(administrable_per_os())
# 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 \%>\%
@@ -340,8 +341,10 @@ example_isolates \%>\%
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 \%>\%
@@ -394,8 +397,9 @@ x <- example_isolates[carbapenems() == "R", ]
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)