I have:
(def data [[1 3 4 7 9] [7 6 3 2 7] [1 9 8 6 2]])
I want to average these (elementary):
[3 6 5 5 6]
As in MATLAB:
mean([1 3 4 7 9; 7 6 3 2 7; 1 9 8 6 2])
Using Incanter, I can do:
(map
If the data is quite large (and I have a lot of them), is there a better way to do this?
Does this help to calculate (count m) in advance?
Does defn #(/ % (count m)) help in advance?
source share