x <- cbind.spam(1:5,6)
y <- cbind(x, 7)
# for some large matrices the following might be slightly faster:
t( cbind( t(x), t(x)))
# Method is only defined for the first argument:
cbind(diag(2),diag.spam(2))Run the code above in your browser using DataLab