This function requires the bigdata library section to be loaded.
bd.split.by.window(data, window, offset=0, drop.incomplete=F, bigdata=is(x,"bdFrame"))
bdFrame
or
data.frame
.
offset=window
, so each block directly follows
the previous one.
If
offset
is greater than
window
,
some rows will be skipped between blocks.
TRUE
, this will only process blocks with
window
rows.
If this is
FALSE
, blocks at the end of the data set will be
processed, even if they have less than
window
rows.
TRUE
, returns a list of
bdFrame
objects.
If
FALSE
, this returns a list of
data.frame
objects.
The default uses the type of
x
to determine which type of objects to return.
bigdata
is
TRUE
,
the list elements will be
bdFrame
objects;
otherwise, they will be
data.frame
objects.
This function divides the input data into blocks defined by a moving window over the data rows, and returns a list of all of these blocks.
If
bigdata
is
FALSE
, the output list elements will be
data.frame
objects.
In this case, if all of the data is too large to fit in memory, an error will occur.
## Divide fuel.frame into a list of 5-row data.frames bd.split.by.window(fuel.frame, 5)