SyntaxFix
Write A Post
Hire A Developer
Questions
Have a look at ?"%in%".
?"%in%"
dt[dt$fct %in% vc,] fct X 1 a 2 3 c 3 5 c 5 7 a 7 9 c 9 10 a 1 12 c 2 14 c 4
You could also use ?is.element:
?is.element
dt[is.element(dt$fct, vc),]