R ff包尺寸错误(选择)

R ff包尺寸错误(选择),r,bigdata,R,Bigdata,我寻找一个解决方案来处理大数据。所以我尝试了“ff套餐”。在我的普通脚本中,我在66896 x 362 data.frame中使用了以下代码进行选择: setwd(wd) bf <- read.table("G_BANKFULL_km3month.csv",header=T, sep=",",dec=".") ## read river discharge global, monthly vlaues 1971-2000## memory.limit(size=16000) # i

我寻找一个解决方案来处理大数据。所以我尝试了“ff套餐”。在我的普通脚本中,我在66896 x 362 data.frame中使用了以下代码进行选择:

setwd(wd)
bf <- read.table("G_BANKFULL_km3month.csv",header=T, sep=",",dec=".")


## read river discharge global, monthly vlaues 1971-2000##
memory.limit(size=16000)   # increase RAM
dis <- read.table('RIVER_AVAIL_7100_WG22.txt', header=T, sep="\t", dec=".")
##


## return only grid cells where bankfull is exceeded at least once during the time 
## period
test <- cbind(dis,bf$VALUE)
test2 <- test[(test[,-c(1:3)] > test[,length(test)]), ]
也许你们中有人曾经使用过ff软件包,并且知道它为什么不起作用。我也很高兴能为其他软件包和大数据解决方案提供一些想法或信息。
干杯

为什么不替换代码

dis_bf_test <-  dis_bf[(dis_bf[,-c(1:3)] > dis_bf[,length(dis_bf)]),]
dis_bf_测试dis_bf[,长度(dis_bf)],]

require(ffbase)
打开(dis_bf_测试)
dis_bf_测试您(其他列名称)
其中,您的ColumnName代表您用
dis\u bf[,-c(1:3)]表示的列
和您用
dis\u bf[,length(dis\u bf)]表示的列

Error in as.hi.matrix(i, maxindex = nvw$n, vw = nvw$vw, pack = FALSE,  : 
argument "dim" is missing, with no default
dis_bf_test <-  dis_bf[(dis_bf[,-c(1:3)] > dis_bf[,length(dis_bf)]),]
require(ffbase)
open(dis_bf_test)
dis_bf_test <- subset(dis_bf_test, yourcolumnname > youothercolumnname)