I have read this How to find common rows between two dataframe in R?
I have two data
df1 <- structure(list(V1 = structure(c(1L, 3L, 2L, 4L), .Label = c("AMH5",
"BBHD", "DHE3", "NF1"), class = "factor")), .Names = "V1", class = c("data.table",
"data.frame"), row.names = c(NA, -4L), .internal.selfref = <pointer: 0x103007b78>)
and
df2<- structure(list(V1 = structure(c(4L, 2L, 3L, 1L), .Label = c("AMH5 ",
"BBDQ ", "DHE3", "TBB5 "), class = "factor")), .Names = "V1", class = c("data.table",
"data.frame"), row.names = c(NA, -4L), .internal.selfref = <pointer: 0x103007b78>)
unfortunatelly I cannot find where the problem is when I have several similar strings while not all detected. For example when I do this
library(data.table)
fintersect(setDT(df1), setDT(df2))
It shows only one
V1
1: DHE3