Sean Davis sdavis2 at mail.nih.gov
Wed Mar 9 11:56:36 CET 2005

Taking this apart:

to find the Q5(quantile):
See ?quantile

for each row:
See ?apply

if x<n {
do stuff
} else if ((x>n) & (x<m)) {
do other stuff
} else {
do other other stuff
}

Sean

On Mar 9, 2005, at 4:15 AM, zhihua li wrote:

> Dear netters,
>
> Now I have a matrix at hand. For each row, I want to find the Q5(the
> 5th quantile) and the Q95, and put them in a function fyn(), which
> will return two numbers n and m(n<m). Then I'll take each element (say
> x) in the row one by one, and perform a judgment: if x<n, do sub1(x);
> if n<=x<=m, do sub2(x); if x>m, do sub3(x). The process goes on
> through each row in the matrix. This program isnot very complicated,
> but hard enough for me...........So could anybody give me a prototype
> of the code?
> Thanks a lot!
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor