powered by
Repeats each column of the matrix or data frame 'x' a number of times equal to 'times'.
rep_cols(x, times)
A matrix or data.frame depending on the 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_cols(test_matrix, 2)
Run the code above in your browser using DataLab