m2c: Conversion between matrices and partitioned matrices

View source: R/m2c.R

c2dfR Documentation

Conversion between matrices and partitioned matrices

Description

Functions to convert a matrix to a list of partitioned matrices, and back again.

Usage

c2df(CC)

c2m(CC)

m2c(M, df = rep(1, dim(M)[2]))

Arguments

CC

list of matrices, typically the output of m2c

M

matrix to be partitioned according to df

df

integer vector. See Details

Details

m2c partitions a matrix into a list of matrices, by putting the first df[1] coloumns into the first matrix, the next df[2] coloumns into the second, etc.

c2m joins a partitioned matrix back into a single matrix. c2m(m2c(X, df)) equals X.

c2df takes a list of matrices and returns a vector with the number of coloumns of the matrices.

Value

m2c returns a list of matrices.

c2m returns a matrix.

c2df returns a numeric vector.

Note

sum(df) must equal ncol(X).

Author(s)

Øyvind Langsrud and Bjørn-Helge Mevik

See Also

ffmanova


ffmanova documentation built on Oct. 18, 2023, 5:08 p.m.

Related to m2c in ffmanova...