Message-ID: <1305498221505-3525011.post@n4.nabble.com>
Date: 2011-05-15T22:23:41Z
From: Bazman76
Subject: Adding dates to time series
In-Reply-To: <1305497607017-3525001.post@n4.nabble.com>
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.