View source: R/geom_pointdensity.R
count_neighbors | R Documentation |
This function counts the number of neighboring points within a specified radius for each point in a given set of coordinates using a C implementation.
count_neighbors(x, y, r2, xy)
x |
A numeric vector of x-coordinates of the points. |
y |
A numeric vector of y-coordinates of the points. |
r2 |
A numeric value representing the squared radius within which to search for neighboring points. |
xy |
A numeric value representing the aspect ratio (usually the ratio of the y-scale to the x-scale). |
A numeric vector where each element represents the count of neighboring points within the specified radius for each point.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.