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
xor character vector matching the names inx. Ifmissingori = NULL, the entirexis considered for the computation of the score- na.rm
logical, whether to remove
NAvalues fromxbefore computation