Suppose I have a data frame with a column for values โโand another column for the number of times this value has been 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 data value using weighted.mean and the weighted median weighted.median function provided by several packages (for example, limma ), but how can I get other weighted statistics in my data, such as 1st and 3rd quartile, and perhaps standard deviation? โExtendingโ data with rep not an option, because sum(x$count) is about 3 billion (the size of the human genome).
source share