Finding centroid of cluster of points using R just average the X and Y coordinates (multiply by a weight if you want) and there is your centroid.