[R] Averaging dates?

From: SÚrgio Nunes <snunes_at_gmail.com>
Date: Wed, 20 Jun 2007 18:03:54 +0100


Hi,

What's the best way to average dates?
I though mean.POISXct would work fine but...

> a

[1] "2007-04-02 19:22:00 WEST"
> b

[1] "2007-03-17 16:23:00 WET"
> class(a)

[1] "POSIXt" "POSIXct"
> class(b)

[1] "POSIXt" "POSIXct"
> mean(a,b)

[1] "2007-04-02 19:22:00 WEST"

> mean(b,a)

[1] "2007-03-17 16:23:00 WET" ?!

Thanks in advance for any advice,

--
SÚrgio Nunes

______________________________________________
R-help_at_stat.math.ethz.ch 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.
Received on Wed 20 Jun 2007 - 17:39:15 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 Wed 20 Jun 2007 - 22:32:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.