c - calculating double integrals in R quickly -



c - calculating double integrals in R quickly -

i'm looking solution double integral faster

integrate(function(y) { sapply(y, function(y) { integrate(function(x) myfun(x,y), llim, ulim)$value }) }, llim, ulim)

with eg

myfun <- function(x,y) cos(x+y) llim <- -0.5 ulim <- 0.5

i found old paper referred fortran programme called quad2d, couldn't find else help pages matlab rest. i'm looking c or fortran library can double integrals quick (i.e. without sapply loop), , can called r. ideas much appreciated, long they're gpl compatible.

if solution involves calling other functions libraries shipped r, i'd love hear them well.

the cubature bundle 2d (and n-d) integration using adaptive algorithm. should outperform simpler approaches integrands.

c r fortran integral

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -