Datetime_breaks: Create a (shifted) sequence of Datetimes for axis breaks
Description
Take a vector of Datetimes and create a sequence of Datetimes with a given
shift and interval. This is a helper function to create breaks for plotting,
e.g. in gg_days(), and is best used in conjunction with
Datetime_limits(). The function is a thin wrapper around seq().
Usage
Datetime_breaks(x, shift = lubridate::duration(12, "hours"), by = "1 day")
Value
a vector of Datetimes
Arguments
x
a vector of Datetimes
shift
a numeric giving the number of duration object, e.g.
lubridate::duration(12, "hours")
by
a character scalar giving the unit of the interval in
base::seq()