Description Usage Arguments Value Methods (by class) Note Examples
GroupYear
groups a year according to a starting month.
This function is useful for grouping values in year x & year x + 1 crossing
over calendar year (e.g., months Oct-Sep).
1 2 3 4 5 6 7 |
x |
Object of class 'Date' or 'data.frame'. |
... |
Currently not used. |
startMon |
Integer scalar value between 1 and 12. |
year |
Field name in 'x' when 'x' is 'data.frame' containing numeric 4-digit year. |
mon |
Field name in 'x' when 'x' is 'data.frame' containing numeric 1- to 2-digit month (i.e., 1-12). |
direction |
Character of either "forward" or "backward" denoting whether year is moved forward (default; '+') or backward ('-'). |
Numeric 4-digit year based on starting month.
Date
: Method for object class 'Date'.
data.frame
: Method for object class 'data.frame'.
GroupYear
not yet equipped to control 'end' month, so result is
full 12 months based on starting month.
1 | # coming soon
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.