(defn get-categories
"
Given a dataset and one or more column keys, returns the set of categories for them.
Examples:
(use '(incanter core datasets))
(get-categories :eye (get-dataset :hair-eye-color))
(get-categories [:eye :hair] (get-dataset :hair-eye-color))
"
([cols data]
(if (coll? cols)
(for [col cols] (into #{} ($ col data)))
(into #{} ($ cols data)))))
Comments top
No comments for get-categories. Log in to add a comment.