
Time-average a `metamet` object
time_average.RdAggregates meteorological data in a `metamet` object over specified time intervals. The function handles different variable types appropriately: precipitation is summed, and other variables (temperature, wind speed, etc.) are averaged. Wind direction is vector-averaged if present.
Arguments
- mm_in
A `metamet` object containing at least `dt`, `dt_meta`, and `dt_site`.
- avg.time
Time interval for averaging; passed to `openair::timeAverage()`. Default is `"30 min"`.
- report_end_interval
Logical. If `TRUE` (default), the returned timestamps represent the end of the averaging interval. If `FALSE`, timestamps represent the start of the interval.
- extra_rows
Integer A number of time intervals to add before and after the data; usually truncated after averaging.
Value
A `metamet` object with time-averaged `dt`, `dt_qc`, and `dt_ref` tables (where applicable). The object structure is preserved.