Reputation: 2519
How would I write a dplyr statement that behaves like the in
would in a SQL query.
Example in SQL
SELECT name
FROM Person
WHERE name IN (SELECT name FROM Worker)
Upvotes: 0
Views: 242
Reputation: 3994
`library(dplyr)`
person %>% select(name) %>% filter(name %in% Worker$name)
I actually don't know what the datasets look like so this is 100% hunch.
Upvotes: 2