Forecasting, Time Series Analysis, Fourier Transform, R, Ml So Good.
TC_ts <- ts(TC_df$n,start = c(2022,1),frequency = 365*24) ndiffs(TC_ts) # needs differences TC_ts ndiffs(diff(TC_ts)) [1] 0 TC_ts_diff=diff(TC_ts) Time Series: Start = c(2022, 1) End = c(2023, 3824) Frequency = 8760 [1] 3 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [23] 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0