paircount | R Documentation |
Count the number of point-pairs in equally spaced distances bins. Code works in any dimension. If only one point set is provided, the distances of this point set with itself are used (counting each pairs only once, i.e. only ij, not ji).
paircount(x, y = NULL, dr, rmax, cpp = TRUE)
x |
n-element vector or n-by-d matrix of d-dimensional positions of data points |
y |
optional m-element vector or m-by-d matrix of d-dimensional positions of a second point set |
dr |
distance bin size |
rmax |
maximum distance to be considered |
cpp |
logical flag; if set to TRUE (default) a fast implementation in C++ is used, otherwise the counting is performed less efficiently in R. |
Returns a data frame of two column vectors:
r |
mid-points of the distance bins. |
n |
number of pairs in the distance bin. |
Danail Obreschkow
landyszalay
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.