When comparing the same string sequences in the example below, why does the first call return 0 instead of 7? LCS.ex1[3,] is "S-U-M-S-SC-UC-MC" and LCS.ex2[1,] is also "S-U-M-S-SC-UC-MC".
Does one always have to pass in a sequence type with only one value for this function (and seqdist) to work? How can I refer to just one row from a sequence object without the rest of the object still being referenced? i.e., I don't want to have to create a new sequence object for every string value of LCS.ex2 to be able to compare each to LCS.ex1.
LCS.ex1 <- c("S-U-S", "U-S-SC-MC", "S-U-M-S-SC-UC-MC") LCS.ex2 <- c("S-U-M-S-SC-UC-MC", "1-2-3", "A-B-C-D-E-F-G-H-I-J-K") LCS.ex3 <- c("S-U-M-S-SC-UC-MC") LCS.ex1 <- seqdef(LCS.ex1) LCS.ex2 <- seqdef(LCS.ex2) LCS.ex3 <- seqdef(LCS.ex3) seqLLCS(LCS.ex1[3,],LCS.ex2[1,]) R> 0 seqLLCS(LCS.ex1[3,],LCS.ex3[1,]) R> 7