use k means clustter in r in build dataset and fing number of cluster code example Example: k means clustering r R function kmeans()