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

update dependencies

This commit is contained in:
2018-04-02 16:05:09 +02:00
parent cee64ef050
commit 07bdd61241
15 changed files with 172 additions and 221 deletions

View File

@ -34,14 +34,14 @@ This function uses the \code{\link{rsi_df}} function internally.
tbl \%>\%
group_by(hospital) \%>\%
summarise(cipr = rsi(cipr))
tbl \%>\%
group_by(year, hospital) \%>\%
summarise(
isolates = n(),
cipro = rsi(cipr \%>\% as.rsi(), percent = TRUE),
amoxi = rsi(amox \%>\% as.rsi(), percent = TRUE))
rsi(as.rsi(isolates$amox))
rsi(as.rsi(isolates$amcl), interpretation = "S")

View File

@ -40,7 +40,7 @@ rsi_df(tbl_with_bloodcultures, c('amcl', 'gent'), interpretation = 'IR')
library(dplyr)
# calculate current empiric therapy of Helicobacter gastritis:
my_table \%>\%
filter(first_isolate == TRUE,
filter(first_isolate == TRUE,
genus == "Helicobacter") \%>\%
rsi_df(ab = c("amox", "metr"))
}

View File

@ -39,7 +39,7 @@ Create a prediction model to predict antimicrobial resistance for the next years
# use it directly:
rsi_predict(tbl = tbl[which(first_isolate == TRUE & genus == "Haemophilus"),],
col_ab = "amcl", col_date = "date")
# or with dplyr so you can actually read it:
library(dplyr)
tbl \%>\%
@ -53,22 +53,22 @@ tbl \%>\%
library(dplyr)
septic_patients \%>\%
# get bacteria properties like genus and species
left_join_microorganisms("bactid") \%>\%
left_join_microorganisms("bactid") \%>\%
# calculate first isolates
mutate(first_isolate =
mutate(first_isolate =
first_isolate(.,
"date",
"patient_id",
"bactid",
col_specimen = NA,
col_icu = NA)) \%>\%
col_icu = NA)) \%>\%
# filter on first E. coli isolates
filter(genus == "Escherichia",
species == "coli",
filter(genus == "Escherichia",
species == "coli",
first_isolate == TRUE) \%>\%
# predict resistance of cefotaxime for next years
rsi_predict(col_ab = cfot,
col_date = date,
rsi_predict(col_ab = "cfot",
col_date = "date",
year_max = 2025,
preserve_measurements = FALSE)