hello,
It's also possible to use the quantile function :
vec0 <- c(0.1,0.2, 0.5, 0.1,0.8, 0.4, 0.9)
which(vec0 >= quantile(vec0, 0.7, type = 1))
SD
2014-03-29 18:02 GMT+01:00 arun :
> Hi,
> Try:
> vec1 <- setNames(c(0.1,0.2, 0.5, 0.1,0.8, 0.4, 0.9), 1:7)
> vec2 <- sort(vec1,decreasing=TRUE)
>
Hi,
Try:
vec1 <- setNames(c(0.1,0.2, 0.5, 0.1,0.8, 0.4, 0.9), 1:7)
vec2 <- sort(vec1,decreasing=TRUE)
names(vec2[seq(ceiling(length(vec2)*0.3))])
#[1] "7" "5" "3"
A.K.
Hi, I need your help again. I have some data like this:
1 23 4 56 7 ...
0.1 0.2 0.5
2 matches
Mail list logo