dat = c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0)
tt = table(dat)
sum(as.numeric(names(tt))*tt)/ sum(tt)
- Phil Spector
Statistical Computing Facility
Department of Statistics
Hi,
I have a very simple request (I think).
I have a vector/array,
> c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0)
I produce a reverse sorted table/histogram with it,
> t = rev(sort(table(c))
> t
c
3.3 1.2 5.1 1.3 1.1 1 0
2 2 1 1 1 1 1
I would now like to get the labe
On May 7, 2010, at 9:42 AM, SHANE MILLER, BLOOMBERG/ 731 LEXIN wrote:
Hi,
I have a very simple request (I think).
I have a vector/array,
c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0)
I produce a reverse sorted table/histogram with it,
t = rev(sort(table(c))
t
c
3.3 1.2 5.1 1.3 1.1 1 0
Hi,
I have a very simple request (I think).
I have a vector/array,
> c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0)
I produce a reverse sorted table/histogram with it,
> t = rev(sort(table(c))
> t
c
3.3 1.2 5.1 1.3 1.1 1 0
2 2 1 1 1 1 1
I would now like to get the labe
4 matches
Mail list logo