[0aeb11]: / w.mean.R

Download this file

6 lines (6 with data), 74 Bytes

1
2
3
4
5
6
w.mean =
function (x, w)
{
wx = w*x
sum(wx) / sum(w)
}