library(recipes)
library(tidyverse)
library(tidyquant)
library(timetk)
FB_tbl <- FANG %>% filter(symbol == "FB")
# Create a recipe object with a timeseries signature step
rec_obj <- recipe(adjusted ~ ., data = FB_tbl) %>%
step_timeseries_signature(date)
# View the recipe object
rec_obj
# Prepare the recipe object
prep(rec_obj)
# Bake the recipe object - Adds the Time Series Signature
bake(prep(rec_obj), FB_tbl)
# Tidy shows which features have been added during the 1st step
# in this case, step 1 is the step_timeseries_signature step
tidy(rec_obj)
tidy(rec_obj, number = 1)
Run the code above in your browser using DataLab