I have 7 big data.frames with sport statistic. They have different number of rows and different number of columns but some of columns have similar value (game id, player id so I've created game_player_id to merge them). In few of these data.frames some of rows don't exists (player hasn't played) and in others they exist because these players are listed as DNP. I would like to merge these 7 frames into one big one with all players (active and not). merge() works for frames with the same number of rows but it doesn't when I'm trying to run function. As a result I got only columns names and
<0 rows> (or 0-length row.names)
GAME_PLAYER_ID MIN AST
001001 86 1
001002 90 0
001003 30 0
001004 0 DNP
001005 90 2
GAME_PLAYER_ID MIN PASS
001001 86 25
001002 90 45
001003 30 25
001005 90 39
expected result
GAME_PLAYER_ID MIN AST PASS
001001 86 1 25
001002 90 0 45
001003 30 0 25
001004 DNP DNP DNP/NA (whatever but not 0)
001005 90 2 39
Where is the problem? How to do this in simple way? I probably may write a function but it's gonna be complicated (a lot of rows, and more than 20 columns in every data.frame), is there any package which can help me handle with these?