N

Calculate the Nxx (e.g. N50) of values. values will be sorted in the process. If this is undesired the range must be duplicated beforehands. The elements of values are passed to map before calculating the median. This removes the necessity of creating a proxy range.

The CTFE-version differs from the dynamic implementation only in a static check for a valid value of xx and the order of arguments. The CTFE-version should be preferred if possible because it looks nicer.

  1. auto N(Range values, Num totalSize)
    N
    (
    real xx
    alias map = "a"
    Range
    Num
    )
    (
    Range values
    ,)
  2. auto N(Range values, real xx, Num totalSize)

Return Value

Type: auto

Nxx statistic or undefined value iff values is empty or mapped values sum up to less than totalSize.

Meta