I currently have such a dataframe (with 60 columns of values) and want to extract the values according to the following rules.
- Compare a1,b1,c1,d1. Find the highest value of the 4 numbers.
- If a1 is the highest value, then get the value of a6. Similarly, if b1 is the highest value, get the value of b6. If c1 is the highest value, get the value of c6. If d1 is the highest value, get the value of d6. (we need to extract the value at this stage)
- Compare a2,b2,c2,d2.Find the highest value of the 4 numbers.
- If a2 is the highest value, then get the value of a7. Similarly, if b2 is the highest value, get the value of b7. If c2 is the highest value, get the value of c7. If d2 is the highest value, get the value of d7,
- We do the above steps until we compare a5,b5,c5,d5 and get the highest value of the 4 values. Then find its corresponding cell a10,b10,c10,or d10.
Thank you very much!
a1    1          
a2    3
a3    4
a4    2
a5    3
a6    9
a7    2
a8    3
a9    4
a10   7 
b1    2
b2    4
b3    5
b4    8
b5    6
b6    5
b7    3
b8    2
b9    1
b10   8
c1    5
c2    11
c3    21
c4    14
c5    2
c6    0
c7    1
c8    16
c9    12
c10   16
d1    21
d2    22
d3    31
d4    33
d5    30
d6    24
d7    23
d8    25
d9    26
d10   27
