Skip to content
Prev 180213 / 398502 Next

read multiple large files into one dataframe

can you provide reproducible code please?

even a fake example would help.

I would

1) set up a loop to read in each file from a directory
2)  inside the loop chop up/ aggregate the data, each file in turn and spit 
each new aggreagated file out to a directory using write.table(). This will 
reduce the memory needed by only including the info you want. Make sure each 
file is a data frame with the same names.
3) set up a new loop to read in each new small file and rbind them all 
together to make your new "master file".

The R gurus may have a more parsimonious solution.

HTH

Simon.


----- Original Message ----- 
From: "SYKES, Jennifer" <Jennifer.SYKES at nats.co.uk>
To: <r-help at r-project.org>
Sent: Wednesday, May 13, 2009 11:45 AM
Subject: [R] read multiple large files into one dataframe