seqLLCP {TraMineR} | R Documentation |
Returns the length of the longest common prefix of two sequences. This attribute is described in Elzinga (2008).
seqLLCP(seq1, seq2)
seq1 |
a sequence from a sequence object. |
seq2 |
a sequence from a sequence object. |
an integer being the length of the longest common prefix of the two sequences.
Elzinga, Cees H. (2008). Sequence analysis: Metric representations of categorical time series. Sociological Methods and Research, forthcoming.
data(famform) famform.seq <- seqdef(famform) ## The LCP's length between sequences 1 and 2 ## in the famform sequence object is 2 seqLLCP(famform.seq[1,],famform.seq[2,])