Is it possible to load a list of frequent subsequences from a .txt file, and make TraMineR recognize it as a sequence object?
Unfortunately I don't have the raw data, therefore I am not able to recreate the analysis. The only file what I have is a .txt file containing the frequent subsequences. I assume it was created with the seqefsub()
function from the TraMineR package, with maxGap=2
, because the data looks like as an output of the mentioned function.
read.table()
reads it as a data frame but as far as I understood, TraMineR handles event sequences as lists with many additional attributes, that for example are not contained in this file. Or I don't know how to extract them...
This is how the a couple of lines from the .txt file look like:
Subsequence Support Count
16 (WT4)-(WT3) 0.76666667 805
17 (WL2) 0.76380952 802
18 (S1) 0.76000000 798
19 (FRF,WL2) 0.74380952 781
20 (WT2)-(WT1) 0.70571429 741
seqefsub
as text and then read it back as sequence object? Theseqefsub
function already returns an event sequence object. Do you want to transform the event sequence object into a state sequence object? (if yes look at [stackoverflow.com/a/28968342/1586731] ). Please clarify your question. – Gilbert