I'm trying to get permutations of a partial set of list elements. I can get regular permutations with
my_list <- list('A' = c("A"), 'B'= c('B', 'B'), "C" = c('C', "C", "C"))
combinat::permn(my_list)
However, I need only 2 of the possible 3 elements e.g. combinat::permn(my_list)[[1]][1:2]
would be one of the desired results
combinat::permn(my_list)[[1]][1:2]
$A
[1] "A"
$B
[1] "B" "B"
combinat::permn
does not allow for these 'partial' permutations. What would be a good way to get partial permutations?