[R] read multiple large files into one dataframe
Brad Patrick Schneid
bpschn01 at gmail.com
Sun Jan 24 20:34:59 CET 2010
### 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.
More information about the R-help
mailing list