repetitions {matricks} | R Documentation |
Repeat columns or rows
Description
Repeat matrix object respectively to its shape and orientation
Usage
crep(x, times)
rrep(x, times)
Arguments
x |
matrix |
times |
number of repetitions |
Details
crep = columnwise repetition
rrep = rowwise repetition
Value
matrix
Examples
# Columnwise repetition
crep(v(1:3), 4)
crep(t(v(1:5)), 4)
# Rowwise repetition
rrep(v(1:3), 4)
rrep(t(v(1:5)), 4)
[Package matricks version 0.8.2 Index]