make_intervals: Makes a data frame of time intervals based on a input vector...

Description Usage Arguments Examples

View source: R/make_intervals.R

Description

Makes a data frame of time intervals based on a input vector of dates

Usage

1

Arguments

x

Input vector of dates. These correspond to the starting dates of each interval. The interval ends the day prior to the start of the next interval.

labels

A vector of labels that uniquely identifies each interval.

Examples

1
2
x <- ymd('2020-1-1', '2020-4-1', '2020-7-1', '2020-10-1', '2021-1-1')
make_intervals(x, names=c('Q1','Q2','Q3','Q4'))

dereksonderegger/WindowRefine documentation built on Jan. 29, 2021, 12:05 a.m.