medianIndex function Summarizing data

int? medianIndex(
  1. Iterable<num?> values
)

Similar to median, but returns the index of the value to the left of the median.

Implementation

int? medianIndex(Iterable<num?> values) {
  return quantileIndex(values, 0.5);
}