| ikey {ffbase} | R Documentation |
ffdfCreates a unique integer key for unique combinations of rows of an ffdf. In database terms this would correspond to a primary or foreign key.
Orders the ffdf decreasingly alongside the columns with NA's as last in the order and creates the integer key.
ikey(x, ...)
x |
an |
... |
other parameters passed on to chunk |
An integer ff vector of the same length as the number of rows in x with unique values for each unique row
oldffmaxbytes <- getOption("ffmaxbytes")
options(ffmaxbytes = 20)
ffiris <- as.ffdf(iris)
ffiris$key1 <- ikey(ffiris)
ffiris$key2 <- ikey(ffiris[c("Petal.Width","Species")])
unique(ffiris[c("key2","Petal.Width","Species")])[,]
options(ffmaxbytes = oldffmaxbytes)