Reading large CSV File with R


R Data Science: R Programming A-Z: R For Data Science With Real Exercises!

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)

Coursera Data Science

R Tutorials : 75 Free R Tutorials

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

2 Responses to "Reading large CSV File with R"

Next → ← Prev