Fork me on GitHub
#core-matrix
<
2016-04-18
>
otfrom08:04:33

eleonore: possibly sel ?

mikera09:04:11

I've been thinking about doing something like specter in core.matrix

eleonore09:04:59

otfrom: it seems to be only a selection by index. It makes sense for matrices, but for datasets I'd like to be able to select for when a value in column :a is equal to a 10 for example.

otfrom09:04:51

mikera: a specter like thing would be cool

otfrom09:04:58

does it really need that much power?

otfrom09:04:56

hmmm... getting this atm:

(require [clojure.core.matrix.selection :as $])
CompilerException java.lang.ClassNotFoundException: clojure.core.matrix.selection, compiling:(*cider-repl matty*:53:12) 

otfrom09:04:12

with core.matrix 0.51

otfrom09:04:44

eleonore: I mean sel in clojure.core.matrix.selection as opposed to the select you were looking at

eleonore09:04:26

yes, that's the sel I was talking about

otfrom09:04:18

eleonore: does this style not work for you? (sel [[-1 0][1 2]] (where pos?)) ;=> [1 2]

otfrom09:04:36

(though I can't even get the ns to load at the moment. I suspect PEBCAK)

eleonore09:04:37

otfrom: I got an error when trying it with column name. I'm not using matrices but datasets.

otfrom09:04:40

eleonore: is it something you can do using sel in incanter?

eleonore10:04:46

otfrom: I'm sure of it, yes! I just wanted to know if I could do this using core.matrix instead of having an extra dependency to handle my datasets

otfrom10:04:08

eleonore: I think for now we'll have to go w/incanter (1.5.1-SNAPSHOT).

otfrom10:04:34

mikera: were you wanting something lens like from specter or was it more just around the power of the selections?

lora12:04:14

hello otfrom!