On Tue, Jul 26, 2011 at 7:18 PM, Eduardo Mendes <emammen...@gmail.com> wrote: > Hello again > > I do apologize for the previous email without any useful information that > can lead to an answer. To those who felt offended by "to no avail", I do > apologize again. I guess I will be always a newbie as far as R is > concerned. > > > The date format was wrong and although I have tried to use different formats > I could not get the result I wanted. So I went back to the file and changed > to a format that R can understand (Please understand that R is very likely > to have package that I might be unaware of). Now all dates are > >> class(data$TempDate) > [1] "POSIXct" "POSIXt" >> data$TempDate[1:2] > [1] "2010-06-27 00:00:00 BRT" "2010-06-27 00:01:00 BRT" > > If I issue the command as.Date(data$TempDate[2]), the information on hour, > minute and second is lost > > as.Date(data$TempDate[2]) > [1] "2010-06-27" > > If I use data$TempDate in a zoo object, I got the following msg > > some methods for "zoo" objects do not work if the index entries in 'order.by' > are not unique > > If I issue plot(zoo object), the result is a mess since many values do not > have an unique entry (as expected). > > How can I use the information on data$TempDate to create unique indexes for > zoo objects and the like? >
Read R News 4/1 and its references to find out about R's date time classes and then read the 5 vignettes (PDF documents) that come with zoo for many examples. -- 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.