calculating double integrals in R quickly

后端 未结 2 1683
夕颜
夕颜 2020-11-29 06:22

I\'m looking for a solution for a double integral that is faster than

integrate(function(y) { 
   sapply(y, function(y) {
     integrate(function(x) myfun(x         


        
2条回答
  •  北海茫月
    2020-11-29 06:33

    The cubature package does 2D (and N-D) integration using an adaptive algorithm. It should outperform simpler approaches for most integrands.

提交回复
热议问题