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
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.