Hello, You need to provide us with a bit more information: Do all the files have the same structure, i.e., tables with the same columns? Are they xls, xlsx or csv files? Do their names share something in common such as a preffix or are they alone in the directory, or...? When you write "in the final file" does this mean that you want to output two files, one with the data and the other with the filenames?
It would be nice if (a) the files were csv files, (b) if you answer to some or all of the rest, (c) anything that I might have forgotten and you find usefull. Rui Barradas Em 17-08-2012 22:19, Amir Kasaeian escreveu: > Dear all, > Good day! > I have a problem in reading Excel files in R and appending them to each > other. Suppose we have several Excel files in a directory with headers and > want to use R to append them in a single file with an additional variable in > the final file indicating from which files the data come from. > As I have many Excel files and their sizes are very big I should write a loop > in R to do the work. > I will be very happy if you guide and help me to write the codes. > Thank you very much in advance. > > Kind regards, > Amir Kasaeian > > > > > Amir Kasaeian, > PhD Student in Biostatistics, > Dept. of Epidemiology and Biostatistics, > School of Public Health, > Tehran University of Medical Sciences (TUMS). > P.B. : 14155-6446 > Cell Phone: +98-912-2063511 > E-mail: akasae...@razi.tums.ac.ir > amir_kasae...@yahoo.com > > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help@r-project.org 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. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org 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.