[R] Aggregating an its series
Vittorio
vdemart1 at tin.it
Fri Apr 7 17:38:02 CEST 2006
I'm using a very long irregular time-series of air temperature and
relative humidity of this kind (this is an extract only)
its.format("%
Y%d%m %X)
> base
T H
20020601
12.00.00 27.1 47
20020601 15.00.00 29.1 39
20020601 18.00.00 27.4 39
20020601 21.00.00 24.0 40
20020602 0.00.00 22.0 73
20020602 3.00.00
19.2 49
20020602 6.00.00 19.5 74
20020602 9.00.00 24.8 45
20020602
12.00.00 27.7 NA
20020602 15.00.00 29.2 39
20020602 18.00.00 27.2 44
20020602 21.00.00 23.9 50
20020603 0.00.00 21.0 75
20020603 3.00.00
19.6 65
20020603 6.00.00 19.8 71
20020603 9.00.00 23.2 67
20020603
12.00.00 24.9 65
20020603 15.00.00 21.7 74
20020603 18.00.00 22.8 63
20020603 21.00.00 21.2 75
20020604 0.00.00 18.0 91
I would like to
aggregate T and H by day and produce another its of this kind
> aggr
T H
20020601 NA NA
20020602 NA NA
20020603 NA NA
20020604 NA NA
where the daily average of T and H (not counting the NA
values) is is put in aggr.
What is the quickest way to get this
result?
Thanks
Vittorio
More information about the R-help
mailing list