Forecasting, Time Series Analysis, Fourier Transform, R, Ml So Good.
Below, I will apply a moving average of a period of 30 using hours and quarterhours. Hence, will aggregate either 30 hours or 30/4 = 7.5 hours together. roll_avg_30 <- timetk::slidify(.f = tidyquant::AVERAGE, .period = 30, .align = "center", .partial = TRUE) df%>% dplyr::mutate(newdate = with(.,