Re: [R] efficiently finding the integrals of a sequence of functions

2011-12-11 Thread JeffND
Thanks,Hans! I agree that this is a good way of solving this problem. Here is another way. Instead of defining a vector of uni-dimensional functions and trying to integrating each component (a uni-dimensional function), we can do something below my.integrand<-function(x,k) { return(f[x,k]) ## u

Re: [R] efficiently finding the integrals of a sequence of functions

2011-12-10 Thread Hans W Borchers
JeffND nd.edu> writes: > > Hi folks, > > I am having a question about efficiently finding the integrals of a list of > functions. We had the same discussion last month under the heading "performance of adaptIntegrate vs. integrate", see https://stat.ethz.ch/pipermail/r-help/2011-November

[R] efficiently finding the integrals of a sequence of functions

2011-12-10 Thread JeffND
Hi folks, I am having a question about efficiently finding the integrals of a list of functions. To be specific, here is a simple example showing my question. Suppose we have a function f defined by f<-function(x,y,z) c(x,y^2,z^3) Thus, f is actually corresponding to three uni-dimensional func