Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tk_augment_timeseries

Add many time series features to the data


Description

Add many time series features to the data

Usage

tk_augment_timeseries_signature(.data, .date_var = NULL)

Arguments

.data

A time-based tibble or time-series object.

.date_var

For tibbles, a column containing either date or date-time values. If NULL, the time-based column will interpret from the object (tibble, xts, zoo, etc).

Details

tk_augment_timeseries_signature() adds 25+ time series features including:

  • Trend in Seconds Granularity: index.num

  • Yearly Seasonality: Year, Month, Quarter

  • Weekly Seasonality: Week of Month, Day of Month, Day of Week, and more

  • Daily Seasonality: Hour, Minute, Second

  • Weekly Cyclic Patterns: 2 weeks, 3 weeks, 4 weeks

Value

Returns a tibble object describing the timeseries.

See Also

Augment Operations:

Underlying Function:

Examples

library(dplyr)
library(timetk)

m4_daily %>%
    group_by(id) %>%
    tk_augment_timeseries_signature(date)

timetk

A Tool Kit for Working with Time Series in R

v2.6.1
GPL (>= 3)
Authors
Matt Dancho [aut, cre], Davis Vaughan [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.