I am using R. I have two tables, both with an ID variable. I want to make another table where I have a column for ID which only has IDs that appear in both original tables, plus a column for another variable that only appeared in one of the original tables.
Any help would be much appreciated.