I have four variables as below in a data.frame which continues on thousands of rows:
One Two Three Four
TRUE TRUE FALSE FALSE
FALSE TRUE TRUE TRUE
TRUE FALSE FALSE TRUE
TRUE TRUE TRUE FALSE
FALSE TRUE FALSE TRUE
FALSE FALSE TRUE FALSE
TRUE FALSE FALSE TRUE
I want to create two new variables, one which merges columns one and two, the second which merges columns three and four. So each new column would display TRUE if either or both of the two columns displayed TRUE, and would display FALSE if both were false. The resulting data would look like this:
One Two OneTwo Three Four ThreeFour
TRUE TRUE TRUE FALSE FALSE FALSE
FALSE TRUE TRUE TRUE TRUE TRUE
TRUE FALSE TRUE FALSE TRUE TRUE
TRUE TRUE TRUE FALSE FALSE FALSE
FALSE FALSE FALSE FALSE TRUE TRUE
FALSE FALSE FALSE TRUE FALSE TRUE
TRUE FALSE TRUE FALSE TRUE TRUE
Any help would be much appreciated. I've looked through some other questions but can't find how to do this specifically.