How can I get resulting state from 2 vectors - one vector is turning on and another one is turning off state (need to calculate results in column ~state). If no signals in any column - should take previous state
tribble(
~signal_on, ~signal_off,~state,
1,0,1,
0,0,1,
1,0,1,
1,1,0,
0,1,0,
1,0,1,
1,0,1,
0,0,1,
0,0,1,
0,1,0,
1,0,1
)