stsm_detect_frequency {autostsm}R Documentation

Detect frequency and dates from the data

Description

Detect frequency and dates from the data

Usage

stsm_detect_frequency(y, freq = NULL)

Arguments

y

Univariate time series of data values. May also be a 2 column data frame containing a date column.

freq

Initial setting for the frequency detection

Value

List giving the dates and frequency of the data

Examples

## Not run: 
#GDP Not seasonally adjusted
library(autostsm)
data("NA000334Q", package = "autostsm") #From FRED
NA000334Q = data.table(NA000334Q, keep.rownames = TRUE)
colnames(NA000334Q) = c("date", "y")
NA000334Q[, "date" := as.Date(date)]
NA000334Q[, "y" := as.numeric(y)]
NA000334Q = NA000334Q[date >= "1990-01-01", ]
freq = stsm_detect_frequency(y = NA000334Q)

## End(Not run)

[Package autostsm version 3.1.4 Index]