rep_rows {spdesign} | R Documentation |
Repeats each row in the matrix or data frame 'x' a number of times equal to 'times'.
rep_rows(x, times)
x |
A matrix or data frame |
times |
An integer indicating the number of times to repeat the row/column |
A matrix or data.frame depending on type of the input
test_matrix <- matrix(runif(12), 4)
rep_rows(test_matrix, 2)