From: wjg on
I am having trouble coming up with an efficient way of returning the
first instance of a pair of records.
The problem hinges on reciprocal measured values V and VR repeating in
a large dataset.

For example: the row with ID=13 and IDR=1 is the reciprocal measured
data of ID=1 and IDR=13. I need to only return the first encountered
reciprocal row as in the output below. I have looked into various
combinations of the functions <unique> and <intersect> in for loops,
but not getting the result I need. Any ideas?

Regards,
Jason



Data
ID IDR V VR
13 1 -20.59002 -20.58574
1 13 -20.58574 -20.59002
3 34 -0.7809829 -0.7821302
23 2 -2.65598 -2.634228
8 51 -6.091704 -6.093145
34 3 -0.7821302 -0.7809829
51 8 -6.093145 -6.091704

Wanted output
ID IDR V VR
13 1 -20.59002 -20.58574
3 34 -0.7809829 -0.7821302
23 2 -2.65598 -2.634228
34 3 -0.7821302 -0.7809829
8 51 -6.091704 -6.093145