# Iris data
# Loading the numeric variables of iris data
iris <- as.matrix(iris[,-5])
# standardizing the data
iris <- scale(iris)
# double k-means with 3 unit-clusters and 2 components for the variables
p1 <- redkm(iris, K = 3, Q = 2)
cl <- cluster(p1$U)
Run the code above in your browser using DataLab