How to compute weighted mean in R?

Use weighted.mean:

> weighted.mean(z$size, z$count)
[1] 4

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)