ggplot2-wrapper to summarise and plot data (of rOstluft::format_rolf()
format) for one diurnal time course-stat plotted as difference between weekdays - weekend
Source: R/ggperiodic.R
ggdiurnal_weekend_diff.Rd
ggplot2-wrapper to summarise and plot data (of rOstluft::format_rolf()
format) for one diurnal time course-stat
plotted as difference between weekdays - weekend
Usage
ggdiurnal_weekend_diff(
data,
y = "value",
nmin = 3,
fun = list(middle = "mean"),
expand_xscale = 0.025,
...
)
Arguments
- data
a data.frame or tibble containing the data
- y
a character string specifying the taget variable to be summarised, usually "value". outcomes of
cut_timeseries_periodic()
.- nmin
numeric, minimum number of values for fun, if n < nmin: NA is returned
- fun
function or list of functions for summary, can be named (then the outut stat is named after the function's name); Strings matching the regular expression
/^percentile([0-9]){1,2}$/i
are converted into the respective function. "percentile95" =>function(x, ...) quantile(x, 95 / 100, ...)
- expand_xscale
multiplicative range expansion factor
- ...
further arguments passed on to
ggplot2::geom_line()
.
Value
ggplot2::ggplot()
object