[R] Dendrogram plotting options?

Mark St. John singin at personainternet.com
Mon Jul 19 02:00:40 CEST 2004


Hi, I was wondering if there is more flexibility in the output of 
dendrograms when plotting a hclust object. I can't seem to find 
information on how to change the default output of a "hanging" style 
tree with the axis on the right to a left-to-right plot with and axis 
on the bottom. Example  code follows:

library(vegan) #loads the "vegan" module that compuptes ANOSIM
library(cluster)
community <- read.csv("ANOSIMmites.csv", header=TRUE) #reads the data 
file into memory under the name "community"
enviro <- read.csv("ANOSIMenv.csv", header=TRUE) #reads the grouping 
variables into memory
attach(enviro)
attach(community)
community.dist <- vegdist(community)
community.ano <- anosim(community.dist, plant)
summary(community.ano)
clust <- hclust(community.dist, method = "complete", members=NULL)
plot(clust, labels = sample, hang = 0.05, axes = TRUE, frame.plot = 
FALSE, ann = F, main = "Dendrogram of sample similarity", sub = "based 
on associated soil mite species", xlab = NULL, ylab = "Height")

Thanks! Mark




More information about the R-help mailing list