getDistToCtr: Distances to center for a set of points
Description
Calculates the distances of a set of points to their center.
Usage
getDistToCtr(xy)
# S3 method for data.frame
getDistToCtr(xy)
# S3 method for default
getDistToCtr(xy)
Value
A numerical vector with the distances from each point to the center of the set.
Arguments
xy
either a numerical (n x p)-matrix with the coordinates of n points in p-dimensional space (1 row of coordinates per point), or a data frame with either the variables x, y or point.x, point.y.
# coordinates given by a suitable data framegetDistToCtr(DFtalon)
# coordinates given by a matrixif (FALSE) {
xy <- matrix(round(rnorm(20, 100, 15), 1), ncol=2)
getDistToCtr(xy)
}