I am trying to calculate the distance between centroid and data points in KMean cluster using R.
Can anyone share with me the code for the same? Also it would be really helpful if you may provide the code for distance calculation between all data points in the cluster.