Skip to contents

Generate a full regular timepoint sequence

Usage

full_seq_times(
  timepoints,
  period = unit,
  unit = attr(timepoints, "unit"),
  day_zero = attr(timepoints, "day_zero"),
  ...
)

Arguments

timepoints

a set of timepoints relating to data

period

the desired interval between time points, e.g. "1 day". negative periods define the intervals as closed on the left

unit

the unit of the timepoints in terms of "1 week"

day_zero

the origin of the timepoints

...

passed to 'full_seq_dates()', paricularly anchor, and fmt, to define the day of week of the new sequence and the format of the labels.

Value

a complete set of timepoints on the same scale as the original but with potentially different frequency. This will probably involve non integer times

Examples

# DEPRECATED
# times = date_to_time(as.Date("2019-12-29")+0:100, "1 week")
# tmp = full_seq_times(times)