I have to match individuals in my first table to those in the second. Individuals in the first appear only onetime in this one but in the second they could appear many times. Also, in the second table there are some individuals who don't appear in the first one. And my goal is to delete the row of these individuals who doesn't appear in the first table, hence keep only those I have in the first one.
My two tables are so huge, I can't load them here, sorry.Could anyone help me please?
I tried with this:
`for (i in company_top10$Company_id){
patent_pf_top10 <- patent_portfolio %>% filter(Company_id == i)
}`
But the problem is tha, it remains only the last filter. Thank you for your answer.
you may not be able to load them in their entirety, but you could share representative data, you could simply invent example data that would conform to the description you wrote / your issue.
On its face, it seems like you want to do a simple inner join. keeping rows where individuals in both tables match, and disregarding the rest. here is an example of an inner join using tidyverse/dplyr