align#

swordfish.function.align()#

Align the left and right matrices based on row labels and/or column labels (specified by byRow) using the join method specified by how.

Parameters:
  • left (Constant) – Matrix with column and/or row labels

  • right (Constant) – Matrix with column and/or row labels

  • how (Constant, optional) – A STRING scalar indicating the join method with which the two matrices are aligned, by default DFLT. The matrices are aligned on the column labels and/or row labels. It can be ‘outer’ (or ‘fj’), ‘inner’ (or ‘ej’), ‘left’ (or ‘lj’) or ‘asof (‘aj’)’. The default value is ‘outer’, indicating outer join.

  • byRow (Constant, optional) –

    A Boolean or null value, by default DFLT.

    • true: align the matrices on row labels.

    • false: align the matrices on the column labels.

    • Null value (default): align on the row labels and the column labels. Specify how in the format of “<row_alignment>,<column alignment>”, e.g., how=”outer,inner”. Do not add a space or special character before or after the comma. If the same alignment method is used on rows and columns, it only needs to be specified once, e.g., how=”inner”.

  • view (Constant, optional) – A Boolean value, by default DFLT

Returns:

A tuple with 2 aligned matrices.

Return type:

Constant