https://github.com/cran/pracma
Tip revision: a7001ff1805634d18a10fa371b38dbe3e48f8c9e authored by HwB on 30 October 2011, 00:00:00 UTC
version 0.8.1
version 0.8.1
Tip revision: a7001ff
blkdiag.R
##
## r e p m a t . R Test Suite
##
repmat <- pracma::repmat
reshape <- pracma::reshape
v <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
a <- matrix(v, 3, 4)
identical(reshape(a, 4, 3), matrix(v, 4, 3))
identical(repmat(matrix(1:4, 2, 2), 3),
matrix(rep(c(rep(c(1,2), 3), rep(c(3, 4), 3)), 3), nrow=6, ncol=6))