Computes weeks for date data. This is mostly equivalent to
ggplot2::stat_bin()
with the bins fixed to weeks starting on a particular
day.
Usage
stat_week(
mapping = NULL,
data = NULL,
geom = "bar",
position = "stack",
...,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
week_start = getOption("phylepic.week_start"),
pad = FALSE
)
Arguments
- mapping, data, geom, position, na.rm, show.legend, inherit.aes, pad, ...
See
ggplot2::stat_bin()
.- week_start
Day the week begins (defaults to Monday). Can be specified as a case-insensitive English weekday name such as "Monday" or an integer. Since you generally won't want to mix definitions, it is more convenient to control this globally with the
"phylepic.week_start"
option, e.g.options(phylepic.week_start = "Monday")
.