如何使用ff包加载一个大的csv?

时间:2021-11-24 11:28:01

I'm new at R. I have a big csv around 2.5 gb with 3 columns and 40 million rows. The datatypes of the column are interger, datetime and char. How to load this csv using ff package?

我是R的新手。我有一个2.5 gb左右的大csv,有3列和4000万行。列的数据类型是interger,datetime和char。如何使用ff包加载此csv?

1 个解决方案

#1


1  

Well it will give you some idea and use existing links Save and load your bigData ,load big csv file

那么它会给你一些想法并使用现有的链接保存并加载你的bigData,加载大的csv文件

all <- read.csv("file.csv")
    library("ff")
    help(read.table.ffdf)
    x<- read.csv.ffdf(file="file.csv", header=TRUE, VERBOSE=TRUE, first.rows=10000, next.rows=50000, colClasses=NA)
    save.ffdf(ffdfname, dir=”/PATH/TO/STORE/FF/FILES”)
    load.ffdf(dir=”/PATH/TO/STORE/FF/FILES”)

hope it will help you.

希望它能帮助你。

#1


1  

Well it will give you some idea and use existing links Save and load your bigData ,load big csv file

那么它会给你一些想法并使用现有的链接保存并加载你的bigData,加载大的csv文件

all <- read.csv("file.csv")
    library("ff")
    help(read.table.ffdf)
    x<- read.csv.ffdf(file="file.csv", header=TRUE, VERBOSE=TRUE, first.rows=10000, next.rows=50000, colClasses=NA)
    save.ffdf(ffdfname, dir=”/PATH/TO/STORE/FF/FILES”)
    load.ffdf(dir=”/PATH/TO/STORE/FF/FILES”)

hope it will help you.

希望它能帮助你。