Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

seqLLCS

Compute the length of the longest common subsequence of two sequences


Description

Returns the length of the longest common subsequence of two sequences. This attribute is described in Elzinga (2008).

Usage

seqLLCS(seq1, seq2)

Arguments

seq1

a sequence from a sequence object

seq2

a sequence from a sequence object

Value

an integer being the length of the longest common subsequence of the two sequences.

References

Elzinga, Cees H. (2008). Sequence analysis: Metric representations of categorical time series. Technical Report, Department of Social Science Research Methods, Vrije Universiteit, Amsterdam.

See Also

Examples

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,])

TraMineR

Trajectory Miner: a Toolbox for Exploring and Rendering Sequences

v2.2-1
GPL (>= 2)
Authors
Alexis Gabadinho [aut, cph], Matthias Studer [aut, cph] (<https://orcid.org/0000-0002-6269-1412>), Nicolas M"{u}ller [aut], Reto B"{u}rgin [aut], Pierre-Alexandre Fonta [aut], Gilbert Ritschard [aut, cre, cph] (<https://orcid.org/0000-0001-7776-0903>)
Initial release
2020-10-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.