I am compiling a report where I compare fund IDs to find any discrepancies between (company name, ID) pairings across dataframes. Tables below:
Company | ID |
---|---|
A | 123 |
B | 456 |
C | 789 |
and
Company | ID |
---|---|
B | 453 |
A | 123 |
C | 789 |
In this case, ideally there is some function that reads each company name, identifies each corresponding ID, and then finds the same company name with corresponding ID from the next table. If they are the same value, I assume it would return TRUE and if different, return FALSE.
In the example above, it would return TRUE, FALSE, TRUE since the only discrepancy is with company B.
I'm thinking it must be some nested variation of sapply
but for the life of me I can't figure out what the syntax would be (since the companies will be on different rows).