Transpose of a matrix based on row or column index.
bg_transpose(mat, byrow = FALSE)
mat
A Matrix.
byrow
FALSE computes based on row index. TRUE computes based on column index.
FALSE
TRUE
A matrix transposed.