title: Change dimension of a data frame
body: <p>I have a large data frame called "df" (with some NA values inside)</p>
  
  <pre><code>dim(df)
  [1] 2174  420    
  </code></pre>
  
  <p>I would like to change the dimension of it into 32610 rows and 28 columns (by row), for example:</p>
  
  <pre><code> #df=
  
    a b c d e f g ...
  1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ...    
  2 .........   
  3 .........    
  4 .........    
  5 .........    
  6 .........    
  ...........
  </code></pre>
  
  <p>Into:</p>
  
  <pre><code>#new.df=
  
    r1 r2 r3 r4 r5 r6 r7 ...                                                   ... r28
  1 1  2  3  4  5  6  7  8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28   
  2 29 30 ...   
  3 .........    
  4 .........    
  5 .........    
  6 .........    
  ...........
  </code></pre>
  
  <p>Therefore, new dimension:</p>
  
  <pre><code>dim(new.df)
  [1] 32610  28 
  </code></pre>
  
  <p>Can anyone help me with the code?</p>