[R] read.zoo problem reading in date time

Charilaos Skiadas cskiadas at gmail.com
Mon Mar 3 17:28:45 CET 2008


On Mar 3, 2008, at 11:12 AM, stephen sefick wrote:

> x<-read.zoo("SC2.csv", sep="," , format="%m%m/%d%d/%y%y%y%y %h%h:%m% 
> m")
>
>         #Error in read.zoo("SC2.csv", sep = ",", format =
> "%m%m/%d%d/%y%y%y%y %h%h:%m%m") :
>         index contains NAs  Error message

You need header=TRUE in there, since your dataset has a header.

> what am I doing wrong SC2.csv is a comma seperated file.  The above
> data is right out out of the csv file, which is more like 30,000 rows.
>  There are some NA for all of the variables except DateTime for a week
> here and a week there, but I can not find any missing dates.
> thanks
>
> stephen

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College



More information about the R-help mailing list