disscenter function

Compute distances to the center of a group