Time series and stl in R: Error only univariate series are allowed

前端 未结 4 521
萌比男神i
萌比男神i 2021-01-04 01:03

I am doing analysis on hourly precipitation on a file that is disorganized. However, I managed to clean it up and store it in a dataframe (called CA1) which takes the form a

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-04 01:53

    One solution I found is time_series_var <- ts(data[, c("var_of_interest")]) and then time_series_var <- ts(as.vector(time_series_var)) and then the error related to univariate disappears as the dimensions are now correct.

提交回复
热议问题