Usage
linearRelation(mydata, x = "nox", y = "no2", period =
"monthly", condition = FALSE, n = 20, rsq.thresh = 0,
ylim = c(0, 20), ylab = paste("slope from ", y, " = m.",
x, " + c", sep = ""), auto.text = TRUE, cols = NULL, span
= 0.3, ...)
Arguments
mydata
A data frame minimally containing
date
and two pollutants.
x
First pollutant that when plotted would appear
on the x-axis of a relationship e.g. x = "nox"
.
y
Second pollutant that when plotted would appear
on the y-axis of a relationship e.g. y = "pm10"
.
period
A range of different time periods can be
analysed. "monthly" will plot a monthly time series and
"weekly" a weekly time series of the relationship between
x
and y
. "hour" will show the diurnal
relationship between
condition
For period = "hour"
, period
= "day"
and period = "day.hour"
, setting
condition = TRUE
will plot the relationships split
by year. This is useful for seeing how the relationships
may be changin
n
The minimum number of points to be sent to the
linear model. Because there may only be a few points e.g.
hours where two pollutants are available over one week,
n
can be set to ensure that at least n
points are sent t
rsq.thresh
The minimum correlation coefficient
(R2) allowed. If the relationship between x
and
y
is not very good for a particular period,
setting rsq.thresh
can help to remove those
periods where the relationship i
ylim
y-axis limits, specified by the user.
ylab
y-axis title, specified by the user.
auto.text
Either TRUE
(default) or
FALSE
. If TRUE
titles and axis labels will
automatically try and format pollutant names and units
properly e.g. by subscripting the 2 in NO2.
cols
Predefined colour scheme, currently only
enabled for "greyscale"
.
span
span for loess
fit. Controls the fit
line: lower values produce a more "wiggly" fit.
...
Other graphical parameters. A useful one to
remove the strip with the date range on at the top of the
plot is to set strip = FALSE
.