impactflu (version 0.1.0)

generate_dates: Generate dates

Description

Generate dates given timepoint indices, start date and step unit

Usage

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

Run this code
# NOT RUN {
# Dates from Tokars (2018)
timepoints <- 1L:304L
dates <- generate_dates(timepoints, lubridate::ymd("2017-08-01"), "day")
# }

Run the code above in your browser using DataLab