Description Usage Arguments Value Examples
Removal of distorting effect of site movement to reveal underlying trend by using changes in concentration as a function of year as a proxy for the average trend. This method retains information about the shape of the trend, while ignoring differences in magnitude, thus removing the leveraging effect of opening and closing sites with extreme magnitudes.
1 2 3 | rolling_change_trend(obs, pollutant, window.width, avg.ts = "year",
stat = "median", start.date = "2000-01-01",
end.date = "2017-12-31", parallel = FALSE, verbose = FALSE)
|
obs |
A data frame of ambient pollutant concentration data. Must contain the columns: site_code, date,
value. If 'pollutant' is a pollutant ratio, the data frames of the corresponding pollutants
must be supplied as a list of data frames in the order they are given in the ratio. E.g. for
|
pollutant |
The pollutant of interest (character string). To calculate rolling change trend for a pollutant ratio,
separate the two pollutants with a forward slash e.g. |
window.width |
The width of the moving window, n, over which the change in concentration is calculated (in years). |
avg.ts |
The resolution to which to average each time series, upon which the rolling regression is carried out.
For example, setting |
stat |
The metric (character string) used to average the ambient concentration data by year. Options: "median", "mean". |
start.date, end.date |
The starting and ending dates (character string) of the period of interest over which to calculate and plot the change trend. |
parallel |
Logical indicating whether the rolling changes should be computed in parallel. If |
verbose |
Logical indicating whether to print the date range of the rolling window over which the calculation is being applied. |
A plot of the rolling change trend.
1 2 3 4 5 6 7 8 9 | ## Not run:
rolling_change_trend(london_nox_data,
pollutant = "nox",
window.width = 3,
avg.ts = "year",
stat = "median",
start.date = "2000-01-01", end.date = "2017-12-31")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.