I am working with 3D arrays. A function takes a 2D array slice (matrix) from the user and visualizes it, using row and column names (the corresponding dimnames of the array
Without any extra packages, the best I could do was to apply and return the sub-array:
apply
apply(a, 1:2, identity) # or apply(a, 1:2, I) # B #A b # a 1