transpose_byname: Transpose a matrix by name

View source: R/Unary.R

transpose_bynameR Documentation

Transpose a matrix by name

Description

Gives the transpose of a matrix or list of matrices.

Usage

transpose_byname(a)

Arguments

a

The matrix to be transposed.

Value

The transposed matrix.

Examples

m <- matrix(c(11,21,31,12,22,32), ncol = 2, dimnames = list(paste0("i", 1:3), paste0("c", 1:2))) %>%
  setrowtype("Industry") %>% setcoltype("Commodity")
m
transpose_byname(m)
transpose_byname(list(m,m))

matsbyname documentation built on Oct. 19, 2023, 5:11 p.m.