I have data with missing values. I need all permutations which follow the two rules: Every year must be represented in each draw; and each draw must contain a minimum of two elements for each year. Here is the data.
assoc = <|
"A" -> <|"1990" -> "Aretn1", "1991" -> "Aretn2",
"1992" -> "Aretn3", "1993" -> "Aretn4", "1994" -> "Aretn5"|>,
"B" -> <|"1990" -> "Bretn1", "1991" -> "Bretn2",
"1992" -> "Bretn3", "1993" -> "Bretn4", "1994" -> "Bretn5"|>,
"C" -> <|"1990" -> "", "1991" -> "", "1992" -> "",
"1993" -> "Cretn4", "1994" -> "Cretn5"|>,
"D" -> <|"1990" -> "Dretn1", "1991" -> "Dretn2",
"1992" -> "Dretn3", "1993" -> "", "1994" -> ""|>,
"E" -> <|"1990" -> "", "1991" -> "", "1992" -> "",
"1993" -> "Eretn4", "1994" -> "Eretn5"|>|>;
Using the brute strength method, here are the permutations that qualify
Clearly a picking function using an elaborate Module with Reap and Sow or Select would do it. But I am trying to use more code efficient methods of Query or Counts that Datasets and Associations were created for
Subsets
followed bySelect
with an appropriate filter criterion $\endgroup$