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

ffwhich

Create an index from a filter statement


Description

ffwhich creates an ff integer index vector from a filter expression. The resulting vector can be used to index or subset a ffdf or ff vector.

Usage

ffwhich(x, expr, ...)

Arguments

x

ff or ffdf object

expr

R code that evaluates to a logical

...

not used

See Also

ffindexget ffindexset

Examples

# create a ff vector
x <- ff(10:1)
# make an ff index vector
idx <- ffwhich(x, x < 5)
# use it to retrieve values from x
x[idx][]

# create a ffdf data.frame
dat <- ffdf(x1=x, y1=x)
# create an ff index vector from a filter statement
idx <- ffwhich(dat, x1 < 5 & y1 > 2)
# use it to select data from the data.frame
dat[idx,][,]

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.