Creates a ggplot2 visualization from the output of
functional_group_summary(). The plotted values reflect the smoothing method
chosen when that summary object was created.
Usage
plot_functional_means(
summary,
title = "Functional mean curves by group",
xlab = "Time",
ylab = "Mean value",
legend_title = "Group",
palette = NULL,
highlight_intervals = NULL
)Arguments
- summary
A list returned by
functional_group_summary()or a data frame withgroup,time, andmean_valuecolumns.- title
Plot title.
- xlab
Label for the x-axis.
- ylab
Label for the y-axis.
- legend_title
Legend title for the grouping variable.
- palette
Optional named vector of colors.
- highlight_intervals
Optional data frame with
startandendcolumns used to shade one or more intervals.
