pivot#
- swordfish.function.pivot()#
Rearrange the results of an aggregate function as a matrix.
Assume rowAlignCol has n unique elements and colAlignCol has m unique elements. The template will return an n (row) by m (column) matrix, with unique values of rowAlignCol as row labels and unique values of colAlignCol as column labels. For each element of the matrix, the given function is applied conditional on rowAlignCol and colAlignCol equal to corresponding values indicated by the cell’s row and column labels.
- Parameters: