Re: [R] tryCatch with integration

2011-10-31 Thread William Dunlap
lto:r-help-boun...@r-project.org] On > Behalf Of statfan > Sent: Sunday, October 30, 2011 6:24 PM > To: r-help@r-project.org > Subject: [R] tryCatch with integration > > I am trying to compute the approximate numerical integration of the following > expression using the integr

[R] tryCatch with integration

2011-10-30 Thread statfan
I am trying to compute the approximate numerical integration of the following expression using the integrate function: > (integrate(function(x) {log(1+x^2)*(1+x^2)^(-20.04543)},low,Inf)$val) Error in integrate(function(x) { : the integral is probably divergent which gives me an error. If