plot_difference_from_mean: Plot Difference from Mean

View source: R/plot_difference_from_mean.R

plot_difference_from_meanR Documentation

Plot Difference from Mean

Description

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.

Usage

plot_difference_from_mean(tidy_schedule)

Arguments

tidy_schedule

A tibble containing a schedule, as loaded by load_tidy_schedule().

Value

A ggplot with a bar chart.

See Also

load_tidy_schedule()

Examples

# 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()

JonasEngstrom/medinetparser documentation built on April 20, 2024, 12:41 a.m.