I am trying to extract rows from my R dataframe where the ID column has the same value and the pt column has different values. For example, if my data frame looks like this:
ID pt
600 DC90
600 DC90
612 DC18
612 DC02
612 DC02
630 DC30
645 DC16
645 DC16
645 DC16
my desired output would look like this:
ID pt
612 DC18
612 DC02
612 DC02
because ID 612 has two different pt numbers