transduce_tbl: Transduce_tbl

Description Usage Arguments Value

Description

Similiar to the normal transduce function but it explicitly only works for data.frames or matrices. It has an additional parameter that indicates if it should be iterated over columns or rows. By default it iterates over the rows starting with the first row.

Usage

1
2
transduce_tbl(transducer, step, tbl, margin = "rows",
  init = transducer(step)())

Arguments

transducer

a transducer.

step

a step function.

tbl

a table (matrix or data.frame).

margin

indicates wether to iterate over "rows" or "columns". Default value is "rows".

init

an initial value. If ommitted the step function will be called to generate a value without an argument.

Value

The result of the reduction piped through the transducer.


dirkschumacher/transduceR documentation built on May 15, 2019, 8:50 a.m.