search for: chlab

Displaying 1 result from an estimated 1 matches for "chlab".

Did you mean: tchlab
2011 Sep 26
0
horizontal labels for a dendrogram
Dear R-help list, I'd like to create visualize the clustering of a dataset with a dendrogram. I'm using the following script: data = read.table("data.csv", header=T, sep=";") require(cluster) res = as.dendrogram(agnes(data)) chlab <- function(n) { if(is.leaf(n)) { att <- attributes(n) labx <- data$category1[att$label] lab_color <- ifelse(labx == "A", "black", ifelse(labx == "B", "red", "green")) attr(n, "nodePar") <- c(att$nodePar, lab.col =...