[R] Problem with try()

From: Landsman Leonid <msleonidl_at_mscc.huji.ac.il>
Date: Mon 03 Jul 2006 - 16:51:41 EST

Dear R-experts,
I am running a large simulation exercise where the enough complicated integration is required.

The integral is computed within a C-function called Denom by use of function qags from the gsl library.

Here is a piece of R-code:

        denom<-try(.C("Denom",as.double(x),as.integer(n), as.integer(p),
        as.double(param), as.double(delta),res=as.double(results)))
        denomres=if (class(denom)=="try-error") NA else denom$res  

Sometimes, it happens that the integration process fails with the follwoing error message

gsl: qags.c:553: ERROR: bad integrand behavior found in the integration interval Default GSL error handler invoked.

and the whole simulation job is destroyed. My question is: why try() does not work and how to fix this problem?

Much thanks,

Leonid Landsman.

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 03 15:53:09 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 05 Jul 2006 - 20:17:00 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.