View source: R/gets-base-source.R
periodicdummies | R Documentation |
Auxiliary function that creates periodicity dummies (e.g. seasonal dummies) for regular time series. The function is similar to, but more general than, the seasonaldummy
function in the package forecast.
periodicdummies(x, values=1)
x |
a regular time series (vector or matrix) |
values |
numeric of length 1 (default) or numeric vector of length equal to |
A matrix of class zoo
with periodicity dummies
Genaro Sucarrat, http://www.sucarrat.net/
is.regular
, zooreg
, zoo
, ts
##quarterly dummies:
x <- zooreg(rnorm(30), start=2000, frequency=4)
periodicdummies(x)
##monthly dummies:
y <- zooreg(rnorm(30), start=c(2000,1), frequency=12)
periodicdummies(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.