Skip to contents

This function calculates the spatial mean based on the k-nearest neighbors of a focal point or set of focal points.

Usage

kpointmean(source_xy, target_xy, z, k, longlat = FALSE)

Arguments

source_xy

A simple features object of type POINT with the source points for interpolation

target_xy

A simple features object of type POINT with the target points for interpolation

z

The name of the column with the variable in source_xy to interpolate

k

A number that defines the number of neighbors used for interpolation

longlat

TRUE if coordinates are in long/lat

Value

A simple features object.