date_seq: Convenient date sequences

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

A wrapper for seq.Date in more convenient form

Usage

1
date_seq(period, by = 1)

Arguments

period

A character of the form 'date1/date2', where the date1 and date2 are converted do Date objects using lubridate.

by

an integer specifying the space between dates in the sequence

Details

A convenient wrapper for seq.date that does not requite tu input Dates and accepts other date formats using ymd from lubridate. The syntax is inspired on the indexing format of xts objects.

Value

A sequence of dates

Examples

1
2
date_seq("20151231/")
date_seq("20151231/20161130", by = 2)

optimist/inhouse documentation built on May 24, 2019, 3:56 p.m.