Skip to content

Commit a28ac42

Browse files
committed
JC: Follow sel :filter rename to group-on
1 parent f1169d2 commit a28ac42

File tree

1 file changed

+5
-5
lines changed
  • modules/incanter-core/src/incanter

1 file changed

+5
-5
lines changed

modules/incanter-core/src/incanter/core.clj

+5-5
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
returns all columns by default, can pass a column index or sequence of column indices
198198
:except-rows (default nil) can pass a row index or sequence of row indices to exclude
199199
:except-cols (default nil) can pass a column index or sequence of column indices to exclude
200-
:filter (default nil)
200+
:filter-fn (default nil)
201201
a function can be provided to filter the rows of the matrix
202202
203203
Examples:
@@ -215,7 +215,7 @@
215215
(sel iris :except-cols 1) ; all columns except the second
216216
217217
;; return only the first 10 even rows
218-
(sel iris :rows (range 10) :filter #(even? (int (nth % 0))))
218+
(sel iris :rows (range 10) :filter-fn #(even? (int (nth % 0))))
219219
;; select rows where distance (third column) is greater than 50
220220
(sel iris :filter #(> (nth % 2) 4))
221221
@@ -1175,11 +1175,11 @@
11751175
]
11761176
(cond
11771177
cols
1178-
(map #(sel mat :cols cols :filter (filter-fn %)) groups)
1178+
(map #(sel mat :cols cols :filter-fn (filter-fn %)) groups)
11791179
except-cols
1180-
(map #(sel mat :except-cols except-cols :filter (filter-fn %)) groups)
1180+
(map #(sel mat :except-cols except-cols :filter-fn (filter-fn %)) groups)
11811181
:else
1182-
(map #(sel mat :filter (filter-fn %)) groups)))))
1182+
(map #(sel mat :filter-fn (filter-fn %)) groups)))))
11831183

11841184

11851185

0 commit comments

Comments
 (0)