Hi All

I'm new to the R studio where I have generated a venn diagram using VennDiagram package and also managed to get all the intersection values however I dont know to to create a dataframe that has the intersection values and the associated columns from the original dataframe.

My dataframe has 400 columns and 5000 rows with strings, charaters, numeric and integer types where I have generated a venn diagram using 3 numeric columns to get 7 sets in intersection values

a1, a2, a3, a4, a5, a,6, a7 where each set has a number of observations from 10 to 100. Now I want to add the others columns from the original df that match the numeric values in the each set then create a new dateframe that has ONLY the intersection values with all other columns from the original dataframe.

Thank you and hope to find a solution as been trying for weeks where I had to do some manaully by copy and paste after long hours of manual matching

so the final dataframe will look like

A B C

2 name1 charater1

4 name4 charater4

5 name5 charater5

.

.

.

.