[R] Appending the column names

namit saileshchowdary at gmail.com
Mon Jul 30 22:17:55 CEST 2012


Hi Freinds, 

I have two data frames X,Y. I want  to append both the data frames into one,
along with the columns names from both the data frames (it should look like
Z). 

X: 
    Summary    G      Y     R 
      Acc               12    12   13 
      Bcc               11    14   15 
      Ccc               13    15   16 

Y: 
   Summary    G      Y     R 
      Acc               10    11   12 
      Bcc               13    12   11 
      Ccc               11    16   20 



Result 
---------- 
Z: 

Summary         G      Y     R 
      Acc               12    12   13 
      Bcc               11    14   15 
      Ccc               13    15   16 
Summary          G      Y     R 
      Acc               10    11   12 
      Bcc               13    12   11 
      Ccc               11    16   20 


Can anyone help me on this. 

Thanks in Advance. 

Thanks, 
Namit. 

Arun  your logic is not working,getting error message(could not find
function"Colnames")



--
View this message in context: http://r.789695.n4.nabble.com/Appending-the-column-names-tp4638421.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list