| expand.ffgrid {ffbase} | R Documentation |
ffdf from All Combinations of FactorsSimilar as expand.grid in the base package generates an ffdf.
Code is almost copy-pasted from expand.grid.
expand.ffgrid(..., KEEP.OUT.ATTRS = TRUE, stringsAsFactors = TRUE)
... |
|
KEEP.OUT.ATTRS |
currently ignored |
stringsAsFactors |
logical specifying if character vectors are converted to factors. Irrelevant for |
A ffdf containing one row for each combination of the supplied factors. The first factors vary fastest.
The columns are labelled by the factors if these are supplied as named arguments or named components of a list.
comb <- expand.ffgrid(ff(1:1000), ff(factor(LETTERS))) dim(comb) x <- ff(factor(LETTERS)) y <- ff(1:1000) z <- ff(seq.Date(Sys.Date(), Sys.Date()+10, by = "day")) comb <- expand.ffgrid(x, y, z) dim(comb) comb[1:100, ] expand.ffgrid(list(a = ff(1:10), b = ff(1:10)))