Dear R users, I'd like to make 4 by 7 matrices as many as possible with natural numbers 1 through 28 such that each matrix have different elements of each column.
For example, simply here is one > a1 <- matrix(1:28, 4,7) > a1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 5 9 13 17 21 25 [2,] 2 6 10 14 18 22 26 [3,] 3 7 11 15 19 23 27 [4,] 4 8 12 16 20 24 28 another one > a2 <- matrix(1:28, 4,7, byrow=T) > a2 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 8 9 10 11 12 13 14 [3,] 15 16 17 18 19 20 21 [4,] 22 23 24 25 26 27 28 Matrices a1 and a2 have different columns, and I guess there are such many matrices. Any suggestion will be greatly appreciated. Best, Kathryn Lord [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.