Re: [R] Zoo series to a date time stamp that is regular

From: Gabor Grothendieck <>
Date: Mon, 28 Jun 2010 19:21:13 -0400

On Mon, Jun 28, 2010 at 7:08 PM, stephen sefick <> wrote:
> There are NA most likely.  Will aggregate pull the value out?  Again,
> thanks for all of the help.
> Stephen

I assume you mean NAs in the data. They are handled by the function you give to aggregate so just make sure you use something appropriate.

z <- zoo(c(1, NA, 3, 4), 0:3)
aggregate(z, time(z) %/% 2, function(x) mean(x, na.rm = TRUE)) mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 28 Jun 2010 - 23:23:37 GMT

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 Mon 28 Jun 2010 - 23:40:42 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive