private static <T> double avg0(List<T> list, ToDoubleFunction<? super T> function) {
        return sum0(list, function) / list.size();
    }
Get a {@link Collector} that calculates the <code>regrR2Double()</code> function.
jOOL/src/main/java/org/jooq/lambda/Agg.java