1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 02:03:04 +02:00

(v1.0.1.9009) prepare for next release

This commit is contained in:
2020-04-15 11:30:28 +02:00
parent 4be54d608c
commit c2ffbd9f95
26 changed files with 77 additions and 89 deletions

View File

@ -145,19 +145,9 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
library(dplyr)
# Filter on first isolates:
example_isolates \%>\%
mutate(first_isolate = first_isolate(.,
col_date = "date",
col_patient_id = "patient_id",
col_mo = "mo")) \%>\%
mutate(first_isolate = first_isolate(.)) \%>\%
filter(first_isolate == TRUE)
# Which can be shortened to:
example_isolates \%>\%
filter_first_isolate()
# or for first weighted isolates:
example_isolates \%>\%
filter_first_weighted_isolate()
# Now let's see if first isolates matter:
A <- example_isolates \%>\%
group_by(hospital_id) \%>\%
@ -171,8 +161,8 @@ B <- example_isolates \%>\%
resistance = resistance(GEN)) # gentamicin resistance
# Have a look at A and B.
# B is more reliable because every isolate is only counted once.
# Gentamicin resitance in hospital D appears to be 3.1\% higher than
# B is more reliable because every isolate is counted only once.
# Gentamicin resitance in hospital D appears to be 3.7\% higher than
# when you (erroneously) would have used all isolates for analysis.
@ -180,6 +170,14 @@ B <- example_isolates \%>\%
\dontrun{
# Short-hand versions:
example_isolates \%>\%
filter_first_isolate()
example_isolates \%>\%
filter_first_weighted_isolate()
# set key antibiotics to a new variable
x$keyab <- key_antibiotics(x)