Dear All,

 

I have a data frame with n columns: X1, X2, ., Xn. Now I want to create a
new column: if X1 = X2 = . = Xn, the value is 1; Otherwise, the value is 0.

 

How to do that in a quick way instead of doing (n choose 2) comparisons? 

 

Thank you,

 

Frank


	[[alternative HTML version deleted]]


