I have 2 datasets which look like:

```
Gene        Druggability
Gene1       KINASE
Gene2       DRUGGABLE GENOME 

```

```
Pathway      Gene
Pathway1     Gene1/Gene2/Gene3
Pathway2     Gene3/Gene1/Gene2
Pathway3     Gene1/Gene4

```

I am trying to add data from the first dataset into the second dataset so it corresponds with the genes and their order listed in the second dataset, like this:

```
Pathway      Gene                Druggability
Pathway1     Gene1/Gene2/Gene3   KINASE/DRUGGABLE GENOME/NA
Pathway2     Gene3/Gene1/Gene2   NA/DRUGGABLE GENOME/KINASE
Pathway3     Gene1/Gene4         KINASE/NA

```

I've been looking into reshaping with tidyr but I haven't gotten very far - are there any functions that can help with what I'm looking for?

```
drugs <- structure(list(Gene = c("TLN2", "PDGFC", "PIK3R3", "PIP5K1B", 
"VEGFA"), Druggability = c("KINASE", "DRUGGABLE GENOME", "CLINICALLY ACTIONABLE", 
"KINASE", "CLINICALLY ACTIONABLE")), row.names = c(NA, -5L), class = c("data.table", 
"data.frame"))

genes <- structure(list(Pathway = c("Pathway1", "Pathway2", "Pathway3"
), Gene = c("Gene1/Gene2/Gene3", "Gene3/Gene1/Gene2", "Gene1/Gene4"
)), row.names = c(NA, -3L), class = c("data.table", "data.frame"
))

```