> x <- rpois(50, 10)
> which(x <= quantile(x, 0.2))
[1] 7 14 16 24 25 28 33 44 45 48
> x[which(x <= quantile(x, 0.2))]
[1] 6 5 4 5 7 7 4 5 6 7
> quantile(x, 0.2)
20%
7.8
HTH,
Dennis
On Thu, Jul 28, 2011 at 9:42 PM, Jim Silverton wrote:
> I have a vector of numbers, and I will like to find the
I have a vector of numbers, and I will like to find the positions of the
lowest 20% of the values. Can anyhow point out how to do this. I tried the
ecdf function but to no avail.
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-help
2 matches
Mail list logo