Closed nalimilan closed 11 years ago
Sorry, this does not seem to be completely fixed. With a slightly different test case, I still get a weird error:
> iris1 <- as.ffdf(iris)
> iris2 <- as.ffdf(iris)
> rbind(iris1, subset(iris2, select=Species))
Erreur dans .subset2(dummy, i, exact = exact) : index out of bounds
> traceback()
9: `[[.ffdf`(dat, i)
8: dat[[i]]
7: lapply(list(...), function(x) {
if (is.factor(x))
levels(x)
else x
})
6: unlist(lapply(list(...), function(x) {
if (is.factor(x))
levels(x)
else x
}))
5: unique(unlist(lapply(list(...), function(x) {
if (is.factor(x))
levels(x)
else x
})))
4: appendLevels(levels(x[[i]]), dat[[i]])
3: ffdfappend(x, l)
2: rbind(deparse.level, ...)
1: rbind(iris1, subset(iris2, select = Species))
> ffdfappend(iris1, subset(iris2, select=Species))
Erreur dans .subset2(dummy, i, exact = exact) : index out of bounds
Also, with the test case of the original description, there are additional warnings that are not really useful:
a <- as.ffdf(data.frame(a=1:10, b=1:10))
b <- as.ffdf(data.frame(a=1:10, b=1:10, c=1:10))
> rbind(a, b)
Erreur dans ffdfappend(x, l) : Number of columns does not match
In addition: Warnings
1: In fc | sapply(physical(x), is.factor.ff) :
size of a longer object is not a multiple of that of a shorter object [approximate translation]
This error message is really misleading as it mentions rows while the number of columns differs between the two ffdf.