matrix, :
data = matrix(c(1.1,1,0.97,0.99,0.95,0.8,0.91,2.1,2,2.4,4.1,4.4,4.5,3.9,1.5,1.2,1.7,2.6,2.7,2.44), ncol=2)
C1 (x1=1,y1=3) C2 (x2=2,y2=4) ( , , 3 ):
km = kmeans(data, centers=matrix(c(1,2,3,4),ncol=2))
: df = transform (as.data.frame(data), group = as.character(km $cluster)) (ggplot2)
ggplot(df, aes(V1, V2, color=group)) + geom_point()
