Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ikey

Creates a unique integer key for unique combinations of rows of an ffdf


Description

Creates 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.

Usage

ikey(x, ...)

Arguments

x

an ffdf

...

other parameters passed on to chunk

Value

An integer ff vector of the same length as the number of rows in x with unique values for each unique row

Examples

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)

ffbase

Basic Statistical Functions for Package 'ff'

v0.13.3
GPL-3
Authors
Edwin de Jonge, Jan Wijffels, Jan van der Laan
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.