Let A be a 1 x 2 x 2 -array:
> A <- array(0, dim=c(1,2,2)) > A , , 1 [,1] [,2] [1,] 0 0 , , 2 [,1] [,2] [1,] 0 0
Then A[,,1] dimensionless:
> A[,,1] [1] 0 0
I would like to:
[,1] [,2] [1,] 0 0
The drop argument does not give what I want:
> A[,,1,drop=FALSE] , , 1 [,1] [,2] [1,] 0 0
I find it annoying. And buggies, because R identifies vectors for column matrices, not rows.
Of course, I could do matrix(A[,,1], 1, 2) . Is there a more convenient way?