powered by
Weighted Sum
weighted.sum(x, w, na.rm = TRUE)
A numeric vector.
a numeric vector of values
a numeric vector of weights
a logical indicating whether to ignore NA values
NA
x <- 1:20 w <- runif(20) weighted.sum(x, w)
Run the code above in your browser using DataLab