R读取大数据data.table包之fread

时间:2022-09-16 19:53:25
>library(data.table)
>data=fread("10000000.txt")
>Read 9999999 rows and 71 (of 71) columns from 3.375 GB file in 00:02:36
##一千万行,耗时160s。
##同样的数据用read.table函数读取要600s.

 

 

参考资料:

R语言data.table速查手册:https://www.cnblogs.com/nxld/p/6059570.html

                                           https://zhuanlan.zhihu.com/p/22317779?refer=rdatamining

data.table的guideline:      https://cran.r-project.org/web/packages/data.table/data.table.pdf