quantile

fun quantile(unsortedData: DoubleArray, p: Double): Double

Uses definition 7, as per R definitions

Return

the quantile

Parameters

unsortedData

the array of data. The data will be sorted as a side effect of the call

p

the percentile, must be within (0, 1)