Given smoother data \((x_i, y_i)\) and maybe weights \(w_i\),
with multiple \(x_i\), use the unique x values, replacing the
\(y\)'s by their (weighted) mean and updating the weights
accordingly.
Usage
xy.unique.x(x, y, w, fun.mean = mean, ...)
Value
Numeric matrix with three columns, named
x, y and w with unique x values and
corresponding y and weights w.
Arguments
x,y
numeric vectors of same length. Alternatively, x
can be a ‘xy’ like structure, see xy.coords.
w
numeric vector of non-negative weights -- or missing which
corresponds to all weights equal.