powered by
Wrapper for replicating a matrix/vector by rows or columns.
repRow(x, n)repCol(x, n)
repCol(x, n)
A matrix of dimension c(nr * n, nc) for repRow or c(nr, nc * n) for repCol.
c(nr * n, nc)
repRow
c(nr, nc * n)
repCol
a numerical vector or matrix of dimension c(nr, nc).
c(nr, nc)
the number of replicates of x by rows or columns.
x
repRow(1:5, 2) repCol(1:5, 2) A <- rbind(1:5, 5:1) A repRow(A, 2) repCol(A, 2)
Run the code above in your browser using DataLab