I have the following strings:
center <- "XXXXXXX"
sides <- c("aa", "bb", "cc") # Could be longer than 3 members
# string length of members could be varied.
What I want to do is to make list of string that append member of sides to the both end of center in all possible combinations, yielding in:
aaXXXXXXXaa
aaXXXXXXXbb
aaXXXXXXXcc
bbXXXXXXXbb
bbXXXXXXXaa
bbXXXXXXXcc
ccXXXXXXXcc
ccXXXXXXXaa
ccXXXXXXXbb
How can I achieve that with R?