Define what neighbours to look for

look_for(.df, neighbours = 1, within = Inf, from_border = FALSE, error = 0)

Arguments

.df

Data frame with x, y, and/or z, and value or component columns, typically output from look_at() or look_in().

neighbours

Number of nearest neighbours to look for. Can be Inf if within is finite, in which case all neighbours within that distance are looked for.

within

Maximum search distance.

from_border

Look for neighbours of border voxels. Defaults to TRUE. If FALSE, minus sampling is performed.

error

Approximate error bound, for approximate nearest neighbour search.

Value

List with the distance matrix and xyz data frame. When looking at components, additionally a connected matrix.