sort_bin {drape} | R Documentation |
Sort and bin x within a specified tolerance, using hist().
Description
Sort and bin x within a specified tolerance, using hist().
Usage
sort_bin(x, tol = 1e-05, nmax = NULL)
Arguments
x |
vector of covariates. |
tol |
numeric tolerance, minimum distance between neighbouring points, to avoid singularities. |
nmax |
if specified, overrides tol as maximal number of unique points. |
Value
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.
[Package drape version 0.0.1 Index]