time_to_date: Convert a set of timepoints to dates

View source: R/zz-deprecated-data-utils.R

time_to_dateR Documentation

Convert a set of timepoints to dates

Description

Convert a set of timepoints to dates

Usage

time_to_date(
  timepoints,
  unit = attr(timepoints, "unit"),
  day_zero = getOption("day_zero", "2019-12-29")
)

Arguments

timepoints

a set of numeric time points

unit

the period / unit of the time points, which will be extracted from timepoints if possible

day_zero

the zero day of the time series, will be extracted from timepoints if possible

Value

a vector of dates

Examples

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

terminological/ggrrr documentation built on June 15, 2024, 6:35 a.m.