Description Usage Arguments Value Examples
This function returns the quarter name, start date, and end date for a given date. Optionally, the function can return the information for past and present quarters.
1 | get_quarter(Date, offset = 0)
|
Date |
the input date |
offset |
the number of quarters ahead or behind to look |
A single-row data.frame with four variables:
qtr.num |
The quarter as a numeric, 1 through 4 |
qtr |
A more complete label in the format "2013 Q3" |
start.date |
The first day of the quarter |
end.date |
The last day of the quarter |
1 2 3 4 5 6 7 8 | # The current quarter's information
get_quarter(Sys.Date())
# Information about the next quarter
get_quarter(Sys.Date(), 1)
# Information about the last quarter
get_quarter(Sys.Date(), -1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.