Create an index from a filter statement
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.
ffwhich(x, expr, ...)
x |
|
expr |
R code that evaluates to a logical |
... |
not used |
ffindexget ffindexset
# 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,][,]
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.