> x <- matrix(1:9, nrow = 3, dimnames = list(c("X","Y","Z"), c("A","B","C"))) > x A B C X 1 4 7 Y 2 5 8 Z 3 6 9