powered by
## S3 method for class 'kmeans': plot(x, data = NULL, class = NULL, legend.position = c("right", "bottom", "left", "top", "none"), title = "K-Means Results", xlab = "Principal Component 1", ylab = "Principal Component 2", ...)
kmeans
data
k1 <- kmeans(x=iris[, 1:4], centers=3) plot(k1) plot(k1, data=iris)
Run the code above in your browser using DataLab