I have two data sets and I want to add them together based on matching column names. For the data sets, each row represents a study site and each column represents a survey. Each survey is restricted to one block. I want to add the contents of each data set together based on column names.
Data set 1 (1 denotes a survey was performed):
Block A1 A2 A3 A4 A5
1 0 1 0 0 0
2 1 0 0 1 0
3 0 0 1 0 1
Data set 2 is a subset of data set 1 in which the 1 now represents that the species of interest was found during the survey
Data set 2:
Block A1 A2 A4 A5
1 0 1 0 0
3 0 0 0 1
The ideal out put would look something like this where 2 represents that a survey was performed and the species of interest was found, 1 represents that a survey was performed and 0 that no surveys were performed.
Data set 3:
Block A1 A2 A3 A4 A5
1 0 2 0 0 0
2 1 0 0 1 0
3 0 0 1 0 2