[R] Need Help

From: CHANDRAMOULI BANERJEE <cmban_30_at_yahoo.co.uk>
Date: Mon, 28 May 2007 16:15:30 +0100 (BST)


I have 2 text files the first one is in the following format:

CC: "Some statements"

this is continued for 11-12 lines of variable length. then a line containing the variable names used in the file and then the variable fields with their observations...there are in all 684 observations.

The next file is a text file containing 3 variables and 684 observations but are not numbered , I mean 1 to 684. Only th variable values are there along with thew column headers.

My target is to merge these 2 text files and create a new text file preserving the format of the first one becos the subsequent steps of the main program uses the format of the first file. I have to create an id variable that numbers the observations from 1 to 684 and then merge th 2 files with that id, because the first one has the id variable numbered from 1 to 684.

Please help me to achieve this in R.

Chandramouli Banerjee                  

        [[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 Mon 28 May 2007 - 15:21:20 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 Mon 28 May 2007 - 15:31:11 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.