I need to do the 2-steps analysis of the following data:
1 5 1 -2
2 6 3 4
1 5 4 -3
NA NA NA NA
2 5 4 -4
Step 1. Remove all NA rows (these are always whole rows, not cells) Step 2. Sort rows by the values of 4th column in descending order
The result should be the following:
2 6 3 4
1 5 1 -2
1 5 4 -3
2 5 4 -4
How can I efficiently do this processing, while considering that the data set might be large (e.g. 100,000 entries).