Fread

A binary-safe file read function in C/C++/PHP that returns the specified number of bytes from a stream

Read.table

Read.table is basic R function which reads a file in table format and creates a data frame from it, with cases corresponding to lines and variables to fields in the file.



Read_csv data.table base

Example

"For reading large csv files you should either use readr read_csv or data.table fread as both are much faster than base read.table"

from question  

How do I import a large (6 Gb) .csv file into R efficiently and quickly, without the R REPL crashing?

"Fread ... is extremely fast 10 - 100 times faster than read.table ... or read.csv ... for large datasets"

from question  

Vectorize combining two matrices in R

"Fread performs faster and more efficiently than read.table but read.table produces less no errors on the same data set"

from question  

R workarounds: fread versus read.table

Others

Example

I will reiterate that fread is significantly quicker as is shown in this post on stack overflow quickly reading very large tables as dataframes in r;in summary the tests on a 51 mb file - 1e6 rows x 6 columns showed an performance improvement of over 70 against the best alternative methods including sqldf ff and read.table with and without the optimised setting recommended in the answer by lukea

from question  

Reading in all files with a specific extension

Interestingly for 1 million rows per file the optimised version of read.csv and read.table take 422 and 430 more time than fread whilst without optimisation this leaps to around 1500 and 1005 longer

from question  

Reading in all files with a specific extension

You might want to give the data.table package a try check out the fread function which is much faster than read.table

from question  

R vegan simper analysis running out of memory

Btw fread is much faster than read.table

from question  

Duplicate 'row.names' are not allowed -- still killing me

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0