my_vector <- c("g1","g2","g3","g4")
Read_1 Read_2 Read_3 Read_4
g1 o o g1
o g2 o g2
g3 g3 g3 o
Read_1,2,3,4 are my data frames column name and i have a vector called my_vector. What i want is that take the vector and compare across the data frame and if match found report the matched column name. I tried with two columns but i don't know how compare with multiple columns
This is my expected output
Read_1 Read_2 Read_3 Read_4 Match_cloumn
g1 o o g1 Read_1,Read_4
o g2 o g2 Read_2,Read_4
g3 g3 g3 o Read_1,Read_2,Read_2
Can someone help me with this?