panel#

swordfish.function.panel()#

Rearrange metrics as a matrix (or multiple matrices). For each vector in metrics, return a matrix.

Function panel is similar to SQL pivotBy clause in that they can both rearrange data as a matrix based on 2 dimensions. The difference is that exec… pivot by… can only convert one column into a matrix whereas function panel can convert one or multiple columns into one or multiple matrices.

Parameters:
  • row (Constant) – A vector. Each element corresponds to a row in a matrix in the result.

  • col (Constant) – A vector. Each element corresponds to a column in a matrix in the result.

  • metrics (Constant) – Oone or multiple vectors. Each vector in metrics corresponds to a matrix in the result.

  • rowLabel (Constant, optional) – A vector of row labels for the matrix (or matrices) in the result. It is composed of distinct values in ascending order. The result only includes the rows specified in rowLabel.

  • colLabel (Constant, optional) – A vector of column labels for the matrix (or matrices) in the result. It is composed of distinct values in ascending order. The result only includes the columns specified in colLabel.

  • parallel (Constant, optional) – A Boolean value indicating whether to conduct parallel computing. The default value is false.