powered by
Returns a new matrix, where the entries of the original matrix are repeated along both dimensions.
repmatrix(x, times = 1, each = 1, times.row = times, times.col = times, each.row = each, each.col = each, ...)
a matrix
how often the matrix should be replicated next to itself
how often individual cells should be replicated next to themselves
number of vertical repetitions of the matrix, overrides times
times
number of horizontal repetitions of the matrix, overrides times
number of vertical repetitions of individual elements, overrides each
each
number of horizontal repetitions of individual elements, overrides each
not used
A matrix, which will have times*each times more rows and columns than the original matrix.
times*each
rep
# NOT RUN { repmatrix(diag(4)) repmatrix(diag(4), times=2) repmatrix(diag(4), each=2) repmatrix(diag(3), times=2, each=2) repmatrix(diag(4), each.row=2) repmatrix(diag(4), times.row=2) # }
Run the code above in your browser using DataLab