bertinCluster | R Documentation |
Element columns and constructs rows are ordered according to cluster criterion. Various distance measures as well as cluster methods are supported.
bertinCluster(
x,
dmethod = c("euclidean", "euclidean"),
cmethod = c("ward.D", "ward.D"),
p = c(2, 2),
align = TRUE,
trim = NA,
type = c("triangle"),
xsegs = c(0, 0.2, 0.7, 0.9, 1),
ysegs = c(0, 0.1, 0.7, 1),
x.off = 0.01,
y.off = 0.01,
cex.axis = 0.6,
col.axis = grey(0.4),
draw.axis = TRUE,
...
)
x |
|
dmethod |
The distance measure to be used. This must be one of
|
cmethod |
The agglomeration method to be used. This should be (an
unambiguous abbreviation of) one of |
p |
The power of the Minkowski distance, in case |
align |
Whether the constructs should be aligned before clustering
(default is |
trim |
The number of characters a construct is trimmed to (default is
|
type |
Type of dendrogram. Either or |
xsegs |
Numeric vector of normal device coordinates (ndc i.e. 0 to 1) to mark the widths of the regions for the left labels, for the bertin display, for the right labels and for the vertical dendrogram (i.e. for the constructs). |
ysegs |
Numeric vector of normal device coordinates (ndc i.e. 0 to 1) to mark the heights of the regions for the horizontal dendrogram (i.e. for the elements), for the bertin display and for the element names. |
x.off |
Horizontal offset between construct labels and construct dendrogram and
(default is |
y.off |
Vertical offset between bertin display and element dendrogram and
(default is |
cex.axis |
|
col.axis |
Color for axis and axis labels, default is |
draw.axis |
Whether to draw axis showing the distance metric for the dendrograms
(default is |
... |
additional parameters to be passed to function |
A list of two hclust()
object, for elements and constructs
respectively.
cluster()
# default is euclidean distance and ward clustering
bertinCluster(bell2010)
### applying different distance measures and cluster methods
# euclidean distance and single linkage clustering
bertinCluster(bell2010, cmethod = "single")
# manhattan distance and single linkage clustering
bertinCluster(bell2010, dmethod = "manhattan", cm = "single")
# minkowksi distance with power of 2 = euclidean distance
bertinCluster(bell2010, dm = "mink", p = 2)
### using different methods for constructs and elements
# ward clustering for constructs, single linkage for elements
bertinCluster(bell2010, cmethod = c("ward.D", "single"))
# euclidean distance measure for constructs, manhatten
# distance for elements
bertinCluster(bell2010, dmethod = c("euclidean", "man"))
# minkowski metric with different powers for constructs and elements
bertinCluster(bell2010, dmethod = "mink", p = c(2, 1))
### clustering either constructs or elements only
# euclidean distance and ward clustering for constructs no
# clustering for elements
bertinCluster(bell2010, cmethod = c("ward.D", NA))
# euclidean distance and single linkage clustering for elements
# no clustering for constructs
bertinCluster(bell2010, cm = c(NA, "single"), align = FALSE)
### changing the appearance
# different dendrogram type
bertinCluster(bell2010, type = "rectangle")
# no axis drawn for dendrogram
bertinCluster(bell2010, draw.axis = FALSE)
### passing on arguments to bertin function via ...
# grey cell borders in bertin display
bertinCluster(bell2010, border = "grey")
# omit printing of grid scores, i.e. colors only
bertinCluster(bell2010, showvalues = FALSE)
### changing the layout
# making the vertical dendrogram bigger
bertinCluster(bell2010, xsegs = c(0, .2, .5, .7, 1))
# making the horizontal dendrogram bigger
bertinCluster(bell2010, ysegs = c(0, .3, .8, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.