Sort and bin x within a specified tolerance, using hist().
sort_bin(x, tol = 1e-05, nmax = NULL)
list with three elements. x_sort is sorted and binned x, w is a vector of weights corresponding to the frequency of each bin, order is a vector specifying the ordering of x into the binned values sort_x.
vector of covariates.
numeric tolerance, minimum distance between neighbouring points, to avoid singularities.
if specified, overrides tol as maximal number of unique points.