[R] How to rank matrix data by deciles?
vincent.deluard
vincent.deluard at trimtabs.com
Fri May 7 01:36:37 CEST 2010
Hi R users,
I have a matrix of data similar to:
> y=matrix(rnorm(55),ncol=5)
I would like to know to which decile each number belongs compared to the
numbers in its column.
Say y[1,1] is the third decile among y[1:11,1] and y[2,1] is in the second
decile
I would like get a matrix that would return their ranks in decile, i.e.,
y[1,1] -> 3
y[2,1] -> 2
Your help is much appreciated!
--
View this message in context: http://r.789695.n4.nabble.com/How-to-rank-matrix-data-by-deciles-tp2133496p2133496.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list