Switch notation style in row or column names of matrices or a list of matrices. Notation style is either arrow ("a -> b") or parenthetical ("b [a]")

arrow_to_paren_byname(m, margin = c(1, 2))

paren_to_arrow_byname(m, margin = c(1, 2))

Arguments

m

a single matrix or a list of matrices.

margin

the margin over which the notation switch should be made: 1 for rows, 2 for columns, or c(1, 2) (the default) for both rows and columns.

Value

a version of m with switched notation

Details

The suffix "_byname" indicates that this function behaves like functions in the byname package. Specifically, it can work with a single matrix or a list of matrices supplied to the m argument.

  • arrow_to_paren_byname() switches from arrow to parenthetical specification notation for a matrix or list of matrices.

  • paren_to_arrow_byname() switches from parenthetical to arrow specification notation for a matrix or list of matrices.

See also

Examples