Learn R Programming

grates (version 1.4.3)

boundaries: Access the bounding dates of a grates object

Description

Utility functions for accessing the boundary dates for each element of a grates object.

Usage

date_start(x)

date_end(x)

Value

The requested start and end dates for each element in the input.

Arguments

x

grouped date vector.

Examples

Run this code
dates <- as.Date("2020-01-01") + 1:9
week <- as_isoweek(dates)
date_start(week)
date_end(week)

period <- as_period(dates, n = 3)
date_start(period)
date_end(period)

Run the code above in your browser using DataLab