MeanDist() reports the sum of pairwise distances divided by the number of
selected elements,
$$f(S) = \frac{\displaystyle\sum_{i < j,\, i,j \in S} d_{ij}}{|S|}$$,
the objective maximised by MaxMean().
Examples
# The max-mean problem is defined for signed dissimilarities; with these the
# optimal subset has an interior size, chosen to maximise mean dispersion.
set.seed(1)
x <- matrix(runif(100, -5, 5), 10)
d <- (x + t(x)) / 2 # symmetric, signed
selection <- MaxMean(d)
selection # 5 of the 10 elements: {2, 5, 6, 8, 10}
#> 5 elements (2 5 6 8 10) selected by MaxMean RLTS, f = 2.714
MeanDist(d, selection) # 2.714 — equals attr(selection, "score")
#> [1] 2.714473