For a given tessellation, this function identifies which cell (centre) each observation belongs to based on nearest neighbour classification.
Arguments
- x
A numeric matrix of covariates where each row is an observation.
- tess
A numeric matrix representing the tessellation centres, where each row is a unique centre.
- dim
An integer vector specifying the column indices of
xto be used for calculating distance.- metric
Either "Euclidean" or "Spherical".
- members
A vector indicating covariate membership.