I have two vectors that I need to add together, but only in instances where their corresponding values are not equal. Ex:
aa <- c(1,0,0,1,0)
bb <- c(0,1,1,1,0)
I want to generate a combined vector like so:
aa <- c(1,1,1,1,0)
How might I go about doing this, particularly with vectorization?