Does this help?

x <- c(3, 8, 5, 2, 9, 33, 21)

# the 43rd percentile
quantile(x, 0.43)

# the proportion of the distribution that is less than 7
mean(x<7)

Jean


`·.,,  ><(((?>   `·.,,  ><(((?>   `·.,,  ><(((?>

Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest Road
Antigo, WI 54409  USA



From:
ראובן אברמוביץ <gantkant@walla.com>
To:
<r-help@r-project.org>
Date:
08/02/2011 10:51 AM
Subject:
[R] how to get the percentile of a number in  a vector
Sent by:
r-help-bounces@r-project.org




   I'm familiar with the quantile() command, but what if I have a specific
   number that I want to know its location in a vector? I know that in 
known
   distributions, (for example the normal distribution), there is pnorm 
and
   qnorm, but how can I do it with unknown vector?


   thanks in advance
     _________________________________________________________________

   Walla! Mail - [1]Get your free unlimited mail today

References

   1. http://www.walla.co.il/
______________________________________________
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.




	[[alternative HTML version deleted]]

