[R] Rank Values in a Matrix

Jens Oldeland
Mon, 19 May 2008 11:46:45 -0000

Dear All,

a short and maybe simple question:


I have to rank all values in a matrix from 0 to X,

    [1]   [2] [3]  [4]
[1] 0.1  2   0    3
[2] 50   3   3    1
[3] 100 1   1    0
[4] 100  2  2    0

0->0
0.1->1
2->2
3->3
50->4
100->5  (X=5)

is there any function for this? i have looked in several packages
(vegan, labdsv etc.) because I am working with species by site tables,
but without success. perhaps I looked for the wrong terms (rank matrix etc.)

thank you for your help

regards,
Jens

--
+++++++++++++++++++++++++++++++++++++++++
Dipl.Biol. Jens Oldeland
University of Hamburg
Biocentre Klein Flottbek and Botanical Garden
Ohnhorststr. 18
22609 Hamburg,
Germany

Tel:    0049-(0)40-42816-407
Fax:    0049-(0)40-42816-543
Mail: 	Oldeland at botanik.uni-hamburg.de
        Jens.Oldeland at DLR.de  (for attachments > 2mb!!)
http://www.biologie.uni-hamburg.de/bzf/fbda005/fbda005.htm
+++++++++++++++++++++++++++++++++++++++++