--
---
You received this message because you are subscribed to the Google Groups "Incanter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to incanter+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Friday, 19 April 2013 04:47:16 UTC+8, Fernando Saldanha wrote:
In R there is a function called "apply" that lets one apply a function to each column or row of a matrix or data frame.
Is there an equivalent function in Incanter? It is not hard to write but maybe there is an optimized implementation
I don't believe there is.If it's generally useful, I'd be happy to add something like this to core.matrix. Though I think the function is more like "map" than "apply", so the naming in the Clojure ecosystem should probably reflect that. core.matrix already uses "emap" for element-wise map operations over matrices, e.g.:(emap pow [[2 2] [2 2]] [[1 2] [3 4]])=> [[2.0 4.0] [8.0 16.0]]