View source: R/zz-deprecated-data-utils.R
date_to_time | R Documentation |
Using a day_zero and a unit specification or a full sequence of dates (see 'full_seq_dates()')
date_to_time(
dates,
unit = .day_interval(dates),
day_zero = getOption("day_zero", "2019-12-29")
)
dates |
a vector of dates to convert |
unit |
a specification of the unit of the resulting time series. Will be determined from periodicity of dates if not specified |
day_zero |
the origin of the conversion. Defaults to the beginning of the COVID pandemic |
a sequence of numeric time points as the number of periods since day zero
# DEPRECATED
# times = date_to_time(as.Date("2019-12-29")+0:100, "1 week")
# dates = time_to_date(times)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.