Ryan Thompson -4 years ago 89

R Question

Suppose I have a data frame with a column for values and another column for the number of times that value was observed:

`x <- data.frame(value=c(1,2,3), count=c(4,2,1))`

x

# value count

# 1 1 4

# 2 2 2

# 3 3 1

I know that I can get the weighted mean of the data using

`weighted.mean`

`weighted.median`

`limma`

`rep`

`sum(x$count)`

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

Have you tried these packages:

`Hmisc`

-- it has several weighted statistics, including weighted quantiles`laeken`

-- it has weighted quantiles.

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**

Latest added