Generate matrix with value flags
- by pagid
I do have a solution for the following problem but it's quite ugly and it can most likely be done in a much shorter way. Would be great to get your help.
My input looks like this:
C1 C2
A B
B D
D C
A D
and my output should look like this:
A B C D
1 1 0 0
0 1 0 1
0 0 1 1
1 0 0 1
My current solution is:
…