Asking an R-Code Question

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 :frowning:

so the final dataframe will look like

2 name1 charater1
4 name4 charater4
5 name5 charater5

I think we need a FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. I don't think me need that whole dataset.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.