Skip to content
Prev 313203 / 398506 Next

Vectorizing integrate()

On Dec 7, 2012, at 7:14 AM, Doran, Harold wrote:

            
I had been thinking (before you presented the data case and allowed  
the problem to be seen more fully)  that X[ n, ] was being passed to  
that expression. It's not. You are using the index of one object to  
pass positions of a vector, so there is really only one value. Using  
mapply would reduce to using sapply as Carlson illustrated.