R/repmat.r

repmat = function (A, m, n = m)
{
    A <- as.matrix(A)
    tmp <- matrix(rep(t(A), m), nrow = m * nrow(A), byrow = TRUE)
    return(matrix(rep(tmp, n), ncol = n * ncol(tmp)))
}

Try the rainbow package in your browser

Any scripts or data that you put into this service are public.

rainbow documentation built on Oct. 10, 2022, 1:06 a.m.