Re: [R] lower and upper limits in integrate as vectors

2008-09-20 Thread Andreas Wittmann
dear baptiste, thank you very much, that was excatly what i was looking for:-) best regards Andreas baptiste auguie wrote: Hi, I think you want to Vectorize integrate(), not integrand(). Here's a way using mapply, integrand <- function(z) { return(z * z) } vec1<-1:3 vec2<-2:4 mapply

Re: [R] lower and upper limits in integrate as vectors

2008-09-20 Thread baptiste auguie
Hi, I think you want to Vectorize integrate(), not integrand(). Here's a way using mapply, integrand <- function(z) { return(z * z) } vec1<-1:3 vec2<-2:4 mapply(integrate, lower=vec1, upper=vec2, MoreArgs=list(f=integrand) ) baptiste On 20 Sep 2008, at 13:08, Andreas Wittmann wrote: D