Skip to content
Prev 207458 / 398506 Next

read multiple large files into one dataframe

On Mon, Jan 25, 2010 at 4:43 AM, Paul Hiemstra <p.hiemstra at geo.uu.nl> wrote:
Or use the plyr package:

listOfFiles <- list.files(pattern= ".txt")
names(listOfFiles) <- basename(listOfFiles)

d <- ldply(listOfFiles, read.table)

See http://had.co.nz/plyr for more info.

Hadley