You could consider storing your data in 3d array.
If A and B are your matrices of first and second numbers, respectively, with both being of the same shape, then: C <- array(c(A,B), dim=c(dim(A),2)) gives you a 3d array. For example, C[,,1] is A C[,,2] is B C[2,1,] is the the vector: c(A[2,1],B[2,1]) --- Date: Wed, 12 Nov 2003 11:41:17 -0600 (CST) From: Mikyoung Jun <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [R] question about matrix Hello, I have a few questions about matrix in R. Can we make a matrix whose elements are list? I would like to save two different values in each elements of matrix. If there is a package or something which can deal with complex numbers, that will do it too. Also, I am wondering whether there is a function to calculate the rank of the matrix. I found a matrix package, but it doesn't have functions like that. Thanks a lot in advance! Mikyoung Jun ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
