Families

MP

2015-06-09

> setwd("D:/Dropbox/R/2015-NUS/Session-3/(a) Hierarchical/Family")
> Dataset <- 
+   read.table("D:/Dropbox/R/2015-NUS/Session-3/(a) Hierarchical/Family/Families.csv",
+    header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE)
> scatterplot(y~x, reg.line=FALSE, smooth=FALSE, spread=FALSE, 
+   id.method='mahal', id.n = 6, boxplots=FALSE, span=0.5, data=Dataset)

plot of chunk unnamed-chunk-4

1 2 3 4 5 6 
1 2 3 4 5 6 
> scatterplot(y~x, reg.line=FALSE, smooth=FALSE, spread=FALSE, 
+   id.method='mahal', id.n = 6, boxplots=FALSE, span=0.5, data=Dataset)

plot of chunk unnamed-chunk-5

1 2 3 4 5 6 
1 2 3 4 5 6 
> HClust.1 <- hclust(dist(model.matrix(~-1 + x+y, Dataset)) , method= 
+   "single")
> plot(HClust.1, main= "Cluster Dendrogram for Solution HClust.1", xlab= 
+   "Observation Number in Data Set Dataset", 
+   sub="Method=single; Distance=euclidian")

plot of chunk unnamed-chunk-6