According to what I have read you do zoo time series this way:
zoospend<-zoo(X,ts)
where xis a vector, matrix, or data frame, and dt is a vector of corresponding dates or datetimes
I have a table that has two columns one spending and the other months associated with that spending. The spending is mydata$Spend and the date field (which is formatted as a date) is mydata$month
I think this is the right way to do a zoo ts given this.
zoospend<-zoo(mydata$Spend,mydata$Month)
I get no error that way, not sure if it is right.
zoospend<-zoo(X,ts)
where xis a vector, matrix, or data frame, and dt is a vector of corresponding dates or datetimes
I have a table that has two columns one spending and the other months associated with that spending. The spending is mydata$Spend and the date field (which is formatted as a date) is mydata$month
I think this is the right way to do a zoo ts given this.
zoospend<-zoo(mydata$Spend,mydata$Month)
I get no error that way, not sure if it is right.