I would like to rotate the orientation of an array so that rows and columns are inverted.
For example, I want to convert this:
1 cat calico
2 dog collie
3 cat siamese
4 dog mutt
to this:
4 3 2 1
dog cat dog cat
mutt siamese collie calico
How can I accomplish this?