I can't seem to figure out the command for changing the x- and y-axes to go from 200-800 in increments of 100. (new to R, don't know how to provide large amounts of data)
SAT <- read.csv(file.choose(), header = TRUE)
SAT2 <- na.exclude(SAT)
SAT.MV <- SAT2[,1:2]
plot(SAT.MV$VSAT,SAT.MV$MSAT,main="Math and Verbal SAT Scores",xlab="Verbal Score",
ylab="Math Score")
head(SAT.MV)
SAT.MV.3means <- kmeans(SAT.MV,centers=3)
SAT.MV.3means$centers
SAT.MV.3means$cluster
plot(SAT.MV[SAT.MV.3means$cluster == 1, ], col = "red",
xlim=c(min(SAT.MV[ ,1]),max(SAT.MV[ ,1])),
ylim=c(min(SAT.MV[ ,2]),max(SAT.MV[ ,2])))
points(SAT.MV[SAT.MV.3means$cluster == 2,], col = "blue")
points(SAT.MV[SAT.MV.3means$cluster == 3,], col = "seagreen")
points(SAT.MV.3means$centers,pch=2, col = "black")
plot(SAT.MV[SAT.MV.3means$cluster == 1, ], col = "red",
xlim=c(min(SAT.MV[ ,1]),max(SAT.MV[ ,1])),
ylim=c(min(SAT.MV[ ,2]),max(SAT.MV[ ,2])))
points(SAT.MV[SAT.MV.3means$cluster == 2,], col = "blue")
points(SAT.MV[SAT.MV.3means$cluster == 3,], col = "seagreen")
points(SAT.MV.3means$centers,pch=2, col = "black")