[R] Error while generating dendrogram
Tae-Hoon Chung
thchung at tgen.org
Sat Apr 16 02:04:14 CEST 2005
Hi, All;
When I was trying to convert the result object of hierarchical clustering
into an instance of dendrogram class using as.dendrogram() and plot the
resulting dendrogram horizontally, I got the following error message:
[1] "evaluation nested too deeply: infinite recursion\
Options(expression=)?"
Attr(,"class")
[1] "try-error"
This error happened while I was experimenting a function generating a
composite plot of heatmap + dendrogram of gene clusters + dendrogram of
sample clusters in microarray data analysis. The source chunk is a bit long
but the part of origin for error is like this:
...
hc <- hclust(mat, "single") ### THIS WORKED FINE!
plot(hc, hang=-1) ### THIS ALSO WORKED FINE! IMAGE GENERATED
...
dend <- as.dendrogram(hc) ### THIS SEEMS TO WORK FINE!
plot(dend, horizontal=T, axes=F, ann=F, yaxs="i", leaflab="none") ### ERROR!
...
1. Can anyone suggest solutions? Actually this is first time I get this type
of error message.
2. If converting hc to dendrogram class causes the trouble, is there anyone
who can suggest a simple method of generating a dendrogram in horizontal
direction not in vertical direction?
Thanks in advance;
Tae-Hoon Chung
--------------------------------------------------
Tae-Hoon Chung
Post-Doctoral Researcher
Translational Genomics Research Institute (TGen)
445 N. 5th Street (Suite 530)
Phoenix, AZ 85004
1-602-343-8724 (Direct)
1-480-323-9820 (Mobile)
1-602-343-8840 (Fax)
More information about the R-help
mailing list