I'm doing data validation of a merged dataframe (A + B) to that of the source dataframes (A and B). I merged A and B dfs and want to ensure they merged properly. The merged df contains all the same variable names as the source dfs. The issue is that the merged df is a different size than that of the source dfs. Is there a simple code to do this?
In excel it would do something like this: =IF(Merged_dataframe!A2=A.xlsx!$A$2,TRUE, result) But for all the rows in the merge dataset and I want it to print out the result true if they match.
I'm new to R and I don't know where to start but did try this:
A<-First.df
B<-Second.df
A_B <- cbind(A, B)
A_B == A
A_B == B
But the issue is that the A_B is a different size and so it doesn't work and rightfully so I get this error: ‘==’ only defined for equally-sized data frames
Please help.
Thank you!