Change time axis from a reference date. For example "Months since 1870-01-01", set ref_date = "1870-01-01" and duration = "months".

retime(time_var, ref_date = lubridate::date("1870-01-01"), duration = "months")

Arguments

time_var

Numeric array with current time axis values.

ref_date

Reference data for the current axis.

duration

Interval between entries.

Value

Tibble with date, year, month, day, and boolean if leap year.