Skip to content
Prev 275445 / 398506 Next

merging two dataframes

this
columns
values

Because name and date common columns and you do not need them twice. Merge 
shall work as you expected provided input data are OK. The result of 
command I suggested shall be all values from both data frames aligned by 
name and date.

It is impossible to say what is wrong without reproducible data. Did you 
check size of your data frames after merge? I suspect that date in data 
and date in data3 is somewhat different. You shall check it with ?str 
function.

As Posting guide says you shall provide some suitable data so that we can 
look at it and work with it. Something like 

dput(data[1:20,])

could be enough.

Regards
Petr
dividend
each
merge
http://www.R-project.org/posting-guide.html