chunkwise: Process an lvec in chunks

Description Usage Arguments Details

View source: R/chunkwise.R

Description

Process an lvec in chunks

Usage

1
chunkwise(x, init, update, final, ...)

Arguments

x

the lvec.

init

initialisation function. This function should accept an lvec as its first argument and return an initial value for the state.

update

update function. Called for each chunk of data. Receives the current value of the state as its first argument and the next chunk of data as its second argument. Should return an updated state. This function can be called multiple times.

final

finaliser function. Is called after processing the complete lvec. Receives the final state as its first argument. Should return the end result.

...

optional arguments passed on to the supplied functions.

Details

For examples of its use see mean.lvec and sum.lvec.


ldat documentation built on March 26, 2020, 7:59 p.m.

Related to chunkwise in ldat...