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

(v1.6.0.9001) support Inf for episodes

This commit is contained in:
2021-04-12 12:35:13 +02:00
parent 7a3139f7cc
commit 6ff5448192
29 changed files with 144 additions and 104 deletions

View File

@ -65,7 +65,7 @@ filter_first_weighted_isolate(
\item{col_icu}{column name of the logicals (\code{TRUE}/\code{FALSE}) whether a ward or department is an Intensive Care Unit (ICU)}
\item{col_keyantibiotics}{column name of the key antibiotics to determine first (weighted) isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this.}
\item{col_keyantibiotics}{column name of the key antibiotics to determine first (weighted) isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this. Can also be the output of \code{\link[=key_antibiotics]{key_antibiotics()}}.}
\item{episode_days}{episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see \emph{Source}.}

View File

@ -12,7 +12,7 @@ is_new_episode(x, episode_days, ...)
\arguments{
\item{x}{vector of dates (class \code{Date} or \code{POSIXt})}
\item{episode_days}{required episode length in days, can also be less than a day, see \emph{Details}}
\item{episode_days}{required episode length in days, can also be less than a day or \code{Inf}, see \emph{Details}}
\item{...}{currently not used}
}
@ -90,7 +90,7 @@ if (require("dplyr")) {
# grouping on patients and microorganisms leads to the same results
# as first_isolate():
x <- example_isolates \%>\%
filter(first_isolate(., include_unknown = TRUE))
filter_first_isolate(include_unknown = TRUE)
y <- example_isolates \%>\%
group_by(patient_id, mo) \%>\%