I have a string vector like
sv = c('xx_S1_xx', 'xx_S1_xx', 'xx_S2_xx', 'xx_S3_xx', ...)
But I have difficuly to find a dictionary-like structure so I can convert it to
map = { S1=>c('xx_S1_xx', 'xx_S1_xx'), S2=>c('xx_S2_xx'), S3=>c('xx_S3_xx'), ... }
Any suggestions?