[R] Bug in plot.dendrogram, and how to submit patches
yan at pixie.org.uk
Sat Nov 8 15:15:13 CET 2008
Before submitting a bug report, I thought I would ask here, as
recommended in http://www.r-project.org/posting-guide.html.
Using R 2.8.0 under Mac OS X, I find that edge labels are misplaced
when doing plot.dendrogram(..., horiz=TRUE), for example
R version 2.8.0 (2008-10-20)
attached base packages:
 stats graphics grDevices utils datasets methods base
> d <- as.dendrogram(hclust(dist(list(a=1,b=2,c=4,d=5))))
> attr(d[], "edgetext") <- "a & b"
> attr(d[], "edgetext") <- "c & d"
> plot(d, horiz="F") #OK
> plot(d, horiz="T") #edge labels do not change position to account
I think this is because stats:::plotNode doesn't deal with horiz=TRUE
on line 152 (starting "polygon(mx + c(-hl3, hl3),").
I'm quite happy to submit a patch to fix this, but I'm not sure how
to do so. Is there a web page which gives details about the preferred
format for patches, and how to download the latest code for patching?
I guess I initially need to download the latest SVN repository, but
I'm a bit of a novice at this, and some instructions about how to go
about it would be quite handy.
More information about the R-help