I found this method http://www.r-bloggers.com/a-quick-way-to-do-row-repeat-and-col-repeat-rep-row-rep-col/
rep.row <- function(x, n){
matrix(rep(x, each = n), nrow = n)
}And it seemed sensible if the matrices are stored by column major, however, it seems like filling by rows is quicker