This function creates a coded vector. Coded vectors are used to represent sequences of symbols from a finite alphabet. Each symbol should be coded as an integer using a bijective mapping.

coded_vec(x, type, metadata = list())

Arguments

x

(Integer vector) The coded sequence.

type

(Character scalar) Identifies the symbol type.

metadata

(List) A (possibly-empty) list of metadata information.

Value

An object of class "coded_vec".

See also