seqconc {TraMineR}R Documentation

Concatenate vectors of states or events into a character string.

Description

Concatenate vectors of states or events into a character string. In the string, each state is separated by 'sep'. The missing values (NA's) are eliminated in the input sequences.

Usage

 seqconc(data, var=NULL, sep="-",vname="Sequence")

Arguments

data a dataframe or matrix containing sequence data.
var the list of columns containing the sequences. Defaut to NULL, ie all the columns. Whether the sequences are in the compressed (character strings) or extended format is automatically detected by counting the number of columns.
sep the character used as separator. By default, "-".
vname an optional name for the variable containing the sequences. By default, "Sequence".

Value

a vector of character strings, one for each row in the input data.

See Also

seqdecomp.

Examples

data(actcal)
actcal.string <- seqconc(actcal,13:24)

[Package TraMineR version 1.0 Index]