kpointmean | R Documentation |
This function calculates the spatial mean based on the k-nearest neighbors of a focal point or set of focal points.
kpointmean(source_xy, z, target_xy, k, longlat = FALSE)
source_xy |
A two column vector with x and y coordinates of the source points for interpolation |
z |
A numeric vector of variable values at points 'source_xy' |
target_xy |
A two column vector with x and y coordinates of the target points for interpolation |
k |
A number that defines the number of neighbors used for interpolation |
longlat |
TRUE if coordinates are in long/lat |
A SpatialPolygonsDataFrame object.
# Interpolate
target_xy = expand.grid(x = seq(0.5, 259.5, 2.2), y = seq(0.5, 299.5, 2.2))
source_xy = cbind(x = Walker_Lake$X, y = Walker_Lake$Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.