# 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 Instability-based Measures
stab_obj <- cStability(data, kseq=2:10)
print(stab_obj)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab