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)

Related Posts
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.

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
Love this Post? Spread the Word!
Share