edwindj / ffbase

Basic (statistical) functionality for R package ff
github.com/edwindj/ffbase/wiki
35 stars 15 forks source link

replace identical statements with real duplicated in duplicated.ffdf and duplicated.ff #29

Closed jwijffels closed 10 years ago

jwijffels commented 10 years ago

x <- data.frame(x = c(1,2,2,3,3,4)) x$y <- factor(LETTERS[x$x]) duplicated(as.ram(x)) duplicated(as.ffdf(x), by = 2)

As identical is not the same as duplicated, namely when the row names are different e.g.

if(min(i) > 1){ res[i.o[1]] <- duplicated(rbind(i.last, i.x[1, ]))[2]
}
if(min(i) > 1){ res[i.o[1]] <- duplicated(c(i.last, i.x[1]))[2] }