I use combnk to generate a list of combinations. How can I generate a subset of combinations, which always includes particular values. For example, for co
combnk
co
Just to improve Steve's answer : in your case (you want all combinations with 3 and/or 5) it will be
Easily generalized for any other case of this type.