[R] 15-min mean values

Augusto.Sanabria@ga.gov.au Augusto.Sanabria at ga.gov.au
Thu Feb 2 06:30:50 CET 2006


Good day everyone,

I want to use zoo(aggregate) to calculate
15-min mean values from a wind dataset which
has 1-min values. The data I have looks like this:

     vector VDATE           vector WS
1   1998-10-22:02:11          12.5
2   1998-10-22:02:12          10.1
3   1998-10-22:02:13          11.2
4   1998-10-22:02:14          10.5
5   1998-10-22:02:15          11.5
      .
      .
      .
n   2005-06-30:23:59           9.1


I want to use:

aggregate(zoo(WS),'in 15-min intervals',mean)

How do you specify 'in 15-min intervals' using
vector VDATE? The length of VDATE cannot be 
changed, otherwise it would be a trivial problem
because I can generate a 15-min spaced vector
using 'seq'.

Am I missing something?

Thanks a lot,

Augusto


--------------------------------------------
Augusto Sanabria. MSc, PhD.
Mathematical Modeller
Risk Research Group
Geospatial & Earth Monitoring Division
Geoscience Australia (www.ga.gov.au)
Cnr. Jerrabomberra Av. & Hindmarsh Dr.
Symonston ACT 2609
Ph. (02) 6249-9155




More information about the R-help mailing list