repm: Matrix generalization of rep. If 'x' is a vector, the...

View source: R/repm.R

repmR Documentation

Matrix generalization of rep. If 'x' is a vector, the ordinary rep() is used.

Description

Matrix generalization of rep. If 'x' is a vector, the ordinary rep() is used.

Usage

repm(x, times = 1, byrow = FALSE, length.out = NULL)

Arguments

x

is a matrix or vector.

times

is the times to repeat the matrix/vector.

byrow

is TRUE if the matrix is to be repeated vertically, and FALSE if horizontally.

length.out

is the number of columns of the output matrix if byrow==FALSE, the number of rows of the output matrix if byrow==TRUE, and the length of the output vector if the input is a vector.


arnejohannesholmin/TSD documentation built on April 14, 2024, 5:29 a.m.