powered by
Helper function to repeat a matrix by column
rep_col(x, n)
matrix with vector x repeated n-times by columns.
vector to repeat
number of repetions
set.seed(1) rep_col(rnorm(5), 5)
Run the code above in your browser using DataLab