View source: R/plot_difference_from_mean.R
plot_difference_from_mean | R Documentation |
Plots a bar graph of the difference between the number of shifts that a doctor is scheduled and the mean for all the doctors in the schedule.
plot_difference_from_mean(tidy_schedule)
tidy_schedule |
A tibble containing a schedule, as loaded by
|
A ggplot with a bar chart.
load_tidy_schedule()
# Show plot right away.
plot_difference_from_mean(example_schedule)
# Filter certain shift types, exclude one doctor, and save the ggplot as an object for later use.
saved_graph <- example_schedule |>
dplyr::filter(shift_type %in% c('Pjour', 'Mjour')) |>
dplyr::filter(doctor_name != 'Olsson, Sofie') |>
plot_difference_from_mean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.