Scale a vector of weights so that they sum to 1.
Value
A numeric vector that sums to 1. If there are NA
s in x
then the result
sums 1 to if these values are removed.
See also
grouped()
to make this function applicable to grouped data.
Other weights functions:
factor_weights()
,
transmute_weights()