tab2vec: Array to vector conversion

View source: R/tab2vec.R

tab2vecR Documentation

Array to vector conversion

Description

Convert an array into a vector.

Usage

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


a <- array(1:6, c(1,2,3))
tab2vec(a)

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



latte documentation built on June 9, 2025, 9:08 a.m.

Related to tab2vec in latte...