User Tools

Site Tools


archaeometry:cluster_analysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
archaeometry:cluster_analysis [2008/05/03 23:33]
steko created, it's more a raw sketch than a good tutorial
archaeometry:cluster_analysis [2008/05/04 14:52]
steko pretty plot one-liner
Line 24: Line 24:
 </​code>​ </​code>​
  
-===== ''​hclust'' ​=====+===== hclust =====
  
 Before creating the actual cluster dendrogram, we have to calculate the distance matrix from our data frame. For this task we use the ''​dist()''​ function: Before creating the actual cluster dendrogram, we have to calculate the distance matrix from our data frame. For this task we use the ''​dist()''​ function:
Line 61: Line 61:
 And here's the result: And here's the result:
 {{ :​archaeometry:​cluster.png?​500px |}} {{ :​archaeometry:​cluster.png?​500px |}}
 +
 +Once you get acquainted with these functions, you can also get the plot with one single line:
 +
 +<code C>
 +> plot(hclust(dist(xrd[-1])),​ xrd$Sample, hang = -1, cex = 0.7)
 +</​code>​
archaeometry/cluster_analysis.txt ยท Last modified: 2018/08/04 00:01 (external edit)