The Karcher mean of a set of points on a manifold is defined as the point whose sum of squared Riemann distances to the points is minimal. On a sphere using spherical coordinates this distance can be computed using the formula for central angle.
karcher.mean.sphere(x, na.rm = FALSE, var = FALSE)Matrix of points on sphere as N-by-2 matrix with labelled
columns \codephi (latitude) and lambda (longitude)
logical value indicating whether NA values should
be stripped before the computation proceeds.
logical value indicating whether variance should be returned too.
Vector of means with components named phi and
lambda. If var is TRUE, a list containing
mean and variance in elements mean and var.
Heo, G. and Small, C. G. (2006). Form representations and means for landmarks: A survey and comparative study. Computer Vision and Image Understanding, 102:188-203.