This tutorial explains how to read large CSV files with R. I have tested this code upto 6 GB File.
![]() |
Read large CSV Files with R |
Method I : Using data.table library
Method I : Using bigmemory library
library(data.table)
yyy = fread("C:\\Users\\Deepanshu\\Documents\\Testing.csv", header = TRUE)
Method I : 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)