indexOfMedian
internal fun <T : Comparable<T & Any>?> Sequence<T>.indexOfMedian(type: KType, skipNaN: Boolean): Int
Returns the index of the median in the comparable input:
-1if empty or allnullindex of first NaN if
skipNaNisfalseand contains NaNindex (lower) middle else NOTE: For primitive numbers the
seq.elementAt(seq.indexOfMedian())might be different fromseq.medianOrNull()
Based on quantile implementation; uses QuantileEstimationMethod.R3.