Why doesn't merge
work in the following? It gives error `Error:
require(ff)
require(ffbase)
a <- ffbase:::as.ff_matrix.ffdf(as.ffdf(data.frame(matrix(rnorm(10),ncol=2))))
b <- ffbase:::as.ff_matrix.ffdf(as.ffdf(data.frame(matrix(rnorm(10),ncol=2))))
a <- as.ffdf(a)
b <- as.ffdf(b)
colnames(a) <- 1:2
colnames(b) <- 3:4
a$RN <- as.ff(1:5)
b$RN <- as.ff(1:5)
c <- merge(a,b,by="RN") #ERROR
However if I do no casting it works:
a <- as.ffdf(data.frame(matrix(rnorm(10),ncol=2)))
b <- as.ffdf(data.frame(matrix(rnorm(10),ncol=2)))
colnames(a) <- 1:2
colnames(b) <- 3:4
a$RN <- as.ff(1:5)
b$RN <- as.ff(1:5)
c <- merge(a,b,by="RN")
Interesting. merge.ffdf is part of ffbase so this should work but apparently when doing
ffbase:::as.ff_matrix.ffdf
, PhysicalIsMatrix is still TRUE. This might mess up the generic dispatching.Can you report this at https://github.com/edwindj/ffbase/issues. I'll have a look to see if I can change the unexported
ffbase:::as.ff_matrix.ffdf
. Thanks.