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 ? thanks Paolo
sum(x<=7)/length(x)*100 *********** REPLY SEPARATOR *********** On 8/31/2004 at 8:16 AM 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 ? >>> >>>thanks >>> >>>Paolo >>> >>>______________________________________________ >>>R-help at stat.math.ethz.ch mailing list >>>https://stat.ethz.ch/mailman/listinfo/r-help >>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlDipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: witek96 at users.sourceforge.net ---W-W---- http://www.molgen.mpg.de/~wolski wolski at molgen.mpg.de
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 ------------------------------