I've got a dataframe in R (inputdata) with two columns (inputdata$col1, inputdata$col2) that I wish to combine.
The values of the list contain either the values 1 or 2 signifying cases & controls respectively.
If either consists of a 1, I wish the newlist to consist of a 1 but if both contain a 2 the newlist should contain a 2. How can I do this?