uniqueL.RdA version of unique keeping enough information to
reverse (or invert) to the original data.
uniqueL(x, isuniq = !duplicated(x), need.sort = is.unsorted(x))numeric vector, of length n, say.
logical vector of the same length as x. For the
reversion to work this should select at least all unique values of
x.
logical indicating if x is not yet sorted.
Note that this argument exists only for speedup possibility when it
is known, and that it must be set correctly.
list of two components,
integer vector of indices
vector of values from x
such that both x[isuniq] === xU and xU[ix] === x.
Duplicated from the sfsmisc package in
addition to the standard unique and
duplicated.