title: R arulesSequences Find which patterns are supported by a sequence
body: <p>I'm having troubles with the <code>arulesSequences</code> library in R</p>
  
  <p>I have a transactional dataset with temporal information (here, let's use the default <code>zaki</code> dataset). I use SPADE (<code>cspade</code> function) to find the frequent subsequences in the dataset. </p>
  
  <pre><code>library(arulesSequences)
  data(zaki)
  frequent_sequences &lt;- cspade(zaki, parameter=list(support=0.5))
  </code></pre>
  
  <p>Now, what I want is to find, for each sequence (i.e. for each custumer) which are the frequent subsequences that it supports. I tried various combinations of <code>%in%</code> and <code>subset</code> without much success.</p>
  
  <p>For example for the second custumer, the initial transactions <code>inspect(zaki[zaki@itemsetInfo$sequenceID==2])</code> are:</p>
  
  <pre><code>items     sequenceID eventID SIZE
  5 {A,B,F} 2          15      3   
  6 {E}     2          20      1 
  </code></pre>
  
  <p>The frequent sequences in the whole dataset <code>inspect(frequent_sequences)</code> are:</p>
  
  <pre><code>items support 
  1 &lt;{A}&gt;    1.00 
  2 &lt;{B}&gt;    1.00 
  3 &lt;{D}&gt;    0.50 
  4 &lt;{F}&gt;    1.00 
  5 &lt;{A, F}&gt;    0.75 
  6 &lt;{B, F}&gt;    1.00 
  7 &lt;{D}, {F}&gt;    0.50 
  8 &lt;{D}, {B, F}&gt;    0.50 
  9 &lt;{A, B, F}&gt;    0.75 
  10 &lt;{A, B}&gt;    0.75 
  11 &lt;{D}, {B}&gt;    0.50 
  12 &lt;{B}, {A}&gt;    0.50 
  13 &lt;{D}, {A}&gt;    0.50 
  14 &lt;{F}, {A}&gt;    0.50 
  15 &lt;{D}, {F}, {A}&gt;    0.50 
  16 &lt;{B, F}, {A}&gt;    0.50 
  17 &lt;{D}, {B, F}, {A}&gt;    0.50 
  18 &lt;{D}, {B}, {A}&gt;    0.50 
  </code></pre>
  
  <p>What I'd like to see is that customer 2 supports the frequent sequences 1, 2, 4, 5, 6, 9 and 10, but does not support the others. </p>
  
  <p>I could also settle for the reverse information: which are the base sequences that support a given frequent subsequence? R somehow knows this information, since it uses it to compute the support of the frequent sequences.</p>
  
  <p>It seems to me that this should be easy (and it probably is!) but I can't seem to figure it out...</p>
  
  <p>Any idea ?</p>