bmat: Block Matrices

Description Usage Arguments Value See Also Examples

Description

Construct a block matrix using a character string initializer.

Usage

1
bmat(x, rows = TRUE, sep = ",", ...)

Arguments

x

A data vector, character string, or a list.

rows

Logical. If TRUE (the default) the matrix is filled by rows, otherwise the matrix is filled by columns.

sep

Separator string. Values within each row/column of x are separated by this string. Default is ",".

...

Aditional optional arguments.

Value

A matrix (i.e., an object of class "matrix").

See Also

mat, dmat.

Examples

1
2
3
4
5
# Construct a block matrix from matrices A1, A2, and A3
A1 <- mat('1, 1; 1, 1')
A2 <- mat('2, 2; 2, 2')
A3 <- mat('3, 3, 3, 3')
bmat('A1, A2; A3')

ramify documentation built on May 2, 2019, 5:58 a.m.