[R] r: intergrate behaviour

2009-02-23 Thread Allan Clark
hello R users strange behavior of the integrate function! i assume this occurs because of the way in which the quadriture is set up! (any comments.) f=function(x){exp(-exp(-x)-5*x)/gamma(5)} xx=seq(from=-20, to=20, length.out=1000) plot(xx,f(xx),type=l) integrate(f, lower=-Inf, upper= 1)

Re: [R] r: intergrate behaviour

2009-02-23 Thread Ravi Varadhan
Of Allan Clark Sent: Monday, February 23, 2009 8:10 AM To: r-h...@stat.math.ethz.ch Subject: [R] r: intergrate behaviour hello R users strange behavior of the integrate function! i assume this occurs because of the way in which the quadriture is set up! (any comments.) f=function(x){exp(-exp(-x