[R] Adding dates to time series

Bazman76 h_a_patience at hotmail.com
Mon May 16 00:23:41 CEST 2011


additional!!

I now realise that the time series created below is in the wrong order!

clearly the column of dates are not being interpreted as dates by the R. Is
is possible for R to read column one as dates? how can I do this?

dd<-data.frame(prices[,1],prices[,2])
> head(dd,3)
   prices...1.  prices...2.
1 16/12/2004 0.13675654
2 17/12/2004 0.22967560
3 20/12/2004 0.01841611
> ser<-with(dd,zoo(prices[,2],prices[,1]))
> plot(ser)
> xts <- as.ts(xzoo) 
Error in as.ts(xzoo) : object 'xzoo' not found
> xts <- as.ts(ser) 
> xts
Time Series:
Start = 1 
End = 732 
Frequency = 1 


--
View this message in context: http://r.789695.n4.nabble.com/Adding-dates-to-time-series-tp3524679p3525011.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list