chunkwise: Process an lvec in chunks

Description Usage Arguments Details

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 May 2, 2019, 4:22 a.m.