[R] Integrate and mapply

2010-11-07 Thread Vaiva P
Hi, I need some help on integrating a function that is a vector. I have a function - vector which each element is different. And, naturally, function integrate() does not work I checked the article of U. Ligges and J. Fox (2008) about code optimization How Can I Avoid This Loop or Make It Faster?

Re: [R] Integrate and mapply

2010-11-07 Thread Uwe Ligges
So undint(u) is a 15 dimensional vector. What do the different dimensions mean? How would you define the integral of a 15 dimensional vector? It would help if you could provide some background on what your code is supposed to do. Uwe Ligges On 07.11.2010 17:01, Vaiva P wrote: Hi, I

Re: [R] Integrate and mapply

2010-11-07 Thread Joshua Wiley
Hi, Have you tried just your function (undint) on its own (i.e., without trying to feed it to integrate)? If you did, you would notice that it does not return anything (hence, I could not get any result). See inline comments for some additional thoughts. On Sun, Nov 7, 2010 at 8:01 AM, Vaiva P

Re: [R] Integrate and mapply

2010-11-07 Thread Joshua Wiley
Hi, I still do not really understand, but I have a couple ideas: On Sun, Nov 7, 2010 at 11:09 AM, Vaiva P asva...@gmail.com wrote: Thank you guys for  a quick reaction. I decided it to write a common letter to you both at once. I tried to calculate the value of a a function without