'Create different subsets of variables in a matrix with no repetition

I have a matrix of about 20 different variables. My scope is to create different combinations of these variables (no repetition, each of min 3 variables) and store them each in a new data frame. I tried with combn and expand.grid but it takes as inputs all the values connected to each variable; while I want it to take only the "name" of the variable and not its values. Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source