Description Usage Arguments Details Value Author(s) Examples
Utility function to extract user-defined run lengths (durations) above a threshold
1 | selectRunning(mydata, pollutant = "nox", run.len = 5, threshold = 500)
|
mydata |
A data frame with a |
pollutant |
Name of variable to process. Mandatory. |
run.len |
Run length for extracting contiguous values of
|
threshold |
The threshold value for |
This is a utility function to extract runs of values above a certain threshold. For example, for a data frame of hourly NOx values we would like to extract all those hours where the concentration is at least 500ppb for contiguous periods of 5 or more hours.
This function is useful, for example, for selecting pollution episodes from
a data frame i.e. where concentrations remain elevated for a certain period
of time. It may also be of more general use when analysing air pollution
data. For example, selectRunning
could be used to extract continuous
periods of rainfall — which could be important for particle
concentrations.
Returns a data frame that meets the chosen criteria. See examples below.
David Carslaw
1 2 3 4 5 6 7 8 9 | ## extract those hours where there are at least 5 consecutive NOx
## concentrations above 500ppb
mydata <- selectRunning(mydata, run.len = 5, threshold = 500)
## make a polar plot of those conditions...shows that those
## conditions are dominated by low wind speeds, not
## in-canyon recirculation
## Not run: polarPlot(mydata, pollutant = "nox")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.