StackYears | R Documentation |
Stacks years to make seasonal patterns and growth easier to see.
StackYears(
x,
date = NULL,
n.years = NULL,
calendar = TRUE,
period.number = FALSE,
transpose = FALSE
)
x |
A |
date |
An optional vector containing dates. Where not
provided, the dates are assumed to be in the row or column
names, first row or column, or first element of |
n.years |
The number of years to stack. Older data is ignored. |
calendar |
If true, the years are calendar. Otherwise, they end at the final time point. When this is done, some years can have different numbers of values (e.g., weeks). |
period.number |
If TRUE, period numbers instead of dates are returned in the column names. |
transpose |
If TRUE, the result is transposed. |
A matrix
, with the column names containing
the dates or time periods, and the rows the years.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.