use kmeans to divide table into clusters r code example Example: k means clustering r R function kmeans()