It worked perfectly, thank you very much Gianluca!
What is the format of your matrix? Is it a list of lists? Can you give a small sample?
Thanks for your reply. However, how do I apply this code?
i.e. if i name my dataset "data", do I just type
data[{{1, 2}, {2, 1}} /. {a?NumericQ, b} :> {a, b, If[a >= b, 1, 0]}]?
Sorry for the weird questions, I'm quite new to this program =)
Thanks!
Something like this?
{{1, 2}, {2, 1}} /. {a_?NumericQ, b_} :> {a, b, If[a >= b, 1, 0]}