From this data set of supply chains I am trying to extract each and every route and put all the stages of one specific route in one vector such as this. This is how the from to data is stored. From To Manuf_0001 Retail_0001 Manuf_0001 Retail_0002 Manuf_0002 Retail_0003 Manuf_0002 Retail_0001 Part_0001 Manuf_0001 Part_0001 Manuf_0002 Part_0002 Manuf_0001 Part_0002 Manuf_0002 Part_0003 Manuf_0001 Part_0003 Manuf_0002 And this is how I want the vectors of each route to be outputted. Part_0001, Manuf_0001, Retail_0001 Part_0001, Manuf_0001, Retail_0002 Part_0002, Manuf_0001, Retail_0001 Part_0002, Manuf_0002, Retail_0002 Part_0002, Manuf_0002, Retail_0003 Part_0003, Manuf_0001, Retail_0001 Part_0003, Manuf_0002, Retail_0002 Part_0003, Manuf_0002, Retail_0003 Continue reading...