Sparse grid integration in R