# NOT RUN {
# Generate Data from Gaussian Mixture
s <- .1
n <- 50
data <- rbind(cbind(rnorm(n, 0, s), rnorm(n, 0, s)),
cbind(rnorm(n, 1, s), rnorm(n, 1, s)),
cbind(rnorm(n, 0, s), rnorm(n, 1, s)),
cbind(rnorm(n, 1, s), rnorm(n, 0, s)))
plot(data)
# Selection of Number of Clusters using Distance-based Measures
cDistance(data, kseq=2:10)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab