Otherwise you can try following:

x <- c(1,5,100,300,250,200,550,900,1000)
which(x==quantile(x,0.25,type=3)) 

This will always return number within your vector. See further information
with ?'quantile'

Thanks and regards,
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Percentile-rank-for-each-element-in-list-tp2529523p2530029.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