Mateus,

Apparently I cc-ed the wrong group (see snippet below).
I think you found a bug.
I suggest you write something up and send it to r-b...@r-project.org
Follow the directions on "How to report a bug"
http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/base/html/bug.report.html

Jean

r-core-boun...@r-project.org wrote on 07/06/2012 09:22:34 AM:
> Your request to the R-core mailing list
>     Posting of your message titled "Re: [R] Error in hclust?"
> has been rejected by the list moderator.  The moderator gave the
> following reason for rejecting your request:
> "Non-members are not allowed to post messages to this list.
> If you think you find a bug (think twice and then) maybe ask once more
> on R-help then use the R bugs repository "



Mateus Teixeira <mateus.teixe...@gmail.com> wrote on 07/06/2012 09:07:27 
AM:
> Thank you, Jean.
> 
> Mateus


> 2012/7/6 Jean V Adams <jvad...@usgs.gov>
> Mateus, 
> 
> I see what you mean. 
> I can't figure it out. 
> I found a message from a few years ago that mentions the same problem. 
> http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8165.html 
> 
> This may be a bug. 
> Since hclust() is in the stats package, I am ccing the maintainer, 
> r-c...@r-project.org, on this e-mail. 
> 
> Jean 
> 
> > find("hclust") 
> [1] "package:stats" 
> > maintainer("stats") 
> [1] "R Core Team <r-c...@r-project.org>" 
> 
> 
> 
> Mateus Teixeira <mateus.teixe...@gmail.com> wrote on 07/04/2012 07:39:39 
AM:
> 
> 
> > Dear R users,
> > 
> > I have noted a difference in the merge distances given by hclust using
> > centroid method.
> > 
> > For the following data:
> > 
> > x<-c(1009.9,1012.5,1011.1,1011.8,1009.3,1010.6)
> > 
> > and using Euclidean distance, hclust using centroid method gives the
> > following results:
> > 
> > > x.dist<-dist(x)
> > > x.aah<-hclust(x.dist,method="centroid")
> > > x.aah$merge
> >      [,1] [,2]
> > [1,]   -3   -6
> > [2,]   -1   -5
> > [3,]   -2   -4
> > [4,]    1    2
> > [5,]    3    4
> > > x.aah$height
> > [1] 0.50000 0.60000 0.70000 0.97500 1.36875
> > 
> > A calculation by hand results same merges, but at different distances 
for
> > latter stages:
> > 
> > heights:
> >    0.5  => merging 3 and 6  => G1
> >    0.6  => merging 1 and 5  => G2
> >    0.7  => merging 2 and 4  => G3
> >    *1.25  => merging G1 and G2 => G4
> >    1.92  => merging G3 and G4*
> 
> > 
> > It seems that hclust is not correctly computing the group centroids. 
Is it
> > correct?
> > 
> > Best regards,
> > 
> > Mateus
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to