geom_swimlane.Rd
A geom for swimlane plots
geom_swimlane(id_var, duration_var, cohort_var = NULL, ...)
Column name for subject identifier
Column name for numeric length of time on study
Optional column name to sort by cohort
Other options passed to geom_bar
A ggplot2 compatible geom
library(ggplot2)
patient_disposition %>%
order_swimlane(subject, weeks_on_study, cohort) %>%
ggplot() +
geom_swimlane(subject, weeks_on_study, cohort) +
theme_swimlane(legend.position = c(.9, .1)) +
ylab("Weeks on study")