# Reading large data tables in R

[This article was first published on

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

**Fabio Marroni's Blog » R**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Ok, I confess.

Until yesterday I was one of those still trying to read large data tables using read.table.

Then, I came across this thread in stackoverflow and I saw the light.

Since I noticed that a lot of people still struggle with read.table I decided to write this very brief post.

Imagine that you have your large file named “mylargefile.txt”. Then all you have to do is the following.

library(data.table) mydata<-fread("mylargefile.txt")

I promise I’ll never go back to read.table again!

To

**leave a comment**for the author, please follow the link and comment on their blog:**Fabio Marroni's Blog » R**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.