Tuesday, February 21, 2023

2 identical values between any two columns

Hello.
I have a file with about 30 columns of integers. I need to create a dummy variable that indicates if at least 2 values per row of any columns have identical values between them.
For example
12 13 12 14: dummy = 1
12 13 14 12: dummy = 1
12 13 14 15: dummy = 0

How can I do it? Thank you

No comments:

Post a Comment