Is this what you want to have:

> x <- c(1,5,100,300,250,200,550,900,1000) 
> # assume you want the position of 25th percentile
> which(x==quantile(x,0.25))
[1] 3

Note that "position" is meaningful only when the percentile is one of the
observed data values. If you want to know the "position" of 70th percentile
(that is between "position" 6 and "position" 7). You need to do something
coding to get these two adjacent "positions".
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Percentile-rank-for-each-element-in-list-tp2529523p2529741.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to