The surface is converted to a binary pixel image
using the as.im.function method from package
spatstat (Baddeley and Turner, 2005).
The integral under the surface is then approximated as the
sum over (pixel area * f(pixel midpoint)).
a polygonal integration domain.
It can be any object coercible to the spatstat class
"owin" (via as.owin).
f
a two-dimensional real function.
As its first argument it must take a coordinate matrix, i.e., a
numeric matrix with two columns, and it must return a numeric vector of
length the number of coordinates.
...
further arguments for f.
eps
width and height of the pixels (squares),
see as.mask.
dimyx
number of subdivisions in each dimension,
see as.mask.
plot
logical indicating if an illustrative plot of the numerical
integration should be produced.
Value
The approximated value of the integral of f over
polyregion.
References
Baddeley, A. and Turner, R. (2005).
spatstat: an Rpackage for analyzing spatial point patterns.
Journal of Statistical Software, 12 (6), 1-42.