cbind 2 dataframes with different number of rows : <p>I have two lists named <code>h</code> and <code>g</code>.
They each contain 244 dataframes and they look like the following:</p>

<pre><code>h[[1]]
   year  avg    hr   sal
1  2010  0.300  31   2000
2  2011  0.290  30   4000
3  2012  0.275  14    600
4  2013  0.280  24    800 
5  2014  0.295  18   1000
6  2015  0.330  26   7000
7  2016  0.315  40   9000

g[[1]]
   year  pos  fld     
1  2010  A   0.990
2  2011  B   0.995
3  2013  C   0.970
4  2014  B   0.980
5  2015  D   0.990
</code></pre>

<p>I want to <code>cbind</code> these two dataframes.
But as you see, they have different number of rows.
I want to combine these dataframes so that the rows with the same year will be combined in one row. And I want the empty spaces to be filled with <code>NA</code>.
The result I expect looks like this:</p>

<pre><code>   year  avg    hr   sal   pos   fld
1  2010  0.300  31   2000   A   0.990
2  2011  0.290  30   4000   B   0.995
3  2012  0.275  14    600   NA    NA
4  2013  0.280  24    800   C   0.970
5  2014  0.295  18   1000   B   0.980
6  2015  0.330  26   7000   D   0.990
7  2016  0.315  40   9000   NA    NA
</code></pre>

<p>Also, I want to repeat this for all the 244 dataframes in each list, <code>h</code> and <code>g</code>.
I'd like to make a new list named <code>final</code> which contains the 244 combined dataframes.</p>

<p>How can I do this...?
All answers will be greatly appreciated :)</p>
