Description Usage Arguments Value Examples
View source: R/time_cohort_outcomes.R
Time cohort outcomes
1 2 3 4 5 6 7 8 9 10 | time_cohort_outcomes(
df,
start_var,
time_months,
status_var,
id_var,
date_var,
reporting_date,
convert_to_df = FALSE
)
|
df |
data frame of treatment status over time |
start_var |
character name of start treament date |
time_months |
numeric vector defining which time cohorts to include |
status_var |
character name of HIV status variable in data frame |
id_var |
character name of ID variable in data frame |
date_var |
character name of status change date variable in data frame |
reporting_date |
date of reporting time - typically the first day of the reporting month |
convert_to_df |
flag defining whether to reduce the final output from a list to a wide data frame - defaults to FALSE |
data frame where each row represents one patient and HIV treatment status at specified time points are represented by variables
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.