Skip to content
Prev 374395 / 398530 Next

Merging dataframes

Thanks - Peter, Eivind, Rui


Sorry, I perhaps could not explain it properly in the first go.

Trying to simplify it here with an example - Say I have two dataframes as
below that are NOT equally-sized data frames (i.e., number of columns are
different in each table):



Table_A:

Email             Name                   Phone

abc at gmail.com   John Chan         0909

bcd at yahoo.com   Tim Ma                    89089

......



Table_B:

Email                     Name                 Sex        Phone

abc at gmail.com    John Chan            M                 0909

khn at hotmail.com           Rosy  Kim               F                   7779

.....



Now, I have used -

merge (Table_A, Table_B, by="Email", all = FALSE))



- to find only the rows that match from these data frames - based on Email
as primary key.



Further, I am also interested (using "Email" as the common key) which rows
from Table_A did not match with Table_B.

I am not sure how to do this here.

Thanks and regards,
Chintanu
On Tue, May 1, 2018 at 8:48 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote: