[R] (no subject)

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Tue Aug 31 14:08:58 CEST 2004


On 31-Aug-04 Paolo Tommasini wrote:
> Hi this is a very simple question ! if a have a set of date like
> x=c(1,2,3,4,4,5,6,8,7,8,8)
> 
> how can I find out the percentile of 7 ?

To some extent this depends on precisely how you want to define
"percentile", but if you adopt the interpretation as "percentage
of data not exceeding X" then

   100*sum(x<=7)/length(x)

will give it to you.

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 31-Aug-04                                       Time: 13:08:58
------------------------------ XFMail ------------------------------




More information about the R-help mailing list