This code is (largely) a port from Matlab to R of the code from 2DSpecTools: A 2D spectral analysis toolkit for Matlab by Taylor Perron et al.

bin(x, y, nbin)

Arguments

x

numeric

y

numeric

nbin

numeric, the number of bins

Value

a matrix with binned values and summary statistics