rollingMean(mydata, pollutant = "o3", width = 8,
new.name = "rolling", data.thresh = 75,
align = "centre", ...)
date
field. mydata
must contain a date
field in
Date
or POSIXct
format. The input time
series must be regular e.g. hourly, daily.pollutant = "o3"
.width = 8
will generate 8-hour rolling
mean values when hourly data are analysed.width = 8
and data.thresh = 75
at least 6
hours are required to calculate the me"right"
means that the previous
hours
(including the current) are averaged. This
seems to be the default for UK air quality rolling mean
statistics. "left"
## rolling 8-hour mean for ozone
mydata <- rollingMean(mydata, pollutant = "o3", width = 8, new.name =
"rollingo3", data.thresh = 75, align = "right")
Run the code above in your browser using DataLab