Smoothfun(X, ...)
"Smoothfun"(X, sigma = NULL, ..., weights = NULL, edge = TRUE, diggle = FALSE)
"ppp"
).
Smooth.ppp
.
Smooth.ppp
.
X
.
Smooth.ppp
.
function
with arguments x,y
.
The function also belongs to the class "Smoothfun"
which has
methods for print
and as.im
.
It also belongs to the class "funxy"
which has methods
for plot
, contour
and persp
.
Smoothfun
and Smooth
both perform kernel-smoothed spatial interpolation
of numeric values observed at irregular spatial locations.
The difference is that Smooth
returns a pixel image,
containing the interpolated values at a grid of locations, while
Smoothfun
returns a function(x,y)
which can be used
to compute the interpolated value at any spatial location.
For purposes such as model-fitting it is more accurate to
use Smoothfun
to interpolate data.
Smooth
f <- Smoothfun(longleaf)
f
f(120, 80)
plot(f)
Run the code above in your browser using DataLab