need help with comparing 2 different datasets imported from excel

Hi there,

I have 2 different data-sets that I have imported from excel. There are 2 columns in the data-sets namely 'owner' and 'account'. I need to run a query to to compare how many additional 'accounts' do all the owners have compared to the first data-set.

Name of the first set is AMRS_May19 and for the second is AMRS_Apr19. so basically I am comparing the data between 2 months and checking how many additional accounts did the owner get tagged to, I need to run this query for all owners and for one specific owner if required.

Really appreciate the help.


You could just rename the account columns to "accountMay" and "accountApr" and then merge the dataframes by "owner". Then just add a column in which you calculate the difference between the account columns.

This can be done with the anti_join() function from dplyr package.

If you need more specific help, please provide a minimal REPRoducible EXample (reprex). A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.