Description Usage Arguments Value
View source: R/filter_treated.R
In many scenarios, it is useful to extract the subset of patients who
received treatment. However, for several patients, there exist multiple
recordings in phase 'A' or 'E', respectively.
The function filter_treated
finds the "closest" A recording to the first E
recording within the boundary of tolerance
days.
Since the treatment was 7 days long, the function considers the A recording
that is closest to 7 days before the E recording (in case there are multiple
A recordings for the same patient).
1 | filter_treated(df, tolerance = 14L)
|
df |
The |
tolerance |
The tolerable maximum number of days between an A recording and its corresponding E recording. |
The filtered charite
dataset. Each patient has exactly 1 A and 1 E
recording.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.