[R] Need Help on Joining 2 text files in R

From: CHANDRAMOULI BANERJEE <cmban_30_at_yahoo.co.uk>
Date: Wed, 23 May 2007 12:31:47 +0100 (BST)


Hi,    

  I have 2 text files , the first one looks like this :    

  CC: " some statements"
  this is followed by 10-12 lines in the similar pattern and then the next line is a comment and from the 14th line all the columns are aligned and the variable values are filled in ....    

  The next file is a text file with 3 columns with column names and the 2 files have the same number of rows in both.....    

  I want to concatanate these 2 files side by side to make a complete file, keeping the structure of the first file same......    

  More explicitly the first file looks like:    

  CC:"....some statement............."
  CC:....same as above.......    

  .............................this pattern is followed upto say 10-12 lines and then some variables , I mean columns used in the file is listed as a string like nuclear_intensity; cell_intensity ;....and so on .......
   

  and then in the next row onwards the column headers start with column names and then the variable values are plugged in .......I wish I could have sent you the file but it is in the intranet system and can't be sent over in email.......        

  The second file looks simple with column headers and field values.....The 2 files are both in the text format.....    

  What I really need to know is how to join the 2 text files and make it into one keeping the structure of the first one intact.......I need to join the columns with the column names from the second file to the first one.....    

  I will wait for any help of how to achieve this is R.    

  Thanks and Regards
  Chandramouli Banerjee
  23rd May 2007                      


        [[alternative HTML version deleted]]



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 23 May 2007 - 11:44:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 May 2007 - 17:31:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.