# NOT RUN {
if (requireNamespace("outbreaks", quietly = TRUE)) {
withAutoprint({
data(ebola_sim_clean, package = "outbreaks")
dat <- ebola_sim_clean$linelist
inci <- incidence(dat,
date_index = date_of_onset,
interval = 7,
groups = hospital)
inci2 <- incidence(dat,
date_index = date_of_onset,
interval = 7,
groups = c(hospital, gender))
plot(inci)
plot(inci, fill = hospital)
plot(inci, fill = hospital, stack = FALSE)
facet_plot(inci)
facet_plot(inci2)
facet_plot(inci2, facets = gender)
facet_plot(inci2, facets = hospital, fill = gender)
})
}
# }
Run the code above in your browser using DataLab