I want to calculate/evaluate the convolution
$$g(x)=\int_D f(x-t) \phi(t) dt,$$
where $f$ is a density and $\phi$ is a smooth function with compact support $D$. The convolution is not available in closed-form and I need to integrate it numerically. My question is: Is there an efficient way to do this? I want to implement it in R, so, I would like to see if there is a better way than using the command integrate()
.