View source: R/plot_weekend_work.R
plot_weekend_work | R Documentation |
Takes a schedule from load_tidy_schedule()
and returns a plot of the
distribution of weekends worked by doctor, partitioned by split by quartiles
of weekends entirely off work.
plot_weekend_work(
tidy_schedule,
shift_types = c("PjourD", "MjourD", "Bjour", "LångF", "Pjour", "Mjour"),
shift_days = c("Friday", "Saturday", "Sunday"),
quartile_labels = c("0-25% lediga helger", "25-50% lediga helger",
"50-75% lediga helger", "75-100% lediga helger")
)
tidy_schedule |
A schedule loaded by |
shift_types |
The shift types in Medinet to count as weekend work. Certain shift types, such as vacation, should not be included in this vector to yield accurate results. |
shift_days |
The days to count as weekend. Defaults to Friday, Saturday, and Sunday, as weekend on-call shifts would start on Friday in the schedule. This might vary by department and might need to be adjusted. |
quartile_labels |
Labels for quartiles in the graph. As it defaults to
Swedish, this parameter is included to facilitate use in other languages.
Axis labels and titles can be changed using standard |
A ggplot.
load_tidy_schedule()
plot_weekend_work(example_schedule)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.