I have a df1:
Encounter Score1
33 4
44 6
66 9
77 2
89 3
100 1
110 4
120 4
104 2
I have a second (and third) smaller df2 that look like:
Encounter Age Kids
33 40 2
66 43 9
89 18 3
100 25 1
I would like to merge these two data.frames by "Encounter" but when I am matching them, my new dataframe has more rows that df2.
I am using new <- merge(df2,df1, by="Encounter")
but the new df has more rows than the original df2. How can I restrict the new df to just the 4 original rows of df2?