data <- read.csv("syn.csv", sep=") data <- read.csv("syn.csv", sep=",", header=F) data data <- read.csv("syn.csv", sep="\t", header=F) data k <- kmeans(data, 3, 100) k k$centers k$cluster k$withinss sum(k$withinss) k2 <- kmeans(data, 2, 100) k2 sum(k2$withinss) k4 <- kmeans(data, 4, 100) sum(k4$withinss) k5 <- kmeans(data, 5, 100) sum(k5$withinss) k5 k5$cluster k=array(15) k for (i in 2:15) { k[i] = kmeans(data, i, 100) } warnings() for (i in 2:15) { x <- kmeans(data, i, 100) k[i] <- x$tot.withinss } k str(k) k k=array(15) for (i in 2:15) { x <- kmeans(data, i, 100) k[i] <- x$tot.withinss } k plot(k) k4 k4$betweenss dir() ls -la * history(50)