| clustermap {iL04} | R Documentation |
Hierarchical clustering is used to derive a partitioning, which is used to plot a coloured topographic map.
clustermap(coo, dst, method = "ward", k = 2, col = rainbow(k),
labels = "dots", cex = 1, seq = 25:1, bwlim = .55, map = NULL,
xlab = NULL, ylab = NULL, ...)
coo |
a dataframe with x- and y-coordinates of locations stored in the first two columns, and names of locations stored as rownames. |
dst |
a dissimilarity structure as produced by the
dist function, with names stored in the attribute
"Labels". |
method |
any of the methods to the hclust function. |
k |
desired number of groups. |
col |
a vector of size k, with colours for each cluster. |
labels |
what to use as labels.
This is either a word: one of "none" (no labels),
"names" (use rownames of argument coo), or
"dots" (use dots); or a vector of labels ordered in
accordance with the data in argument coo.
|
cex |
the size of the labels relative to the default text size. |
seq |
a sequence of decreasing sizes of the area to fill around each location, relative to the default text size. |
bwlim |
a value between 0 and 1, determining the point to switch between white labels and black labels, relative to the background colour interpreted as a grey value between 0 and 1. |
map |
an optional two-column matrix with a set of line segments,
used to draw a map. See lines for the use of NA
values. |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
... |
further arguments to the plot function. |
None.
RuG/L04 - software for dialectometrics and cartography: http://www.let.rug.nl/~kleiweg/L04/
cccmap,
linkmap,
mdsmap,
mean.asp
data(PA)
data(PA.coo)
data(PA.map)
asp <- mean.asp(PA.map[, 2])
clustermap(PA.coo[, 1:2], PA, labels = PA.coo$idx, k = 4,
main = "Pennsylvania, USA",
asp = asp, map = PA.map)