My data set looks like:
id 1 2 3 4 5
v1 1 1 0 13 14
v2 1 2 0 13 2
v3 1 12 0 13 5
I have transposed it while representing here, otherwise 1st column is the column name of the dataset
Now, I want to identify id's which have duplicate values in all the columns from v1 to v3 and then flag those id's.
So output will look like:
id 1 2 3 4 5
v1 1 1 0 13 14
v2 1 2 0 13 2
v3 1 12 0 13 5
flag 1 0 1 1 0
I tried various things but not able to get this result. I can do this by doing sum and applying loop but that would take a lot of time since my data set is very huge.
I will be really grateful if you can help me with some simple approach to solve this problem.