I think the OP was asking about the agglomeration method in
hclust(), not the distance measure in dist(). And the default in
dist() is not absolute distance which is not an option, but
Euclidean distance:

> dist(cbind(v, v))
         1        2        3        4        5
2 1.414214                                    
3 2.828427 1.414214                           
4 4.242641 2.828427 1.414214                  
5 5.656854 4.242641 2.828427 1.414214         
6 7.071068 5.656854 4.242641 2.828427 1.414214

For a single vector (column) such as v <- 1:6, Euclidean,
Manhattan, Maximum, and Minkowski will all give the same result.

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of eliza botto
Sent: Thursday, December 12, 2013 5:15 PM
To: capricy gao; r-help@r-project.org
Subject: Re: [R] method default for hclust function

Absolute distance is the default distance in hclust.
v<-c(1,2,3,4,5,6)
dist(v)
2 1        
3 2 1      
4 3 2 1    
5 4 3 2 1  
6 5 4 3 2 1

Eliza

> Date: Thu, 12 Dec 2013 15:09:19 -0800
> From: capri...@yahoo.com
> To: r-help@r-project.org
> Subject: [R] method default for hclust function
> 
> I could not figure out what was the default when I ran
hclust() without specifying the method.
> 
> For example:
> 
> I just have a code like:
> 
> hclust(dist(data))
> 
> Any input would be appreciated:)
>       [[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.
                                          
        [[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.

______________________________________________
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