View source: R/plot_time_variation.R
plot_time_variation | R Documentation |
Function to plot hourly, weekday, and monthly averages.
plot_time_variation(
df,
by = NA,
n_min = 2,
colours = NA,
ylim = c(NA, NA),
legend_name = NA,
y_label = "Mean"
)
df |
Input data frame with at least two variables, two of which are
named |
by |
A grouping variable to separately plot different variables. |
n_min |
How many observations are needed to create a valid confidence interval? By default, at least two observations are needed to avoid very large bounds that results in bad y-axes scales. |
colours |
A vector of colours to use for the plotting. |
ylim |
Limits for y-axes. |
legend_name |
A string to overwrite the default legend label. |
y_label |
A string to overwrite the default y-axes labels. |
A ggplot2 list object containing four plots.
Stuart K. Grange
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.