tab2vec | R Documentation |
Convert an array into a vector.
tab2vec(tab)
tab |
An array of counts |
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.
a Named integer vector. The names correspond to the cell indices in the table.
vec2tab()
a <- array(1:6, c(1,2,3))
tab2vec(a)
data(Titanic)
tab2vec(Titanic)
Titanic[1,1,1,1]
Titanic[1,1,1,2]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.