I'm trying to translate the following double integral in R.
n <- 1
InnerFunc <- function(x, y) {f(y - x)*g(x)}
InnerIntegral <- Vectorize(function(y) {integrate(InnerFunc, -Inf, Inf)$value})
integrate(InnerIntegral, n, Inf)
I tried to find inspiration from another question but I'm getting mixed up in the arguments. Thanks for the help.