# test data for HIV status changes
# output from prepare_hiv_report_data()
set.seed(1001)
change_df <- data.frame(patient_id = rep(1:5000, each = 3),
hiv_tx_status_date = lubridate::dmy("1/1/2010") + replicate(5000, sort(sample(1:4000, size = 3), decreasing = FALSE)) %>%
as.vector(),
hiv_status = sample(c("On treatment",
"Death",
"Transfer out",
"LTFU",
"Returned to care"),
prob = c(0.5, 0.2, 0.1, 0.1, 0.1),
size = 15000, replace = TRUE),
stringsAsFactors = FALSE)
# save processed HIV status test data
saveRDS(change_df, "inst/testdata/pre_rmd_hiv_status.rds", version = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.