R Under development (unstable) (2023-11-08 r85496 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit 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)) [1] TRUE > > 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)) [1] TRUE > > proc.time() user system elapsed 0.09 0.06 0.14