seqcomp: Compare two state sequences

View source: R/seqcomp.R

seqcompR Documentation

Compare two state sequences

Description

Check whether two state sequences are identical.

Usage

 seqcomp(x, y)

Arguments

x

a state sequence object containing a single sequence (typically the row of a main sequence object, see seqdef)

y

a state sequence object containing a single sequence (typically the row of a main sequence object, see seqdef)

Value

TRUE if sequences are identical, FALSE otherwise

See Also

seqfind, seqfpos, seqpm

Examples

data(mvad)
mvad.shortlab <- c("EM", "FE", "HE", "JL", "SC", "TR")
mvad.seq <- seqdef(mvad, states=mvad.shortlab, 15:86)

## Comparing sequences 1 and 2 in mvad.seq
seqcomp(mvad.seq[1,],mvad.seq[2,])

## Comparing sequences 176 and 211 in mvad.seq
seqcomp(mvad.seq[176,],mvad.seq[211,])

TraMineR documentation built on Dec. 8, 2024, 3:01 p.m.