Usage
polarFreq(mydata, pollutant = "", statistic = "frequency", ws.int = 1,
grid.line = 5, breaks = seq(0, 5000, 500), cols = "default",
trans = TRUE, type = "default", min.bin = 1, ws.upper = NA,
offset = 10, border.col = "transparent", key.header = statistic,
key.footer = pollutant, key.position = "right", key = TRUE,
auto.text = TRUE, ...)
Arguments
mydata
A data frame minimally containing ws
, wd
and
date
.
pollutant
Mandatory. A pollutant name corresponding to a variable in
a data frame should be supplied e.g. pollutant = "nox"
statistic
The statistic that should be applied to each wind
speed/direction bin. Can be frequency, mean,
median, max (maximum), stdev (standard
deviation) or weighted.mean<
ws.int
Wind speed interval assumed. In some cases e.g. a low met
mast, an interval of 0.5 may be more appropriate.
grid.line
Radial spacing of grid lines.
breaks
The user can provide their own scale. breaks
expects a
sequence of numbers that define the range of the scale. The sequence
could represent one with equal spacing e.g. breaks = seq(0, 100,
10)
- a scale from 0-10 in intervals of
cols
Colours to be used for plotting. Options include
default, increment, heat, jet
and RColorBrewer
colours --- see the openair
openColours
function for
trans
Should a transformation be applied? Sometimes when producing
plots of this kind they can be dominated by a few high points. The
default therefore is TRUE
and a square-root transform is applied.
This results in a non-linear scale and (usually)
type
type
determines how the data are split
i.e. conditioned, and then plotted. The default is will produce a
single plot using the entire data. Type can be one of the built-in
types as detailed in cutData
e.g. season
min.bin
The minimum number of points allowed in a wind speed/wind
direction bin. The default is 1. A value of two requires at least 2
valid records in each bin an so on; bins with less than 2 valid records
are set to NA. Care should be taken when using a value >
ws.upper
A user-defined upper wind speed to use. This is useful for
ensuring a consistent scale between different plots. For example, to
always ensure that wind speeds are displayed between 1-10, set
ws.int = 10
.
offset
offset
controls the size of the hole
in the middle and is expressed as a percentage of the maximum wind
speed. Setting a higher offset
e.g. 50 is useful for
statistic = "weighted.mean"
when ws.
border.col
The colour of the boundary of each wind speed/direction
bin. The default is transparent. Another useful choice sometimes is
"white".
key.header,key.footer
Adds additional text/labels to the scale key.
For example, passing options key.header = "header", key.footer =
"footer"
adds addition text above and below the scale key. These
arguments are passed to drawOpenKey
via quickTe
key.position
Location where the scale key is to plotted. Allowed
arguments currently include "top"
, "right"
, "bottom"
and "left"
.
key
Fine control of the scale key via drawOpenKey
. See
drawOpenKey
for further details.
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.
...
Other graphical parameters passed onto lattice:xyplot
and cutData
. For example, polarFreq
passes the option
hemisphere = "southern"
on to cutData
to provide southern
(rather than default nor