# De SYM uit docs_annotated2 halen in de upos kolom door te subsetten op SYM in de upos kolom
docs_annotated2 <- docs_annotated2[docs_annotated2$upos != "SYM",]
We can use %in% to get a logical vector and subset the rows of the 'table1' based on that.
subset(table1, gene_ID %in% accessions40$V1)
A better option would be data.table
library(data.table)
setDT(table1)[gene_ID %chin% accessions40$V1]
Or use filter from dplyr
library(dplyr)
table1 %>%
filter(gene_ID %in% accessions40$V1)