1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 21:01:57 +02:00

new tibble export

This commit is contained in:
2022-08-27 20:49:37 +02:00
parent 164886f50b
commit 303d61b473
115 changed files with 836 additions and 996 deletions

View File

@ -155,7 +155,7 @@ susceptibility(example_isolates$AMX) * n_rsi(example_isolates$AMX)
\donttest{
if (require("dplyr")) {
example_isolates \%>\%
group_by(hospital_id) \%>\%
group_by(ward) \%>\%
summarise(R = count_R(CIP),
I = count_I(CIP),
S = count_S(CIP),
@ -166,7 +166,7 @@ if (require("dplyr")) {
# Number of available isolates for a whole antibiotic class
# (i.e., in this data set columns GEN, TOB, AMK, KAN)
example_isolates \%>\%
group_by(hospital_id) \%>\%
group_by(ward) \%>\%
summarise(across(aminoglycosides(), n_rsi))
# Count co-resistance between amoxicillin/clav acid and gentamicin,
@ -188,8 +188,8 @@ if (require("dplyr")) {
# It also supports grouping variables
example_isolates \%>\%
select(hospital_id, AMX, CIP) \%>\%
group_by(hospital_id) \%>\%
select(ward, AMX, CIP) \%>\%
group_by(ward) \%>\%
count_df(translate = FALSE)
}
}