1.2.3-SNAPSHOT Arrow_down_16x16
  • (median x)

Returns the median of the data, x.

Examples:
(median (sample-normal 100))

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/stat/tdouble/DoubleDescriptive.html
http://en.wikipedia.org/wiki/Median

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/stats.clj:1571 top

(defn median
"
  Returns the median of the data, x.

  Examples:
    (median (sample-normal 100))

  References:
    http://incanter.org/docs/parallelcolt/api/cern/jet/stat/tdouble/DoubleDescriptive.html
    http://en.wikipedia.org/wiki/Median

"
  ([x]
    (let [xx (sort (to-list x))]
      (DoubleDescriptive/median (DoubleArrayList. (double-array xx))))))
Vars in incanter.stats/median: defn double-array let
Used in 0 other vars

Comments top

No comments for median. Log in to add a comment.