I have a data table that contains several patterns for going from `a` to `c`. These patterns are assigned to different expeditions. I want to extract similar patterns for the different `expedition_id`.

```
dt<- data.table(departure = c('a', 'a', 'a', 'b', 'a','d','a', 'b'), arrival = 
       c('a','a','b','c','d','c','b','c'), expedition_id = c(1,2,1,1,3,3,2,2))

 >dt          
departure      arrival    expedition_id
   a              a            1
   a              a            2
   a              b            1
   b              c            1
   a              d            3
   d              c            3
   a              b            2
   b              c            2

```

The results that I am trying to get look like different data tables for each unique pattern.

```
>dt1

departure       arrival         expedition_list
   a                a                1,2
   a                b                1,2
   b                c                1,2

>dt2

departure       arrival         expedition_list
   a                d                3
   d                c                3

```

I'd appreciate your help on this one.