seqLLCS | R Documentation |
Returns the length of the longest common subsequence of two sequences. This attribute is described in Elzinga (2008).
seqLLCS(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 subsequence of the two sequences.
Elzinga, Cees H. (2008). Sequence analysis: Metric representations of categorical time series. Technical Report, Department of Social Science Research Methods, Vrije Universiteit, Amsterdam.
seqdist
LCS.ex <- c("S-U-S-M-S-U", "U-S-SC-MC", "S-U-M-S-SC-UC-MC")
LCS.ex <- seqdef(LCS.ex)
seqLLCS(LCS.ex[1,],LCS.ex[3,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.