Skip to content

What is the best package for large data cleaning (not statistical analysis)?

4 messages · jim holtman, Sean Zhang, Josuah Rechtsteiner

#
Exactly what type of cleaning do you want to do on them?  Can you read
in the data a block at a time (e.g., 1M records), clean them up and
then write them back out?  You would have the choice of putting them
back as a text file or possibly storing them using 'filehash'.  I have
used that technique to segment a year's worth of data that was
probably 3GB of text into monthly objects that were about 70MB
dataframes that I stored using filehash.  These I then read back in to
do processing where I could summarize by month.  So it all depends on
what you want to do.

You could read in the chunks, clean them and then reshape them into
dataframes that you could process later.  You will still probably have
the problem that all the data still won't fit in memory.  Now one
thing I did was that since the dataframes were stored as binary
objects in filehash, it was pretty fast to retrieve them, pick out the
data I needed from each month and create a subset of just the data I
needed that would now fit in memory.

So it all depends ...........
On Sat, Mar 14, 2009 at 8:46 PM, Sean Zhang <seanecon at gmail.com> wrote:

  
    
#
Hi Sean,

you should think about storing the data externally in a sql database.  
this makes you very flexible and you can do a lot of manipultaion  
directly in the db. with the help of stored procedures for example in  
a postgreSQL db you can use almost any preferred languege to  
manipulate the data before loading it into R. there's also a  
procedural language based on R with which you can do a lot of things  
already inside postgresql databases.

and keep in mind: learning sql isn't more difficult than R.

best,

josuah


Am 15.03.2009 um 13:13 schrieb Sean Zhang: