1

I have this matrix of distances. I want to sort the values in the rows in ascending order so row 1 should look like 388.8342 396.9244 405.8091 423.8408 480.4186 487.3038

The 2nd row also should be sorted in ascending order

enter image description here

I tried doing nearest <- distances[order(distances)] nearest but it is not the result that I want.

neogeomat
  • 342
  • 2
  • 12

0 Answers0