Skip to content
Prev 285432 / 398502 Next

integrate (error: evaluation of function gave a result of wrong length)

Integrate works on functions that are vectorized (i.e., the algorithm
puts in N inputs and expects N outputs) -- your function is not
vectorized (and I'm not sure what integrating it means, but I'm not
looking too closely) but you can make it "look vectorized" with the
Vectorize() HOF. Note that this isn't magic (it's still actually a
loop) but it will help here.

Michael

On Wed, Feb 15, 2012 at 11:33 AM, Dimitris.Kapetanakis
<dimitrios.kapetanakis at gmail.com> wrote: