quantiles

fun quantiles(unsortedData: DoubleArray, p: DoubleArray = doubleArrayOf(0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95)): DoubleArray

Uses definition 7, as per R definitions

Return

the quantiles associated with each value of p. The default values for p are 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95

Parameters

unsortedData

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

p

the percentile array, each element must be within (0, 1)