Mh2Mv {lazy.mat}R Documentation

Convert a horizontally stacked supermatrix to a vertially stacked one.

Description

Convert a horizontally stacked supermatrix to a vertially stacked one.

Usage

Mh2Mv(Mh, d1, d2, d3)

Arguments

Mh

Input horizontally stacked supermatrix with SMdim attribute.
When SMdim attributes is NULL, the following three must be geven.

d1

# of first dimension (rows)

d2

# of second dimension (cols)

d3

# of matrices

Details

About SMdim attribute:
SMdim attribute of a supermatrix is a list of the form (nrows=, ncols=) where
nrows is a vector of rows of each submatrix,
ncols is a vector of columns of each submatrix.

Value

a (d3 x d1) x d2 vertically stacked supermatrix

Examples

A <- demomat(2,3,4, rnroot="R", cnroot="C")
Mh <- a2m(A)
Mv <- a2m(A,method=2)

MvfMh <- Mh2Mv(Mh)
identical(Mv,MvfMh)
MhfMv <- Mv2Mh(Mv)
identical(Mh,MhfMv)

attributes(Mh)
attributes(MhfMv)
attributes(Mv)
attributes(MvfMh)


[Package lazy.mat version 0.1.3 Index]