Possible Duplicate:
calculating double integrals in R quickly
Question from Braun and Murdoch, Monte Carlo Simulation:
doubleintegral: integral(from 0 to 1) integral(from 0 to 1) fct'n: cos(x-y) I-constants: dxdy
For an integral with only "dx" say, I use something like:
integrand <- function(x)
{
exp(x)
}
integrate(integrand, lower = 1, upper = pi) $value
Could anybody please give me a tip, how to write a double integral in the R-Code?