seqfind {TraMineR}R Documentation

Find the occurrences of sequence(s) x in the set of sequences y

Description

Finds the occurrences of sequence(s) x in the set of sequences y. The function returns the indexes of sequence x in the y sequence object.

Usage

 seqfind(x, y)

Arguments

x a sequence object containing one or more sequences.
y a sequence object.

Value

index(es) of the occurence of sequence(s) x in the set of sequences y.

See Also

.

Examples

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

## Finding occurrences of sequence 176 in mvad.seq
seqfind(mvad.seq[176,],mvad.seq)

## Finding occurrences of sequence 1 to 8 in mvad.seq
seqfind(mvad.seq[1:8,],mvad.seq)

[Package TraMineR version 1.1 Index]