%during% {grates} | R Documentation |
Is a date covered by a grouped date
Description
%during%
determines whether a supplied date is within the period covered
by each element of a grates object.
Usage
date %during% x
Arguments
date |
A scalar |
x |
grouped date vector. |
Value
A logical vector indicating whether the date was present within the range of the tested object.
Examples
dates <- as.Date("2020-01-01") + 1:10
week <- as_isoweek(dates)
dates[1] %during% week
period <- as_period(dates, n = 3)
dates[10] %during% period
[Package grates version 1.5.0 Index]