> x = matrix(data=1:6, nrow=2, nc=3) > x [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 > x = matrix(data=1:6, nrow=2, nc=3, byrow=TRUE) > x [,1] [,2] [,3] [1,] 1 2 3 [2,] 4 5 6 > x = matrix(data=1:6, nrow=2, nc=3, byrow=TRUE, dimnames=list(list('a','b'),list('A','B','C'))) > x A B C a 1 2 3 b 4 5 6 > x['a',] A B C 1 2 3