tab2vec: Array to Vector conversion

Description Usage Arguments Details Value See Also Examples

View source: R/tab2vec.r

Description

Convert an array into a vector.

Usage

1
tab2vec(tab)

Arguments

tab

an array of counts

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.

Value

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

See Also

vec2tab

Examples

1
2
3
4
5
6
7
a <- array(1:24, c(2,3,4))
tab2vec(a)

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

algstat documentation built on May 29, 2017, 10:34 p.m.

Related to tab2vec in algstat...