expand: Expand a Vector into a Multi-column Matrix

Description Usage Arguments Value See Also Examples

Description

Create a matrix by combining multiple copies of a vector as columns

Usage

1
expand(x, n)

Arguments

x

a vector (data to repeat into n columns)

n

an integer (number of times to repeat x)

Value

a matrix with dimensions length(x), n, with x repeated in each column

See Also

Other utility: aggMatrix, badRows, cellIdx, merge.formula, rowProds

Examples

1
2
x <- rnorm(5)
expand(x, 3)

SEEG-Oxford/seegMBG documentation built on May 9, 2019, 11:08 a.m.