paircount: Count the number of point-pairs in distance bins

Description Usage Arguments Value Author(s) See Also

View source: R/paircount.R

Description

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).

Usage

1
paircount(x, y = NULL, dr, rmax, cpp = TRUE)

Arguments

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.

Value

Returns a list with two vectors

r

vector with the mid-points of the distance bins.

n

number of pairs in the distance bin.

Author(s)

Danail Obreschkow

See Also

landyszalay


physx documentation built on Feb. 3, 2022, 5:08 p.m.

Related to paircount in physx...