The power of R, pt II

August 7, 2006

I was struggling to parse a big CSV with R this morning, til I discovered this lecture. There’s some useful tips in there on the use of read.table(), with good detail on separators and quotes. I’ve got 350806 lines of data, and hunting down the lines causing the “more columns than column names” error was like looking for a needle in a haystack. The lecture shows how to use count.fields() and table() to quickly identify the problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s