The data set below is an example that I made. Original data has more cases than below and I could not upload it for confidentiality.
DOB; date of birth, year;the year of the survey
I would like to make tag for duplicated cases that having same DOB between two different year group.
Could you show me code for handling this?
| id | DOB | year |
| 1 | 901020 | 2014 |
| 2 | 981020 | 2014 |
| 3 | 841028 | 2014 |
| 4 | 790707 | 2014 |
| 5 | 800301 | 2014 |
| 6 | 900103 | 2014 |
| 7 | 990328 | 2014 |
| 8 | 780812 | 2014 |
| 9 | 890302 | 2014 |
| 10 | 900101 | 2014 |
| 11 | 901020 | 2015 |
| 12 | 981020 | 2015 |
| 13 | 901020 | 2015 |
| 14 | 770707 | 2015 |
| 15 | 981020 | 2015 |
| 16 | 981020 | 2015 |
| 17 | 990328 | 2015 |
| 18 | 740403 | 2015 |
| 19 | 730203 | 2015 |
| 20 | 980202 | 2015 |
I would like to make tag for duplicated cases that having same DOB between two different year group.
Could you show me code for handling this?

Comment