powered by
Match ix,jx-couple in ti,tj-table and return their 1-based positions (0 for non matched couples)
match_ij(ix, jx, ti, tj)
An integer vector
match_ij(1:2, 1:2, 0:4, 0:4) # [1] 2 3
Run the code above in your browser using DataLab