Re: [R] Adding dates to time series

From: Bazman76 <h_a_patience_at_hotmail.com>
Date: Sun, 15 May 2011 15:23:41 -0700 (PDT)

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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 15 May 2011 - 23:34:20 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 15 May 2011 - 23:40:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive