11.07.2015 Views

Package 'openair'

Package 'openair'

Package 'openair'

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

timeAverage 123data.threshstatisticpercentilestart.datevector.wsThe data capture threshold to use (%). A value of zero means that all availabledata will be used in a particular period regardless if of the number of valuesavailable. Conversely, a value of 100 will mean that all data will need to bepresent for the average to be calculated, else it is recorded as NA.The statistic to apply when aggregating the data; default is the mean. Can beone of “mean”, “max”, “min”, “median”, “frequency”, “sd”, “percentile”. Notethat “sd” is the standard deviation and “frequency” is the number (frequency)of valid records in the period. “percentile” is the percentile level (%) between0-100, which can be set using the “percentile” option — see below. Not used ifavg.time = "default".The percentile level in % used when statistic = "percentile". The defaultis 95.A string giving a start date to use. This is sometimes useful if a time series startsbetween obvious intervals. For example, for a 1-minute time series that starts“2009-11-29 12:07:00” that needs to be averaged up to 15-minute means, theintervals would be “2009-11-29 12:07:00”, “2009-11-29 12:22:00” etc. Often,however, it is better to round down to a more obvious start point e.g. “2009-11-29 12:00:00” such that the sequence is then “2009-11-29 12:00:00”, “2009-11-29 12:15:00” . . . start.date is therefore used to force this type of sequence.Should vector averaging be carried out on wind speed if available? The default isFALSE and scalar averages are calculated. Vector averaging of the wind speed iscarried out on the u and v wind components. For example, consider the averageof two hours where the wind direction and speed of the first hour is 0 degreesand 2m/s and 180 degrees and 2m/s for the second hour. The scalar average ofthe wind speed is simply the arithmetic average = 2m/s and the vector averageis 0m/s. Vector-averaged wind speeds will always be lower than scalar-averagedvalues.DetailsValueThis function calculates time averages for a data frame. It also treats wind direction correctlythrough vector-averaging. For example, the average of 350 degrees and 10 degrees is either 0 or360 - not 180. The calculations therefore average the wind components.timeAverage should be useful in many circumstances where it is necessary to work with differenttime average data. For example, hourly air pollution data and 15-minute meteorological data. Tomerge the two data sets timeAverage can be used to make the meteorological data 1-hour meansfirst. Alternatively, timeAverage can be used to expand the hourly data to 15 minute data - seeexample below.For the research community timeAverage should be useful for dealing with outputs from instrumentswhere there are a range of time periods used.It is also very useful for plotting data using timePlot. Often the data are too dense to see patternsand setheiltting different averaging periods easily helps with interpretation.Returns a data frame with date in class POSIXct and will remove any non-numeric columns excepta column "site".

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!