[R] how to read a group of files into one dataset?

Hadley Wickham hadley at rice.edu
Thu Aug 25 16:38:04 CEST 2011


> # Method 2: Use the plyr package
>
> library('plyr')
> bdf <- ldply(mlply(files, read.csv, header = TRUE), rbind)

Or just

bdf <- ldply(files, read.csv, header = TRUE)

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-help mailing list