Learn R Programming

openair (version 0.4-0)

prepareModel: Pre-process a data frame containing dispersion model-measurement data

Description

Utility function to prepare input data for use in openair functions

Usage

mydata <- prepareModel(mydata, measured = "obs", modelled = "mod",
pollutant = "nox")

Arguments

mydata
A data frame containing a date field in hourly or high resolution format.
measured
Name of a variable in mydata that respresents measured values.
modelled
Name of a variable in mydata that respresents measured values.
pollutant
Name of a pollutant being used for model-measurement comparison.

Details

This is a utility function to prepare data for use in openair functions. It is intended for model-measurement comparsions where, typically, there are hourly measured concentrations and hourly modelled concentrations. The function adds a new field site that many openair functions use, and reshapes the data into a suitable format for use by them.

Examples

Run this code
## Given, for example, a data frame with the date, mod, meas field names
## it is run as shown below:

## mydata <- prepareModel(mydata, measured = "meas", modelled = "mod",
##   pollutant  = "o3")

Run the code above in your browser using DataLab