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 
library(data.table)
yyy = fread("C:\\Users\\Deepanshu\\Documents\\Testing.csv", header = TRUE)

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

Spread the Word!
Share
Related Posts
About Author:

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

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

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

    ReplyDelete

Next → ← Prev

Looks like you are using an ad blocker!

To continue reading you need to turnoff adblocker and refresh the page. We rely on advertising to help fund our site. Please whitelist us if you enjoy our content.