I have character data like this
[[1]]
[1] "F" "S"
[[2]]
[1] "Y" "Q" "Q"
[[3]]
[1] "C" "T"
[[4]]
[1] "G" "M"
[[5]]
[1] "A" "M"
And I want to generate all permutations for each individual list (not mixed between lists) and combine them together into one big list.
For example, for the first and second lists, which are "F" "S"
and "Y" "Q" "Q"
, I want to get the permutation lists as c("FS", "SF")
, and c("YQQ", "QYQ", "QQY")
, and then combine them into one.