powered by
is_first_of_quarter() and is_last_of_quarter() check whether a Date is the first or respectively the last day of an (arbitrary) quarter. is_quarter_bounds() checks whether two Date vectors mark the bounds of single quarters
is_first_of_quarter()
is_last_of_quarter()
Date
is_quarter_bounds()
is_quarter_bounds(first, last)is_first_of_quarter(x)is_last_of_quarter(x)is_Date(x)
is_first_of_quarter(x)
is_last_of_quarter(x)
is_Date(x)
Date vectors
a logical vector
logical
# NOT RUN { x <- as.Date(c("2018-01-01", "2018-03-31", "2018-02-14")) is_first_of_quarter(x) is_last_of_quarter(x) is_quarter_bounds(x[[1]], x[[2]]) is_quarter_bounds(x[[2]], x[[3]]) # }
Run the code above in your browser using DataLab