[R] merge many files together using R

sathya7priya sathya7priya at gmail.com
Thu Jun 14 08:09:39 CEST 2012


I have hundreds of text files which has data like a data frame with three
columns.The column names are same in all the files.I need to merge all files
into a single big file.
My files are like this
file1
"new.col" "ppm.p." "freq.p."
"1_3_diaminopropane" 3.13859 5.67516
"1_3_diaminopropane" 3.137 6.65388
"1_3_diaminopropane" 3.13541 8.0142
"1_3_diaminopropane" 3.13383 9.64184

file2
"new.col" "ppm.p." "freq.p."
"1_3_dimethylurea" 4.80643 88.4026
"1_3_dimethylurea" 2.66393 39.238

file3
"new.col" "ppm.p." "freq.p."
"1_amino_1_phenylmethyl_phosphonic_acid" 7.44687 7.1684
"1_amino_1_phenylmethyl_phosphonic_acid" 4.81412 105.11

I need these files to be combined using a single function or loop.I am
looking for a command which can combine all files in a given folder.The
resultant file also should have three columns with the common column names..
Any one answer for this question pls..


--
View this message in context: http://r.789695.n4.nabble.com/merge-many-files-together-using-R-tp4633332.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list