[R] Split PVClust plot

Worthington, Thomas A thomas.worthington at okstate.edu
Mon Jul 28 23:40:34 CEST 2014


Dear All 

I'm using PVClust to perform hierarchical clustering, for the output plot I can control most of the graphical I need, however the plot is large and I would like to split it vertically into two panels one above the other. Is there a way to plot only part of a PVClust plot, I tried to convert it to a dendrogram with 

result2  = as.dendrogram(result)

however I get the error message "no applicable method for 'as.dendrogram' applied to an object of class "pvclust". I also wondered whether it would be possible to convert to a phylogenetic tree and use the functions in the 'ape' package?

Any suggestion on how to split up a PVclust plot would be greatly appreciated  (code for the plot below)

Thanks
Tom 


result <- pvclust(df.1, method.dist="uncentered", method.hclust="average",nboot=10)
par(mar=c(0,0,0,0))
par(oma=c(0,0,0,0))
plot(result, print.pv =FALSE, col.pv=c("red","",""), print.num=FALSE, float = 0.02, font=1, 
	axes=T, cex =0.85, main="", sub="", xlab="", ylab= "", labels=NULL, hang=-1)
pvrect(result, alpha=0.95)



More information about the R-help mailing list