1.2.3-SNAPSHOT Arrow_down_16x16

rank-index

incanter.stats

  • (rank-index x)

given a seq, returns a map where the keys are the values of the seq and the values are the positional rank of each member o the seq.

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:2739 top

(defn rank-index
"
given a seq, returns a map where the keys are the values of the seq and the values are the positional rank of each member o the seq.
"
[x]
(zipmap (sort x) (range 1 (+ 1 (count x)))))
Vars in incanter.stats/rank-index: + count defn range sort zipmap
Used in 0 other vars

Comments top

No comments for rank-index. Log in to add a comment.