matrixRep: Repeat matrix m by n times

View source: R/matrixRep.R

matrixRepR Documentation

Repeat matrix m by n times

Description

Repeat a matrix 'x' m times by row and n time by column.

Usage

matrixRep(x, m = 1, n = 1)

Arguments

x

a matrix or a numeric vector.

m

the desired number of rows.

n

the desired number of columns.

Value

Return a matrix repeated m (rows) * n (columns) times

See Also

matrixNew

Examples

{
## Not run: 
matrixRep(rnorm(3), m = 2, n = 3)
matrixRep(matrix(rnorm(6), ncol = 2), m = 3, n = 4)

matrixRep(t(c(T, F)), m = 4, n = 3)
matrixRep(t(letters[1:5]), m = 4, n = 1)

## End(Not run)
}

paodan/funcTools documentation built on April 1, 2024, 12:01 a.m.