how to input multiple .txt files
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