On Fri, Feb 17, 2012 at 8:16 PM, Hasan Diwan <hasan.di...@gmail.com> wrote: > Henry, > You're reading a CSV with read.zoo. This is not likely to work. The > way I'd do this is: > data <- read.csv('/tmp/Kevin-0-comma-ITPower.txt', header=FALSE) > z <- zoo(data[,2], order.by=as.POSIXct(data[,1], format='%d/%m/%y > %H:%M:%S') # or whatever your format actually is... >
If you wanted to read in the csv data with a first column in the format shown by the poster, no header and a POSIXct index then it would be done like this where Lines and fmt are defined in my last post: read.zoo(text = Lines, format = fmt, tz = "", sep = ",") however, note that the poster intends subsequent use of chron, not POSIXct. Also see R News 4/1 regarding choosing index classes. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@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.