R equivalent of repmat (matlab)

repmat(X, m, n)

Arguments

X

initial matrix

m

nb of replications in row dimension

n

nb of replications in column dimension

Value

matrix with values replicated and tiles