ilm=read.table("http://www.tlu.ee/~jaagup/andmed/ilm/harkutund.txt", sep=",", header=TRUE)
cor(ilm[, 6:11], use="pairwise.complete.obs")
## TA1H TAN1H TAX1H WD1H WS1H
## TA1H 1.00000000 0.999268054 0.99923768 0.038867966 -0.05038758
## TAN1H 0.99926805 1.000000000 0.99731633 0.037846512 -0.04418215
## TAX1H 0.99923768 0.997316329 1.00000000 0.040665950 -0.05572394
## WD1H 0.03886797 0.037846512 0.04066595 1.000000000 -0.07321849
## WS1H -0.05038758 -0.044182155 -0.05572394 -0.073218488 1.00000000
## WSX1H -0.01130242 -0.006448119 -0.01528954 0.009591099 0.96252438
## WSX1H
## TA1H -0.011302425
## TAN1H -0.006448119
## TAX1H -0.015289541
## WD1H 0.009591099
## WS1H 0.962524382
## WSX1H 1.000000000
dist(cor(ilm[, 6:11], use="pairwise.complete.obs"))
## TA1H TAN1H TAX1H WD1H WS1H
## TAN1H 0.008238814
## TAX1H 0.007251073 0.015288488
## WD1H 1.921379327 1.920970409 1.919495004
## WS1H 2.317166919 2.311394957 2.320480144 1.798795139
## WSX1H 2.261203989 2.255383647 2.264543083 1.744188342 0.119384752
hclust(dist(cor(ilm[, 6:11], use="pairwise.complete.obs")))
##
## Call:
## hclust(d = dist(cor(ilm[, 6:11], use = "pairwise.complete.obs")))
##
## Cluster method : complete
## Distance : euclidean
## Number of objects: 6
plot(hclust(dist(cor(ilm[, 6:11], use="pairwise.complete.obs"))))