R/repmat.r

Defines functions repmat

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 Jan. 29, 2019, 5:09 p.m.