plclust_in_colour: Hierarchical clustering *in colour*

Description Usage Arguments Value Author(s) See Also Examples

Description

Modification of plclust for plotting hclust objects in colour

Usage

1
2
3
  plclust_in_colour(hclust, lab = hclust$labels,
    lab.col = rep(1, length(hclust$labels)), hang = 0.1,
    ...)

Arguments

hclust

hclust object

lab

Character vector of labels of leaves of the tree

lab.col

Colour for the labels; NA gives the defaul device foreground colour

hang

Fraction of the plot height by which labels hang belore the rest of the plot, as in plclust

...

Additional arguments passed through to plclust

Value

Display of dendrogram with coloured leaf labels

Author(s)

originally written by Eva KF Chan, modification by Emma Huang

See Also

plot.spclust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
map <- sim.map(len=rep(100, 5), n.mar=21, eq.spacing=TRUE, include.x=FALSE)
dat <- sim.cross(map, n.ind=500, type="f2")
distmat <- spdist(dat, type="f2")
hc <- hclust(distmat, method="average")
lab <- rep("", 500)
lab[seq(1, 500, 50)] <- "RED"
lab[seq(10, 500, 50)] <- "BLACK"
lab.col <- rep("red", 500)
lab.col[seq(1,500, 50)] <- "blue"
plclust_in_colour(hc, lab, lab.col)

behuang/spclust documentation built on May 12, 2019, 10:54 a.m.