may i suggest the following,
a <- do.call(rbind, lapply(cust1_files, read.table))
(i believe expanding objects in a for loop belong to the R Inferno)
baptiste
On 30 Mar 2009, at 12:58, Mike Lawrence wrote:
cust1_files =
list.files(path=path_to_my_files,pattern='cust1',full.names=TRUE)
a=NULL
for(this_file in cust1_files){
a=rbind(a,read.table(this_file))
}
write.table(a,'cust1.master.txt')
_____________________________
Baptiste AuguiƩ
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag
______________________________________________
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.