This is a direct way to do this by doing% in%. This will be the fastest path entirely inside R.
read in files
datf1 <- read.table("file1.csv") #two column file
datf2 <- read.table("file2.csv") #one column file
...% in% , , , FALSE .
datf1 <- datf1[datf1[,2] %in% datf2[,1],]
... 1, 1.
write.table(datf1, "file3.csv", sep = ',', row.names = FALSE, quote = FALSE)