I have a large data frame which I have used combn to generate the number of unique combinations (over 100,000). Once I get the results from the correlation test ( estimate, p value) and I undertake some filtering, I remove some of the combintations. I would like to obtain from this combn generated list the column names of the dataframe that remain after filtering. For example, if I had the filtering results as follows from an original dataframe containing 5 columns named A-D.
A B
A C
A D
A E
B C
B D
B E
C D
C E
D E
if I took the colnames from the first it would miss E, and from the second it would miss A. I was wondering how could I go from these pairs of values generated from combn, to the original list of A, B, C, D, E.