I have gotten the matrix in R as shown below. If I use the command
rows <- which(sim_results == min(sim_results))
It will return 17 and 854.
Now I would like to retrieve the top 10 records sorted by scores. i.e. to get values from 17 to 630 shown in the matrix.
I tried to do the coding as per below, however it didn't retrieve from 17 to 630 but retrieved values as highlighted. Anything I did wronlgy?