The add-derived-column function seems ideal for what I want, which is to calculate the mean of values from several columns and add the mean to the dataset. 1st problem: I (use '(incanter core datasets ...)). But when I run this test: (add-derived-column :het [:a :b] (fn [:a :b] (+ :a :b)) data1) the repl says 'unable to resolve symbol: add-derived-column'. It is the same with the example given in the docs. The incanter docs indicate the function is part of 'core'. Has this function been moved to another package or am I doing something silly. Assuming this function is not lost 2nd problem (coming): for the vector of columns can I use this instead: (def colnames [:a :b :c ..]) (add-deriv... :newcol colnames (fn [colnames] (some calculation)) datavals)?
Asked
Active
Viewed 103 times
0
-
can you provide which version of incanter are you using, and also, how you import the `incanter.core` – Alex Ott Jan 09 '14 at 17:22
-
I use Incanter 1.4.1. At the begiining of my clojure code I have: (use '(incanter core charts stats io datasets)) – Brian Jan 11 '14 at 06:33
-
`add-derived-column` was introduced in the 1.5.4, so please use this version... – Alex Ott Jan 11 '14 at 09:54
-
Thanks. I must have been looking at 1.5.4 docs then using 1.4.1. Quite silly of me. – Brian Jan 12 '14 at 07:09