Convert a vector into an array given a set of dimensions; it therefore simply wraps aperm and array.
Usage
vec2tab(vec, dim)
Arguments
vec
a vector
dim
the desired array dimensions, oftentimes a vector of the number of levels of each variable in order
Value
an array
Details
This function converts an array (or a multi-way contingency table) into a vector, using a consistent ordering of the cells. The ordering of the cells is lexicographical and cannot be specified by the user.