1
我尝试使用ff包。在这种情况下,我尝试绑定两个ff数据帧。我找到了一个将ffdf和ff向量结合起来的解决方案,但是我如何结合到ffdf。在这里我对ffdf与FF矢量合成代码:列绑定ff数据帧在R
library(ff)
## read Bankfull flow##
setwd(wd)
bf <- read.csv.ffdf(file="G_BANKFULL_km3month.csv",header=TRUE)
## read river discharge global, monthly vlaues 1971-2000##
memory.limit(size=16000) # increase working memory
dis <- read.table.ffdf(file='RIVER_AVAIL_7100_WG22.txt', header=T, sep="\t", dec=".")
##read bankfull values as ff object##
bfvalues <- ff(bf[,2])
##combination of bf and dis (see test <- cbind(dis,bf$VALUE))
dis_bf <- do.call('ffdf', c(physical(dis), list(bfvalues=bfvalues)))
非常感谢您的帮助
为什么不能简单地做DIS $ yourcolumnname < - BF $ yourcolumnname? – jwijffels
或者执行dis $ yourcolumnname < - clone(bf $ yourcolumnname) - 这个会制作ff文件的一个副本,以便您可以在disffdf中对其进行处理而不会影响bd ffdf。 – jwijffels
非常感谢您的回答。那么我设法解决我的问题与merge(),也一样。但是,无论如何,你的解决方案也是如此。 – yemmit