View source: R/private_nn_resample.R
private_nn_resample | R Documentation |
This function takes a set of x,y coordinates and resamples them according to a nearest-neighbour kernel, so that points in sparser parts of the distribution have a larger bandwidth, and their kernels overlap with high probability on the kernels of at least K other points
private_nn_resample(x, id = NULL, K = 5, size = nrow(x))
x |
a two-column matrix of coordinates |
id |
a vector of integers representing group membership (default NULL) |
K |
the number of nearest neighbours each kernel must overlap with default 5. |
size |
the number of points to sample. Default |
a two-column matrix of resampled points
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.