I have two columns that holds integers. I need to rearrange the columns so that the first column values are always larger
The example input:
co1 co2
[1,] 15 25
[2,] 35 55
[3,] 65 45
[4,] 40 50
The desired output:
co1 co2
[1,] 25 15
[2,] 55 35
[3,] 65 45
[4,] 50 40
Any help will be appreciated.