This page demonstrates k-means clustering with R.
Apply kmeans to newiris, and store the clustering result in kc. The cluster number is set to 3.
Compare the Species label with the clustering result
Plot the clusters and their centres. Note that there are four dimensions in the data and that only the first two dimensions are used to draw the plot below. Some black points close to the green centre (asterisk) are actually closer to the black centre in the four dimensional space.
More examples on data clustering with R and other data mining techniques can be found in my book "R and Data Mining: Examples and Case Studies", which is downloadable as a .PDF file at the link.