merge() has by.x and by.y arguments. If you use them, you can merge
data frames that have different column names. You can specify columns
by name or by number. This is mentioned in the help for merge.
Try
merge(Data1, Data2, by.x=1, by.y=2)
which will keep all of the columns in Data2, or
I have two set of data, Data1 and Data2 . Data1 has a header and Data2 does
not. I would like to merge the two data sets after removing some columns
from data2 .
I am having a problem merging so I had to write and read final data and
specify the “header=F” so the merge can be done by”V1”. Is the
2 matches
Mail list logo