1

I have two rows of data, and would like to compare one row to itself before, for e.g.

x1, id1
y1, id2
z1, id3
z1a, id3

I'd like to add a third column comparing ID3 to ID2 so I can right a conditional to give me a list of 0's and 1's, like this

x1, id1, 0
x2, id1, 1
x3, id2, 0
x4, id3, 0
x5, id3, 1

Is there anyway to do this????

F123
  • 11
  • 1

0 Answers0