new_month {grates} | R Documentation |
Minimal Constructor for a month object
Description
new_month()
is a constructor for <grates_month>
objects aimed at
developers.
Usage
new_month(x = integer(), n)
is_month(xx)
Arguments
x |
Vector representing the number of n-months since the Unix Epoch (1970-01-01).
|
n |
Number of months that are being grouped. Must be greater than 1 (use
|
xx |
R object. |
Details
grates_month
objects are stored as the integer number (starting at 0), of
n-month groups since the Unix Epoch (1970-01-01). Here n-months is taken to
mean a 'grouping of n consecutive months'.
Value
A <grates_month>
object.
References
The algorithm to convert between dates and months relative to the UNIX Epoch comes from the work of Davis Vaughan in the unreleased datea package.
Examples
new_month(1:10, 2L)
[Package grates version 1.2.1 Index]