repRow {sdetorus} | R Documentation |
Replication of rows and columns
Description
Wrapper for replicating a matrix/vector by rows or columns.
Usage
repRow(x, n)
repCol(x, n)
Arguments
x |
a numerical vector or matrix of dimension |
n |
the number of replicates of |
Value
A matrix of dimension c(nr * n, nc)
for repRow
or
c(nr, nc * n)
for repCol
.
Examples
repRow(1:5, 2)
repCol(1:5, 2)
A <- rbind(1:5, 5:1)
A
repRow(A, 2)
repCol(A, 2)
[Package sdetorus version 0.1.10 Index]