library(dplyr)
df <- ts_to_tbl(AirPassengers) %>% select(-index)
lags <- c(1,3,6,12)
output <- ts_lag_correlation(
.data = df,
.date_col = date_col,
.value_col = value,
.lags = lags
)
output$data$correlation_lag_matrix
output$plots$lag_plot
Run the code above in your browser using DataLab