powered by
wmean(x, w = rep(1, length(x)), na.rm = TRUE)
NA
mean(1:10) wmean(1:10,w=10:1)
Run the code above in your browser using DataLab