Reading large CSV File with R

This tutorial explains how to read large CSV files with R. I have tested this code upto 6 GB File.

Method I : Using data.table library 
yyy = fread("C:\\Users\\Deepanshu\\Documents\\Testing.csv", header = TRUE)

Method II : Using bigmemory library
y <- read.big.matrix("C:\\Users\\Deepanshu\\Documents\\Testing.csv", type = "integer", header=TRUE)
#coerce a big.matrix to a matrix
yy= as.matrix(y)

Love this Post? Spread the Word!
Comment and share to motivate us to write more!
About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 8 years of experience in data science. During his tenure, he has worked with global clients in various domains like Banking, Insurance, Telecom and Human Resource.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*
Related Posts:
4 Responses to "Reading large CSV File with R"
  1. It's actually incredibly simple. All you need to do is go to the start menu and choose run. Then type "cmd" into the dialogue box and hit enter. excel reporting dashboard

  2. Fine, I want algorithm step for k nearest neighbor


Next → ← Prev
Scroll to Top