seqLCP {TraMineR}R Documentation

Longest common prefix of two sequences.

Description

Returns the length of the longest common prefix of two sequences.

Usage

seqLCP(iseq, jseq)

Arguments

iseq a sequence from a sequence object or a vector of states.
jseq a sequence from a sequence object or a vector of states.

Examples

data(famform)
famform.seq <- seqdef(famform)
## The LCP's length between sequences 1 and 2
## in the famform sequence object is 2
seqLCP(famform.seq[1,],famform.seq[2,])

[Package TraMineR version 1.0 Index]