This function computes the sum of the
elements of a vector (x
) multiplied by the elements
of another vector (w
).
Arguments
- x
(named) numerical vector
- w
numerical vector of weights the same length as
x
- i
(optional) numerical vector giving the position in
x
or character vector matching the names inx
. Ifmissing
ori = NULL
, the entirex
is considered for the computation of the score- na.rm
logical, whether to remove
NA
values fromx
before computation