# NOT RUN {
library(recipes)
library(tidyverse)
library(tidyquant)
library(timetk)
FB_tbl <- FANG %>%
filter(symbol == "FB") %>%
select(symbol, date, adjusted)
rec_obj <- recipe(adjusted ~ ., data = FB_tbl) %>%
step_ts_pad(date, by = "day", pad_value = NA)
# View the recipe object
rec_obj
# Prepare the recipe object
prep(rec_obj)
# Bake the recipe object - Adds the padding
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(prep(rec_obj))
tidy(prep(rec_obj), number = 1)
# }
Run the code above in your browser using DataLab