latte (version 0.2.1)

tab2vec: Array to vector conversion

Description

Convert an array into a vector.

Usage

tab2vec(tab)

Arguments

tab

An array of counts

Value

a Named integer vector. The names correspond to the cell indices in the table.

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.

See Also

vec2tab()

Examples

Run this code
# NOT RUN {
a <- array(1:24, c(2,3,4))
tab2vec(a)

data(Titanic)
tab2vec(Titanic)
Titanic[1,1,1,1]
Titanic[1,1,1,2]


# }

Run the code above in your browser using DataCamp Workspace