[R] Averaging dates?

Sérgio Nunes snunes at gmail.com
Wed Jun 20 19:03:54 CEST 2007


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



More information about the R-help mailing list