> From: "sibonile sibanda" <[EMAIL PROTECTED]>
> Subject: [R-sig-Geo] Moving Average/Surface
>
> Is there a way to do moving average interpolation or moving surface in R
> from point data?


In the `spatstat' package the function density.ppp has an argument
`weights'. This can be used to perform spatial interpolation of values
recorded at arbitrary point locations, using kernel smoothing. Suppose X
is the point pattern of locations (an object of class "ppp") and Y is the
corresponding vector of values to be interpolated. Then
            num <- density(X, weights=Y)
            den <- density(X)
            Z <- eval.im(num/den)
calculates the standard kernel-weighted average. The argument `sigma' of
density.ppp can be used to control the smoothing bandwidth. The result Z
is a pixel image (object of class "im") that can be plotted using plot.im,
contour.im, image.im, persp.im etc.

For other kinds of smoothing, look at package `akima'

Adrian Baddeley

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to