quantileIndex

internal fun <T : Comparable<T & Any>?> Sequence<T>.quantileIndex(p: Double, type: KType, skipNaN: Boolean, method: QuantileEstimationMethod.Selecting, name: String = "quantile"): Int

Returns the index of the p-quantile in the unsorted sequence this, selected using method.

  • -1 if empty or all null (or all NaN if skipNaN)

  • index of the first NaN if !skipNaN and this contains NaN

  • index of the selected value else

NaN values are detected at runtime when type could hold them, including erased types like Comparable<Any>, used by the column: String overloads.