powered by
Repeats each row in the matrix or data frame 'x' a number of times equal to 'times'.
rep_rows(x, times)
A matrix or data.frame depending on type of the input
A matrix or data frame
An integer indicating the number of times to repeat the row/column
test_matrix <- matrix(runif(12), 4) rep_rows(test_matrix, 2)
Run the code above in your browser using DataLab