This is a utility function designed to calculate rolling Gaussian smooth (kernel smoothing). The function will try and fill in missing time gaps to get a full time sequence but return a data frame with the same number of rows supplied.
Usage
GaussianSmooth(
mydata,
pollutant = "o3",
sigma = 24L,
type = "default",
data.thresh = 0,
new.name = NULL,
date.pad = FALSE,
...
)Arguments
- mydata
A data frame containing a
datefield.mydatamust contain adatefield inDateorPOSIXctformat. The input time series must be regular, e.g., hourly, daily.- pollutant
The name of a pollutant, e.g.,
pollutant = "o3". More than one pollutant can be supplied as a vector, e.g.,pollutant = c("o3", "nox").- sigma
The value of
sigmato use in the Gaussian.- type
Used for splitting the data further. Passed to
cutData().- data.thresh
The % data capture threshold. No values are calculated if data capture over the period of interest is less than this value.
- new.name
The name given to the new column(s). If not supplied it will create a name based on the name of the pollutant and the averaging period used.
- date.pad
Should missing dates be padded? Default is
FALSE.- ...
Additional parameters passed to
cutData(). For use withtype.
