# NOT RUN {
# a 2-dimensional example with 2 clusters and 5 outliers
x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
colnames(x) <- c("x", "y")
(cl <- kmod(x, 2, 5))
# cluster a dataset with 8 clusters and 0 outliers
x <- kmod(x, 8)
# }
Run the code above in your browser using DataLab