How do I reorder the dimensions of an n dimensional array. For example, if I have a three dimensional array of sales data, where the first dimension represents the Date, th
The function for doing that is aperm, from the base package. It is a generalization of the transpose t() function to multidimensional arrays. For your example, you would call it as follows: