generate_dates: Generate dates

Description Usage Arguments Value Examples

View source: R/sim.R

Description

Generate dates given timepoint indices, start date and step unit

Usage

1
generate_dates(timepoints, start, unit)

Arguments

timepoints

Integer vector timepoint indices

start

Date of index 1

unit

"year" "month" or "day"

Value

A vector of dates the same length as timepoints

Examples

1
2
3
# Dates from Tokars (2018)
timepoints <- 1L:304L
dates <- generate_dates(timepoints, lubridate::ymd("2017-08-01"), "day")

impactflu documentation built on Jan. 14, 2020, 5:06 p.m.