Usage
polarCluster(mydata, pollutant = "nox", x = "ws", wd = "wd",
n.clusters = 6, cols = "Paired", angle.scale = 315, units = x,
auto.text = TRUE, ...)
Arguments
mydata
A data frame minimally containing wd
, another
variable to plot in polar coordinates (the default is a column
“ws” --- wind speed) and a pollutant. Should also contain
date
if plots by time period are required.
pollutant
Mandatory. A pollutant name corresponding to a
variable in a data frame should be supplied e.g. pollutant =
"nox"
. Only one pollutant can be chosen.
x
Name of variable to plot against wind direction in polar
coordinates, the default is wind speed, “ws”.
wd
Name of wind direction field.
n.clusters
Number of clusters to use. If n.clusters
is more than length 1, then a lattice
panel plot will be
output showing the clusters identified for each one of
n.clusters
.
cols
Colours to be used for plotting. Useful options for
categorical data are avilable from RColorBrewer
colours ---
see the openair
openColours
function for more
details. Useful schemes include “Accent”, “Dark2”,
“Paired”, “Pastel1”, “Pastel2”,
“Set1”, “Set2”, “Set3” --- but see
?brewer.pal
for the maximum useful colours in each. For
user defined the user can supply a list of colour names recognised
by R (type colours()
to see the full list). An example
would be cols = c("yellow", "green", "blue")
.
angle.scale
The wind speed scale is by default shown at a
315 degree angle. Sometimes the placement of the scale may
interfere with an interesting feature. The user can therefore set
angle.scale
to another value (between 0 and 360 degrees) to
mitigate such problems. For example angle.scale = 45
will
draw the scale heading in a NE direction.
units
The units shown on the polar axis scale.
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
polarPlot
, lattice:levelplot
and
cutData
. Common axis and title labelling options (such as
xlab
, ylab
, main
) are passed via
quickText
to handle routine formatting.