### The following is very helpful ######### listOfFiles <- list.files(pattern= ".txt") d <- do.call(rbind, lapply(listOfFiles, read.table)) ###############################
but what if each file contains information corresponding to a different subject and I need to be able to tell where each row came from? i.e.: I need a new row that repeats the original filename for each observation of the former respective files. Any ideas? -- View this message in context: http://n4.nabble.com/read-multiple-large-files-into-one-dataframe-tp891835p1288816.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.