Converting multivariate dataframe to univariate time series using R -
these head of data set using.
hour count <chr> <int> 1 00 22462 2 01 13293 3 02 10595 4 03 9371 5 04 14325 6 05 38598
to perform forecasting using auto arima should convert data univariate.
make.univ(rsms,sms.hour,tname="time1", outname="multdv")
i used above code convert univariate, gives error.
error in data.frame(timedat = rep(0:(nrepobs - 1), nrow(x)), outdat = as.vector(t(dvs))) : arguments imply differing number of rows: 4123938, 48
original dataset:
rsms [2million records(1 day data)] sample dataset : sms.hour[24 records (class(sms.hour) = "tbl_df" "tbl" "data.frame"]
can me solve this?
your data univariate. i'm not sure, think lines below make data output of make.univ()
call:
rsms$hour <- as.numeric(rsms$hour) names(rsms) <- c("time", "multdv")
Comments
Post a Comment