I'm trying to compare two data frames using an if statement, with the output being a new data frame. I'd like to compare data frame A to B and for each element in A that is larger than the corresponding element in B, return 1 else 0.
A = 5 3 2
4 7 1
1 9 5
B = 1 2 9
2 5 6
7 2 3
Return:
C = 1 1 0
1 1 0
0 1 1