I dont know whether I am missing something or not: > head(read.zoo(file="f:/dat1.txt", header=T, sep=",", format = "%m/%d/%Y > %H:%M:%S"), tz="GMT") data.open data.high data.low data.close 2010-10-15 73.7 73.7 73.7 73.7 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 Warning messages: 1: In zoo(rval3, ix) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique 2: In zoo(rval, x.index[i]) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique > head(read.zoo(file="f:/dat1.txt", header=T, sep=",", format = "%m/%d/%Y > %H:%M:%S")) data.open data.high data.low data.close 2010-10-15 73.7 73.7 73.7 73.7 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 2010-10-15 73.8 73.8 73.8 73.8 Warning messages: 1: In zoo(rval3, ix) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique 2: In zoo(rval, x.index[i]) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique
In either case, I am missing the "time" component. Where I am going wrong? Thanks, --- On Sat, 10/16/10, Gabor Grothendieck <ggrothendi...@gmail.com> wrote: > From: Gabor Grothendieck <ggrothendi...@gmail.com> > Subject: Re: [R] Problem with merging two zoo objects > To: "Megh" <megh700...@yahoo.com> > Cc: r-help@r-project.org > Date: Saturday, October 16, 2010, 2:33 AM > On Fri, Oct 15, 2010 at 4:27 PM, Megh > <megh700...@yahoo.com> > wrote: > > > > Thanks Gabor for pointing to my old version. However I > got one more question > > why the argument tz="" is sitting there? As you are > not passing any explicit > > It would otherwise assume "Date" class. > > > str(read.zoo(file="dal1.csv", header=TRUE, sep=",", > format = "%m/%d/%Y %H:%M:%S", aggregate = mean)) > ‘zoo’ series from 2010-10-15 to 2010-10-15 > Data: num [1, 1:4] 73.7 73.7 73.7 73.7 > - attr(*, "dimnames")=List of 2 > ..$ : chr "2010-10-15" > ..$ : chr [1:4] "data.open" "data.high" "data.low" > "data.close" > Index: Class 'Date' num 14897 > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > > -- > 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.